The value of knowledge lies not in possession, but in share.

0%

基于ROS测试Caffe MobileNet-SSD【通用】

在测试的过程中和群友们仔细的探讨了下,很快的解决了测试中遇见的一些细节问题,学东西还是尽量和周围的人一起学,毕竟老话说过“人多力量大!”。

自己一个人也不是不可以,但是往往要比很多人一起探讨花费两倍或者五六倍的时间,所以强烈建议要有那么几个共同学习的小圈子。

修改demo.py

1
2
# 设置成绝对路径
caffe_root = '/home/cong/catkin_ws/src/ros_caffe/caffe/'

修改solver_test.prototxt

有GPU,则不需要修改配置文件,如果没有GPU,则需要修改配置文件 solver_test.prototxt

1
2
3
# 将solver_mode:GPU 改为 solver_mode:CPU
# solver_mode:GPU
solver_mode:CPU

运行demo.py

1
2
cd catkin_ws/src/ros_caffe/caffe/examples/MobileNet-SSD/
python demp.py

在图像检测输出的界面,按回车或者其他按键,会检测下一张。

Debugs

1
2
3
4
# Bug
ImportError: No module named skimage.io
# Debug
pip install scikit-image
1
2
3
4
# Bug
ImportError: No module google.protobuf.internal
# Debug
pip install protobuf

完成上面安装步骤后,执行以下命令重新编译:

1
2
3
4
make clean
make -j8
make py
make test -j8

🍭支持一根棒棒糖吧!