Install the framework according to the tutorial on the official website of Darknet. According to your own conditions (NVIDIA graphics card driver has been installed, cuda9.0 cudnn7.1), modify GPU = 1 cudnn = 1 opencv = 1 in the makefile file, then make again, and then download yolov3 After weights, then use the test command provided on the web page to test.
darknet: ./src/cuda.c:36: check_error: Assertion `0' failed.
The result is an error: memory overflow.CUDA Error: out of memory
darknet: ./src/cuda.c:36: check_error: Assertion `0′ failed.
abort (core dumped) then modify yolov3.0 in the CFG folder Cfg file, original yolov3 The cfg file starts with:
[net] # Testing #batch=1 #subdivisions=1 # Training batch=64 subdivisions=16
Amend to read:
[net] # Testing batch=1 subdivisions=1 # Training #batch=64 #subdivisions=16
Batch can greatly reduce the amount of memory. If there is still insufficient memory in the above way, there are only two solutions, either use a smaller model or change yolov3.0 in the CFG directory The height and width values of CFG lines 8 and 9 are changed to 416 in width and height, and the test will be OK. Modified Yolo.cfg file:
no problem if you test again.