Git link for pretrained mode --
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
Look at time, accurecy trade-off and choose wisely.
Git link of tutorial, Clone and merge with tenserflow object_detection -- https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
compile .proc file --
protoc --python_out=. ./object_detection/protos/*.proto
Adding to python path
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
python setup.py build
python setup.py install
-
sudo apt-get install pyqt4-dev-tools
-
pip install labelImg
-
labelImg
lable all of your Images from test and train folder.
python xml_to_csv.py
- Label in big size picture *
run resize.py , pandas_csv.py to change you labeling and Image appropriately
modify "class_text_to_int(row_label)" in generate_tfrecord.py
python generate_tfrecord.py --csv_input=images/train_labels.csv --image_dir=images/train --output_path=train.record
python generate_tfrecord.py --csv_input=images/test_labels.csv --image_dir=images/test --output_path=test.record
the changes you made in generate_tfrecord.py just copy json to labelmap.pbtxt and save in training folder.
from models/research/object_detection/samples/configs copy appropriate config file
modify that file and save into training folder
some modification -:
- fine_tune_checkpoint : "C:/tensorflow1/models/research/object_detection/faster_rcnn_inception_v2_coco_2018_01_28/model.ckpt"
- input_path : "C:/tensorflow1/models/research/object_detection/train.record"
- label_map_path: "C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt"
- input_path : "C:/tensorflow1/models/research/object_detection/test.record"
- label_map_path: "C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt"
Thank you... 7) num_examples using test images
python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
C:\tensorflow1\models\research\object_detection>tensorboard --logdir=training
python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training/model.ckpt-XXXX --output_directory inference_graph
Object_detection_webcam.py and edit NUM_CLASSES = 6