Skip to content

COCO dataset to Yolo format annotations and images downloader, also Negatives categories can be downloaded too.

License

Notifications You must be signed in to change notification settings

maldivien/Coco-to-yolo-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COCO to Yolo Downloader (Images, Annoatations, Negatives)

  • Downloads COCO dataset by multiple image categories in parallel threads, converts COCO annotations to YOLO format and stored in respective .txt files
  • Download Negative images which excludes the categories in categories_to_download.txt
  • Can include custom class numbers to be added to annoation, just add desired numbers to categories_to_download.txt
  • Can limit downloads based on per class

Requirements:

  • pip3 install pycococtools
  • COCO Dataset "instances_train2017.json" file from here

Run:

  • Update categories_to_download.txt file with category names and calss numbers that you want to add.
  • To download coco dataset with limit of 5000 images per class:
 python3 main.py -o download -l 5000
  • To download negatives from coco dataset with limit of 1000:
python3 main.py -o negatives -l 1000
  • By default annotations along with images are stored in annotations folder, you can change it here
  • Image download will be skipped if already exists. However, annotations will always be appended to the existing file so it's advisable to delete *.txt file before a re-run
  • Do not delete or modify coco-names.txt

About

COCO dataset to Yolo format annotations and images downloader, also Negatives categories can be downloaded too.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages