要求已经安装好了CUDA 8.0 以及OpenCV3.1.0

YOLO官方网站

配置darknet

git clone https://github.com/pjreddie/darknet
cd darknet
make

如果没有报错输入

./darknet  

得到输出

./darknet <function>  

说明darknet配置成功

打开Makefile文件,将开头几行改为

GPU=
CUDNN=
OPENCV=

接着查询自己GPU的计算能力,查看Makefile是否包含,如下我的GPU计算能力为6.1,调整后为:

ARCH= -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=[sm_50,compute_50] \
-gencode arch=compute_61,code=[sm_61,compute_61] \
-gencode arch=compute_52,code=[sm_52,compute_52]

之后重新编译,就可以实现基于cuda和opencv的编译

下载预训练文件

wget https://pjreddie.com/media/files/yolo.weights  

测试

./darknet detect cfg/yolo.cfg yolo.weights data/dog.jpg  

我得到的结果是:

layer     filters    size              input                output
conv x / x x -> x x
max x / x x -> x x
conv x / x x -> x x
max x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
max x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
max x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
conv x / x x -> x x
max x / x x -> x x
conv x / x x -> x x1024
conv x / x x1024 -> x x
conv x / x x -> x x1024
conv x / x x1024 -> x x
conv x / x x -> x x1024
conv x / x x1024 -> x x1024
conv x / x x1024 -> x x1024
route
conv x / x x -> x x
reorg / x x -> x x
route
conv x / x x1280 -> x x1024
conv x / x x1024 -> x x
detection
mask_scale: Using default '1.000000'
Loading weights from yolo.weights...Done!
data/dog.jpg: Predicted in 0.070790 seconds.
dog: %
car: %
truck: %
bicycle: %
init done
opengl support available

最新文章

  1. 微信 JSSDK .NET版
  2. HDU2602 (0-1背包问题)
  3. Sicily 1936. Knight Moves
  4. 关于MAX()函数的一点思考
  5. 自己常用vs code 插件
  6. selenium&#160;win7+selenium2.0+python环境搭建
  7. &lt;T extends Comparable&lt;? super T&gt;&gt;什么意思
  8. eslint简单的规范
  9. n 中选 m —— 随机采样的艺术
  10. YCSB性能测试工具使用(转)
  11. Web APi之HttpClient注意事项以及建议
  12. DNS服务器原理介绍(一)
  13. C#简单的四位纯数字验证码
  14. [整理]SQL Server Reporting Services Charts
  15. Java容器概述
  16. iOS:Core Data 中的简单ORM
  17. EasyFastCMS系列教学课程——2、底层代码 ModelHelper与SQLHelper简介
  18. 【洛谷 P1363】幻想迷宫(搜索)
  19. leetcode练习之No.7------ 翻转整数reverse_integer
  20. Chapter 18 MySQL NDB Cluster 7.3 and NDB Cluster 7.4渣翻

热门文章

  1. Java中的Constants类
  2. 25-从零玩转JavaWeb-抽象类
  3. 查询sqlserver数据库视图、存储过程等包含特定的字符串
  4. SaeMail使用示例
  5. Map集合的关联数组实现
  6. HttpSession相关API
  7. IDEA小技巧:添加代码快捷方式
  8. SVG素材整理(原)
  9. 编写高质量代码改善C#程序的157个建议——建议40:使用event关键字为委托施加保护
  10. Bitmap压缩到指定尺寸大小,获取圆角、圆形图片