Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Probleemstellingยถ

Bron: http://tacodataset.org/

Humans have been trashing planet Earth from the bottom of Mariana trench to Mount Everest. Every minute, at least 15 tonnes of plastic waste leak into the ocean, that is equivalent to the capacity of one garbage truck. We have all seen the impact of this behaviour to wildlife on images of turtles choking on plastic bags and birds filled with bottle caps. Recent studies have also found microplastics in human stools. These should be kept in the recycling chain not in our food chain. It is time for a revolution.

We believe AI has an important role to play. Think of drones surveying trash, robots picking up litter, anti-littering video surveillance and AR to educate and help humans to separate trash. That is our vision. All of this is now possible with the recent advances of deep learning. ...

Datasetยถ

/home/user/.cache/kagglehub/datasets/vencerlanz09/taco-dataset-yolo-format/versions/1

Data exploratieยถ

READMEโ€™sยถ

# TACO > YOLOv5
https://universe.roboflow.com/divya-lzcld/taco-mqclx

Provided by a Roboflow user
License: CC BY 4.0



TACO - v3 YOLOv5
==============================

This dataset was exported via roboflow.com on January 26, 2023 at 2:58 PM GMT

Roboflow is an end-to-end computer vision platform that helps you
* collaborate with your team on computer vision projects
* collect & organize images
* understand and search unstructured image data
* annotate, and create datasets
* export, train, and deploy computer vision models
* use active learning to improve your dataset over time

For state of the art Computer Vision training notebooks you can use with this dataset,
visit https://github.com/roboflow/notebooks

To find over 100k other datasets and pre-trained models, visit https://universe.roboflow.com

The dataset includes 6004 images.
Litter are annotated in YOLOv8 format.

The following pre-processing was applied to each image:
* Auto-orientation of pixel data (with EXIF-orientation stripping)
* Resize to 416x416 (Stretch)

The following augmentation was applied to create 2 versions of each source image:
* 50% probability of horizontal flip
* 50% probability of vertical flip
* Equal probability of one of the following 90-degree rotations: none, clockwise, upside-down



Annotatie formatยถ

The annotations are in YOLOv8 format. The documentation is available from the roboflow website: https://roboflow.com/formats/yolov8-pytorch-txt.

Meta dataยถ

{'names': ['Aluminium foil',
           'Bottle cap',
           'Bottle',
           'Broken glass',
           'Can',
           'Carton',
           'Cigarette',
           'Cup',
           'Lid',
           'Other litter',
           'Other plastic',
           'Paper',
           'Plastic bag - wrapper',
           'Plastic container',
           'Pop tab',
           'Straw',
           'Styrofoam piece',
           'Unlabeled litter'],
 'nc': 18,
 'roboflow': {'license': 'CC BY 4.0',
              'project': 'taco-mqclx',
              'url': 'https://universe.roboflow.com/divya-lzcld/taco-mqclx/dataset/3',
              'version': 3,
              'workspace': 'divya-lzcld'},
 'test': '../test/images',
 'train': '../train/images',
 'val': '../valid/images'}
['000055_jpg.rf.c6469959ba228f5f911bde1600d6aff1.jpg', '000087_JPG_jpg.rf.71ce4fddda8e920b59379c35e8618a5e.jpg', '000034_jpg.rf.35a8006a0042c68aa5954c6d64a9318f.jpg', '000086_jpg.rf.8c02a463d47c95b3bba22d7d44d01ed2.jpg', '000073_jpg.rf.9fbe4f1aea5e6e5f44cfcb000b6d9358.jpg']

Pandas DataFrameยถ

We create a DataFrame to explore the training, validation and test data.
Each image has a images/*.jpg and labels/*.txt counterpart.
We first compile a list of all the images so we can read in the corresponding label files.

['/home/user/.cache/kagglehub/datasets/vencerlanz09/taco-dataset-yolo-format/versions/1/test/images/000022_jpg.rf.e33fcd57a3224c626b7cc860963250cb.jpg', '/home/user/.cache/kagglehub/datasets/vencerlanz09/taco-dataset-yolo-format/versions/1/test/images/000000_jpg.rf.c74a32a1e0ac35591aa5f3279b58ee6f.jpg', '/home/user/.cache/kagglehub/datasets/vencerlanz09/taco-dataset-yolo-format/versions/1/test/images/000012_JPG_jpg.rf.4dbfff1565881144195a6859c139f37b.jpg', '/home/user/.cache/kagglehub/datasets/vencerlanz09/taco-dataset-yolo-format/versions/1/test/images/000003_jpg.rf.54d6dc93cee9ec59063f84d8cda515d9.jpg', '/home/user/.cache/kagglehub/datasets/vencerlanz09/taco-dataset-yolo-format/versions/1/test/images/000026_jpg.rf.550a0b51e8efb7564072f3289b829dec.jpg']

Next we build a dictionary of all labels

0 / 6004
1000 / 6004
1000 / 6004
2000 / 6004
2000 / 6004
3000 / 6004
3000 / 6004
4000 / 6004
4000 / 6004
5000 / 6004
5000 / 6004
6000 / 6004
6000 / 6004

Now we can create a Pandas DataFrame directly from the labels dictionary.

Loading...
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 18474 entries, 0 to 18473
Data columns (total 7 columns):
 #   Column    Non-Null Count  Dtype 
---  ------    --------------  ----- 
 0   img_path  18474 non-null  object
 1   subset    18474 non-null  object
 2   class_id  18474 non-null  object
 3   center_x  18474 non-null  object
 4   center_y  18474 non-null  object
 5   width     18474 non-null  object
 6   height    18474 non-null  object
dtypes: object(7)
memory usage: 1010.4+ KB
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 18474 entries, 0 to 18473
Data columns (total 7 columns):
 #   Column    Non-Null Count  Dtype  
---  ------    --------------  -----  
 0   img_path  18474 non-null  object 
 1   subset    18474 non-null  object 
 2   class_id  18474 non-null  int64  
 3   center_x  18474 non-null  float64
 4   center_y  18474 non-null  float64
 5   width     18474 non-null  float64
 6   height    18474 non-null  float64
dtypes: float64(4), int64(1), object(2)
memory usage: 1010.4+ KB

Distributionsยถ

Train-validation-testยถ

Loading...

Labelsยถ

Loading...

Example visualizationยถ

Loading...
<Figure size 640x480 with 1 Axes>

โš ๏ธ There seems to be a labelling error. Could we detect and remove anomalies with machine learning?

Loading...
Loading...

Check the largest example for a cigarette

<Figure size 640x480 with 1 Axes>

So simple area distributions will not work. Perhaps a simple rule system could help: if the same image contains a bottle and a bottle cap, the area of the latter should always be smaller.

Number of images with both Bottle and Bottle cap: 529
Number of images with a Bottle smaller than the largest Bottle cap: 529
Number of images with a Bottle smaller than the largest Bottle cap: 529
<Figure size 640x480 with 1 Axes>

Could it be that all bottle and bottle cap labels are switched?

<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>

We need to switch the labels in the meta data

['Aluminium foil', 'Bottle', 'Bottle cap', 'Broken glass', 'Can', 'Carton', 'Cigarette', 'Cup', 'Lid', 'Other litter', 'Other plastic', 'Paper', 'Plastic bag - wrapper', 'Plastic container', 'Pop tab', 'Straw', 'Styrofoam piece', 'Unlabeled litter']