计算机视觉caffe之路第五篇:关于ssd_detect.cpp的使用方法

10 篇文章 0 订阅
3 篇文章 0 订阅

1.ssd_detect.py的使用

在caffe/examples/ssd下有很多python版本的目标检测文件可用:

ssd_detect.py
ssd_pascal_webcam.py
ssd_pascal_video.py

用python方法进行detect比较简单,但根据目前使用情况来看,速度较慢,在Jetson TX1下,执行

# Forward pass.
detections = net.forward()['detection_out']

这一行需要300~500ms,效果不理想。

2.ssd_detect.cpp的使用

1)按照教程 计算机视觉caffe之路第一篇:Ubuntu16.04_Jetson TX1_Caffe_ssd环境配置配置后,在caffe/.build_release/examples/ssd/目录下可以找到:

ssd_detect.bin

使用该文件可以进行目标检测:

// Usage:
//    ssd_detect [FLAGS] model_file weights_file list_file
//
// where model_file is the .prototxt file defining the network architecture, and
// weights_file is the .caffemodel file containing the network parameters, and
// list_file contains a list of image files with the format as follows:
//    folder/img1.JPEG
//    folder/img2.JPEG
// list_file can also contain a list of video files with the format as follows:
//    folder/video1.mp4
//    folder/video2.mp4
  ./build/examples/ssd/ssd_detect.bin \
  models/VGGNet/VOC0712/SSD_300x300/deploy.prototxt \
  models/VGGNet/VOC0712/SSD_300x300/VGG_VOC0712_SSD_300x300_iter_120000.caffemodel \
  examples/videos/test.txt \
  --file_type video \
  --out_file output.txt \
  --confidence_threshold 0.4

2)修改ssd_detect.cpp并编译:
这里写图片描述



参考文献:

How to use the ssd_detect.cpp to detect objects in a image
How to compile ssd_detect.cpp

关于ssd_detect.cpp

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值