配置YOLO2(ubuntu16.04+cuda8.0+opencv3.1.0)
2024-08-28 08:31:58
要求已经安装好了CUDA 8.0 以及OpenCV3.1.0
配置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
最新文章
- 微信 JSSDK .NET版
- HDU2602 (0-1背包问题)
- Sicily 1936. Knight Moves
- 关于MAX()函数的一点思考
- 自己常用vs code 插件
- selenium&#160;win7+selenium2.0+python环境搭建
- <;T extends Comparable<;? super T>;>;什么意思
- eslint简单的规范
- n 中选 m —— 随机采样的艺术
- YCSB性能测试工具使用(转)
- Web APi之HttpClient注意事项以及建议
- DNS服务器原理介绍(一)
- C#简单的四位纯数字验证码
- [整理]SQL Server Reporting Services Charts
- Java容器概述
- iOS:Core Data 中的简单ORM
- EasyFastCMS系列教学课程——2、底层代码 ModelHelper与SQLHelper简介
- 【洛谷 P1363】幻想迷宫(搜索)
- leetcode练习之No.7------ 翻转整数reverse_integer
- Chapter 18 MySQL NDB Cluster 7.3 and NDB Cluster 7.4渣翻