Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eval7 - MSCOCO Poisoning Dataset #1908

Merged
merged 9 commits into from
Apr 10, 2023

Conversation

yusong-tan
Copy link
Contributor

For object detection poisoning scenario

@swsuggs swsuggs self-assigned this Apr 4, 2023
@swsuggs swsuggs requested a review from lcadalzo April 4, 2023 15:59
@swsuggs
Copy link
Contributor

swsuggs commented Apr 4, 2023

@lcadalzo If you could just check that this works for you, that would be great

@swsuggs swsuggs changed the title Eval7 - MSCOCO Poisoning Dataset WIP Eval7 - MSCOCO Poisoning Dataset Apr 5, 2023
@swsuggs
Copy link
Contributor

swsuggs commented Apr 5, 2023

Going to change the name of the dataset as discussed in the poisoning group meeting

@lcadalzo
Copy link
Contributor

lcadalzo commented Apr 5, 2023

I can confirm that I can load the dataset and retrieve a batch of data successfully:

>>> from armory.data.datasets import mscoco_poisoning                                                                                   
2023-04-05 20:47:46 48s INFO     armory.delayed_imports:<module>:7 Importing and configuring torch, tensorflow, and art, if available. T
his may take some time.                                                                                                                 
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B2023-04-05 20:47:52 54s INFO     art.config:set_data_path:55 set ART_DATA_PATH to /tmp/.art/data        
2023-04-05 20:47:54 56s INFO     art.config:set_data_path:55 set ART_DATA_PATH to /armory/saved_models/art                              
>>> ds = mscoco_poisoning()                                                                                                             
2023-04-05 20:48:06 1m8s INFO     armory.data.utils:download_verify_dataset_cache:251 Attempting download_verigy_dataset_cache with data
set_dir                                                                                                                                 
2023-04-05 20:48:06 1m8s INFO     armory.data.utils:download_verify_dataset_cache:282 Downloading dataset: mscoco_poisoning...          
/opt/conda/lib/python3.9/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to
 host 'armory-public-data.s3.us-east-2.amazonaws.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthe
docs.io/en/1.26.x/advanced-usage.html#ssl-warnings                                                                                      
  warnings.warn(                                                                                                                        
2023-04-05 20:49:41 2m43s INFO     armory.data.utils:download_requests:195 downloaded /armory/datasets/cache/mscoco_poisoning_1.0.0.tar.
gz from https://armory-public-data.s3.us-east-2.amazonaws.com/mscoco_poisoning/mscoco_poisoning_1.0.0.tar.gz                            
2023-04-05 20:49:41 2m43s INFO     armory.data.utils:download_verify_dataset_cache:299 Verifying sha256 hash of download...             
2023-04-05 20:49:46 2m48s INFO     armory.data.utils:download_verify_dataset_cache:315 Extracting .tfrecord files from download...      
mscoco_poisoning/                                                                                                                       
mscoco_poisoning/2017/                                                                                                                  
mscoco_poisoning/2017/1.0.0/                                                                                                            
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00004-of-00016                                                              
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00014-of-00016                                                              
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00013-of-00016                                                              
mscoco_poisoning/2017/1.0.0/objects-label.labels.txt                                                                                    
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00003-of-00016                                                              
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00005-of-00016                                                              
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00015-of-00016                                                              
mscoco_poisoning/2017/1.0.0/features.json                                                                                               
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00012-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00002-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00011-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00001-of-00016
mscoco_poisoning/2017/1.0.0/dataset_info.json
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00006-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00009-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00010-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00000-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00008-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-train.tfrecord-00007-of-00016
mscoco_poisoning/2017/1.0.0/mscoco_poisoning-validation.tfrecord-00000-of-00001
mscoco_poisoning/.config/
mscoco_poisoning/.config/metadata.json
>>> x, y = next(ds)
>>> type(x)
<class 'numpy.ndarray'>
>>> x.shape
(1, 238, 640, 3)
>>> type(y)
<class 'list'>
>>> len(y)
1
>>> type(y[0])
<class 'dict'>
>>> y[0].keys()
dict_keys(['area', 'id', 'is_crowd', 'boxes', 'labels'])
>>> y[0]['boxes'].shape
(1, 4)
>>> y[0]['labels'].shape                                             
(1,)

@swsuggs swsuggs changed the title WIP Eval7 - MSCOCO Poisoning Dataset Eval7 - MSCOCO Poisoning Dataset Apr 7, 2023
@swsuggs swsuggs merged commit f058105 into twosixlabs:develop Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants