Test with Ubuntu 14.04, Tensorflow 1.4.
To Run Model
Follow Installation to prepare environment before running.
Path of Installation: object_detection/g3doc/installation.md
Note
Protobuf should be 2.6 version, you can get version by protoc --version, upgrade Protobuf by website: http://blog.csdn.net/sparkexpert/article/details/73456767 .
To Train Model
Look at my note in chinese for details.
Link:https://pan.baidu.com/s/1i5epSVj
Password:b60y
To Use Own Model
- cd to
my_workspace/object_detection, input:protoc object_detection/protos/*.proto --python_out=. - open
.bashrcand addexport PYTHONPATH=/home/zj/my_workspace/object_detection:$PYTHONPATH - cd to
my_workspace/object_detectionto test installation of own model, input:python object_detection/builders/model_builder_test.py
Load images to detect.
Modify from tensorflow/models/research/object_detection/object_detection_tutorial.ipynb.
Use skimage.io to read image which is faster than PIL.
Load images to detect.
Contain a class of object_detection named DetectImage.
Note: Before using DetectImage, OBJECT_DETECTION_PATH, PATH_TO_CKPT, PATH_TO_LABELS and NUM_CLASSES should be modified.
Load a video or camera to detect.
Note:
- OpenCV with ffmpeg is needed.
OBJECT_DETECTION_PATHshould be set in 'object_detection_video.py'- Some parameters need to modify, you can find them all in DetectVideo class.
Some parameters need to modify, you can find them at the head of file which labeled as # modify.
Some .config files write by me.
Copy from Tensorflow Object Detection API in tensorflow/models and add my own codes.
Some logs for training.