使用mobilenet_v1---使用SSD-MobileNet训练模型

使用mobilenet_v1训练mobilenet
主要参考了[1],还是很详细的,跟着教程来可以很容易跑起来,有几个问题需要注意


★执行命令路径举例
cd /host/models/research/
protoc object_detection/protos/*.proto --python_out=.
export PYTHONPATH="${PYTHONPATH}:/host/models:/host/models/research/slim/"
python setup.py build
python setup.py install
★protoc安装
apt-get install protobuf-compiler libprotobuf-dev libprotoc-dev
apt-get install libprotobuf-c0-dev protobuf-c-compiler
★错误 object_detection/protos/model.proto:12:5: "Ssd" is not defined.
1.下载https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
2.unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
3. cd protoc3 | cd bin | chmod +x protoc |export PATH=$PATH:/host/protoc3/bin
4. protoc 要编译的
★解压数据集的时候出现错误
gzip: stdin: not in gzip format tar.gz
使用 $ tar -xvf xxxx.tar.gz 命令
★出现错误
ValueError: Tensor conversion requested dtype string for Tensor with dtype float32: 'Tensor("arg0:0", shape=(), dtype=float32)'
查看ssd_mobilenet_v1_pets.config的数据集record是否对得上


可以参考我将我分享的这个东西直接放到models/research/object detection中,直接

python object_detection/train.py --train_dir object_detection/train --pipeline_config_path object_detection/ssd_model/ssd_mobilenet_v1_pets.config

就可以运行

链接:https://pan.baidu.com/s/12YbCbGej4X_PRoChHxWrHA 密码:ymif

[1] 非常好的一个跑mobilenet_v1的例子 

-----------------------------------------------------------------------------------------------


猜你喜欢

转载自blog.csdn.net/andeyeluguo/article/details/80896045