darknet: ./src/utils.c:256: error: Assertion `0' failed.

1.darknet: ./src/utils.c:256: error: Assertion `0' failed.
Aborted (core dumped)

2.darknet: ./src/cuda.c:36: check_error: Assertion `0' failed.
Aborted (core dumped)

 

makefile文件更改:

GPU=1
CUDNN=1
OPENCV=0
OPENMP=0
DEBUG=0

ARCH= -gencode arch=compute_52,code=compute_52 \   #1060的算力5.2 GPU计算力不匹配的问题,建议修改,注意找到自己匹配的

下面的需要对应自己cuda文件路径:

NVCC=/usr/local/cuda/bin/nvcc

COMMON+= -DGPU -I/usr/local/cuda/include/
CFLAGS+= -DGPU
LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand

/darknet/cfg /yolov3.cfg中的更改如下:

# Testing
batch=1
subdivisions=1
# Training
#batch=64
#subdivisions=16

darknet目录下打开Terminal:

sudo ./darknet detector test cfg/coco.data cfg/yolov3.cfg weights/yolov3.weights data/dog.jpg

测试结果:

Loading weights from weights/yolov3.weights...Done!
data/dog.jpg: Predicted in 0.086322 seconds.
dog: 100%
0.291906 0.656983 0.232563 0.569755
truck: 92%
0.756160 0.217218 0.271333 0.151046
bicycle: 99%
0.448432 0.496669 0.637270 0.562252

没加GPU大概20s/帧,真的慢。加了GPU:20/0.086=233倍,真的可以啦!

 

参考:

1.https://blog.csdn.net/fanhongyuan21/article/details/81909994

2.https://blog.csdn.net/bufengzj/article/details/87917606

3.https://blog.csdn.net/csdn_zhishui/article/details/83751944

4.https://blog.csdn.net/fqlovetb/article/details/84393806 批量测试

5.https://www.cnblogs.com/pprp/p/10204480.html  darknet优化经验-AlexeyAB大神经验

6.https://blog.csdn.net/gaoyu1253401563/article/details/89388043YOLOV3检测目标,在显示类别的基础上再显示识别精度值

7.基于Python实现的IOU算法---最简单易懂的代码实现 - Kellbook的博客 - CSDN博客 https://blog.csdn.net/qq_30622831/article/details/85144849#comments?tdsourcetag=s_pcqq_aiomsg

你可能感兴趣的:(工具箱,深度学习,yolov3,目标检测)