Create a dataset for YOLO from existing database - WalkingMachine/sara_wiki GitHub Wiki

Acronyms

  • OID : open image dataset (google)

Tools

  • Train-YOLOv3-with-OpenImagesV4
  • OIDv4_ToolKit

Directory

  • ~/Github/OIDv4_ToolKits/OID/Dataset : Downloaded images from OID

Files

  • ~/Github/Train-YOLOv3-with-OpenImageV4/CSVheadstoTXT.py : convert xml to txt for Darknet

What to do ?

  1. Clone both repository
  2. On server :

Get DATAS

2.1. cd ~/Github/OIDv4_ToolKits
2.2. python3 main.py downloader --classes CLASSE1 CLASSE2 --type_csv all

Convert DATAS to .txt (darknet format)

2.3. cp ~/Github/OIDv4_ToolKit/CSVheadstoTXT.py ~/Github/OIDv4_ToolKit/OID/Dataset/train/CLASSE_NAME
2.3.1. ```mkdir ~/Github/OIDv4_ToolKit/OID/Dataset/train/yolotxt/CLASS_NAME

2.4. cd ~/Github/OIDv4_ToolKit/OID/Dataset/train/CLASS_NAME/
2.5. python3 CSVheadtoTXT.py CLASS_NAME CLASS_ID CLASS_NUMBER
2.5.1. Example : python3 CSVheadtoTXT.py Cupboard /m/0642b4 2

Transfer to DARKNET

2.6 Copy .jpg and .txt to a new folder with name class
2.7 Follow https://github.com/WalkingMachine/sara_wiki/wiki/Create-a-custom-dataset-(YOLO)