Skip to content

๐Ÿ‘ฉโ€๐Ÿ”ง Convert OpenImages format to TensorFlow-friendly format (converting to VOC with sturcture improvements โœจ)

License

Notifications You must be signed in to change notification settings

asmaamirkhan/OpenImagesTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŒ OpenImages Tool

A tool to convert OpenImages dataset format to TensorFlow-friendly format;

  • โžฐ Convert .txt to .xml (VOC) format
  • ๐Ÿš€ Make directory structure suitable to be used in TensorFlow custom object training
  • ๐Ÿ‘ฉโ€๐Ÿ’ป Use presented Code Snippets for other organizing operations
    • string_replacer
    • xml_replacer
    • file_renamer

๐Ÿ—๏ธ Required Directory Structure

Dataset
|___ validation
|    |___ <object_name>
|          |___ Label
|          |    |___ <validation_label_file_name>.txt
|          |    |___ ....
|          |___ <validation_image_file_name>.jpg
|          |___ ....
|
|___ test
|    |___ <object_name>
|          |___ Label
|          |    |___ <validation_label_file_name>.txt
|          |    |___ ....
|          |___ <validation_image_file_name>.jpg
|          |___ ....
|
|___ train
     |___ <object_name>
           |___ Label
           |    |___ <validation_label_file_name>.txt
           |    |___ ....
           |___ <validation_image_file_name>.jpg
           |___ ....

๐Ÿ“ข validation, test, train and Label are required fix keywords

๐ŸŽ‰ Result Directory Structure

images
|___ test
|    |___ <object_name>_test_<id>.xml
|    |___ <object_name>_test_<id>.jpg
|    |___ ....
|
|___ train
     |___ <object_name>_train_<id>.xml
     |___ <object_name>_train_<id>.jpg
     |___ ....

๐Ÿ‘ฉโ€๐Ÿ’ป Usage

  1. Clone this repository
  2. Organize your data to be like the required
  3. Open src folder in CMD
  4. Run:
 src> python script.py -i <INPUT_PATH> -o <OUTPUT_PATH>

๐Ÿ‘ฎโ€โ™€๏ธ This command will add validation set to training set folder, if you want to disable this behavior then run:

 src> python script.py -i <INPUT_PATH> -o <OUTPUT_PATH> -v

๐Ÿ‘€ To see running options, run:

src> python script.py -h

๐Ÿ“– References

๐Ÿ’ผ Contact & Support

Find me on LinkedIn and feel free to mail me, Asmaa ๐Ÿฆ‹

About

๐Ÿ‘ฉโ€๐Ÿ”ง Convert OpenImages format to TensorFlow-friendly format (converting to VOC with sturcture improvements โœจ)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages