Yolov5: Label error while training with 2017 coco dataset. labels missing

Created on 7 Aug 2020  路  5Comments  路  Source: ultralytics/yolov5

I downloaded the coco2017labels.zip from google drive and then unzipped it. When I tried to train the model with the entire coco dateset, the code reports error below that some images are missing in both train and val folder.

Optimizer groups: 62 .bias, 70 conv.weight, 59 other
Scanning labels ../coco/labels/train2017.cache (117266 found, 0 missing, 1021 empty, 0 duplicate, for 118287 images): 100%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻坾 118287/118287 [00:09<00:00, 13110.03it/s]
Scanning labels ../coco/labels/val2017.cache (4952 found, 0 missing, 48 empty, 0 duplicate, for 5000 images): 100%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻坾 5000/5000 [00:00<00:00, 13120.22it/s]

I checked the ../coco/labels/train2017 and ../coco/labels/val2017 and found they just contain 117266 and 4952 labels.

Is the label files missing?

Most helpful comment

@NanoCode012 @AlbertMP not all images require labels. COCO has over 1000 unlabelled images.

All 5 comments

Hello @AlbertMP, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

My coco dataset reports the same number of label files. Could you check that you downloaded the entirety of the dataset? Around 20 GB. Did you download using the get_coco2017.sh file?

My coco dataset reports the same number of label files. Could you check that you downloaded the entirety of the dataset? Around 20 GB. Did you download using the get_coco2017.sh file?

Yes. My train2017 folder contains 118287 pictures and val2017 folder contains 5000 pictures. It's the same as the number of dataset.
But some label files are missing I found when I unzipped the coco2017labels.zip file. That's why causing the problem I think.

You can check the number of label files, is yours equal to the number of pictures in train and val folders?

Train labels : 117266
Valid labels : 4952
Train pic : 118287
Valid pic : 5000

However, I can run the code without any problem. I am not sure if the lack of labels just means that there is nothing to be detected in a picture.

Edit : Do you have problem running the code?

@NanoCode012 @AlbertMP not all images require labels. COCO has over 1000 unlabelled images.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hktxt picture hktxt  路  3Comments

maykulkarni picture maykulkarni  路  3Comments

KangHoyong picture KangHoyong  路  3Comments

Alex-afka picture Alex-afka  路  3Comments

Single430 picture Single430  路  4Comments