https://github.com/coolmunzi/tensorflow2_object_detection_utils
This repo contains files useful for data preparation for model training using Tensorflow 2 object detection API
https://github.com/coolmunzi/tensorflow2_object_detection_utils
Last synced: over 1 year ago
JSON representation
This repo contains files useful for data preparation for model training using Tensorflow 2 object detection API
- Host: GitHub
- URL: https://github.com/coolmunzi/tensorflow2_object_detection_utils
- Owner: coolmunzi
- Created: 2020-12-19T10:40:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-19T18:26:53.000Z (over 5 years ago)
- Last Synced: 2025-01-21T00:50:51.005Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo contains utility scripts that will be useful during data processing for tensorflow object detection model training.
There are 3 scripts in the repo:
1. **generate_labelmap.py**: Script to convert txt based class names to labelmap of pbtxt type.
Usage: `python generate_labelmap.py -i {Path to class-names.txt file} -o {Path where output labelmap file should be saved}`
Example: `python generate_labelmap.py -i ./class-names.txt -o ./labelmap.pbtxt`
2. **generate_csv.py**: Script to generate a combined csv file from Pascal VOC based xml files
Usage: `python generate_csv.py -x {Path to directory containing xml file} -o {Path where output csv file should be saved}`
Example: `python generate_csv.py -x ./annotations/ -o ./output_csv.csv`
2. **generate_tfrecord.py**: Script to generate a tfrecord file from csv file
Usage: `python generate_tfrecord.py --csv_input {Path to combined csv file} --image_dir {Path to directory containing jpg or png image dataset} --output_path {Path of the output tfrecord file should be stored} --class_path {Path of the txt file containing names of classes}`
Example: `python generate_tfrecord.py --csv_input ./class-names.txt --image_dir ./images/ --output_path ./data.tfrecord --class_path ./class-names.txt`