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 更改如下:
# 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大神經驗