使用TransferLearning实现环视图像的角点检测——Tensorflow+MobileNetv2_SSD

环境说明

  • 依赖环境安装eIQ官方指南:
name: eiq_auto 
channels:
  - conda-forge
  - defaults
dependencies:
  - numpy=1.18.1=py36h4f9e942_0
  - onnx==1.6.0
  - opencv==4.2.0
  - pandas=0.24.2=py36he6710b0_0
  - pillow=7.0.0=py36hb39fc2d_0
  - protobuf=3.9.2=py36he6710b0_0
  - pytest=5.3.0=py36_0
  - python=3.6.10=h0371630_0
  - tensorflow=1.14.0=mkl_py36h2526735_0
pip:
   - onnxruntime==1.0.0

==================================================================================================

1.安装tensorflow object detection API

sudo apt-get install protobuf-compiler python-pil python-lxml python-tk
pip install --user Cython
pip install --user contextlib2
pip install --user jupyter
pip install --user matplotlib
  • 下载models
git clone https://github.com/tensorflow/models.git

-安装cocoAPI

pip install --user pycocotools
  • 使用Protobuf Compilation
protoc object_detection/protos/*.proto --python_out=.
  • 添加到PYTHONPATH
# From tensorflow/models/research/
export PYTHONPATH=$PYTHONPATH:/mnt/d/0-WORK/models/models-master/research:/mnt/d/0-WORK/models/models-master/research/slim
source ~/.bashrc
  • 注意以上绝对路径填正确
  • 测试是否完成
python object_detection/builders/model_builder_tf1_test.py
  • 如果出现以下结果表示API已成功安装:

2.下载mobilenetV2_SSD

猜你喜欢

转载自www.cnblogs.com/hayley111/p/12918678.html