Repository for downloading datasets. Project related to my thesis.
CLEVR dataset | RSNA dataset | TACO dataset | CIFAR10 dataset | Trashnet dataset
This project uses a subset of the CLEVR dataset.
The full dataset consists of:
- A training set of 70000 images
- A validation set of 15000 images
- A test set of 15000 images
- Questions and answers for training and validation sets
- Scene graph annotations for training and validation images, providing:
- Ground-truth locations of objects
- Object attributes (e.g., color, size, material)
- Relationships between objects
Since this project focuses on limited data, the following steps are applied:
- The original CLEVR_v1.0.zip is downloaded from the official source.
- Only the training set images and corresponding scene annotations are extracted.
- The number of objects per image is determined based on the
CLEVR_train_scenes.jsonfile. - Subfolders are created for each unique object count (e.g.,
3,4, ...,10). - Images are moved to the correct subfolder based on the number of objects in the image.
- The original ZIP file is deleted to save space.
- The temporary extraction directory is removed after processing.
This project uses a subset of RSNA Pneumonia Detection Challenge dataset. This dataset enhanced the original dataset by converting the images in DICOM format to PNG format.
The full dataset consists of:
- A training set of 24124 images
- A validation set of 2560 images
Since this project focuses on limited data and the structure will follow the ImageFolder dataset structure, the following steps are applied :
- The dataset ZIP file is downloaded from a Google Drive link using
gdownif it doesn't already exist. - Only the necessary files are extracted:
stage2_train_metadata.csv- All image files in
Training/Images/
- The metadata CSV is processed by removing duplicate patient IDs, if a patients has multiple labels,
Target == 1is kept. - Images are moved into subfolders based on their class label:
"No Lung Opacity / Not Normal"→no_opacity/"Lung Opacity"→lung_opacity/"Normal"→normal/
- The original
Training/folder is deleted. - The downloaded ZIP file is removed.
A simplified version of the TACO dataset, focusing only on images that contain exactly one annotated object.
- Set of 1500 images
- Annotations which label images in 60 categories which belong to 28 super (top) categories.
- Multi object images
Since this project focusses on only single-object images, the following steps are applied:
annotations.jsonis loaded from the dataset directory or copied from the source if missing.- Annotations are parsed to extract
images,categories, andannotations. - A mapping is created from
category_idtosupercategory, and fromimage_idto its annotations. - Only images with exactly one object are kept, and paired with their
file_name,flickr_url, and supercategory. - Each valid image is downloaded (if not already present) and saved in a folder named after its supercategory, using only the image filename.
A simplified version of the TACO dataset, focusing only on images that contain exactly one annotated object.
- A training set of 50000 images
- A test set of 10000 images
Since this project focusses on only single-object images, the following steps are applied:
- Only the test set is downloaded.
- Subfolders are created based on the classes of the dataset.
- The images are retrieved from the batches and stored in the correct subfolder.
- The batches are deleted
The trashnet dataset is used: https://github.com/garythung/trashnet?tab=readme-ov-file
- A set of 2527 images
- The dataset ZIP file is downloaded from a Google Drive link using
gdownif it doesn't already exist. - All files are extracted. The classes are subfolders already, so nothing to adjust there.