A for Apple, B for Banana, O for Orange. 在mac上用tensorFlow的model训练苹果、香蕉、橘子识别器。
训练环境和方法请看TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-On-Macos。
abo的图片和标记数据。
train目录是训练图片和标记,test是测试集。
- xml_to_csv.py 用于将标记数据装换为csv文件
- generate_tfrecord.py 用于将csv文件转为tfrecord文件
- Object_detection_webcam.py 用于通过摄像头测试
在object_detection目录下执行
python model_main.py
--pipeline_config_path=/Users/sheldon/pythonProjects/py3venv/kaggle/faster_rcnn_inception_v2_pets.config
--model_dir=/Users/sheldon/pythonProjects/py3venv/kaggle/fruit-images
--alsologtostderr
在object_detection目录下执行
python export_inference_graph.py --input_type image_tensor --pipeline_config_path /Users/sheldon/pythonProjects/py3venv/kaggle/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix /Users/sheldon/pythonProjects/py3venv/kaggle/fruit-images/model.ckpt-2132 --output_directory /Users/sheldon/pythonProjects/py3venv/kaggle/fruit-images/graph
在object_detection目录下执行
python /Users/sheldon/pythonProjects/ABO-detector/Object_detection_webcam.py
在tensorflow目录下执行bazel build tensorflow/tools/graph_transforms:summarize_graph
TensorFlow lite Object detection
https://www.quantumobile.com/mobile-object-detector-with-tensorflow-lite/
inception: 输入Placeholder,输出final_result
mobilenet: 输入input_image,输出MobilenetV1/Predictions/Softmax