Open ant1pink opened 6 years ago
./darknet detector demo ./cfg/coco.data ./cfg/yolov2.cfg ./yolov2.weights videofile.mp4 -i 0 -thresh 0.25
@TheMikeyR Thanks. I tried, but I got the error “Demo needs OpenCV for webcam images”. And I tried to make with OpenCV =1, then I got "fatal error: opencv2/opencv.hpp: No such file or directory." I install OpenCV with pip install, how should I set the path?
Many thanks,
I find opencv.c and put the path in .bashrc, but I got a new error.
g++ -DOPENCV pkg-config --cflags opencv
-DGPU -I/usr/local/cuda-8.0/include/ -DCUDNN -Wall -Wfatal-errors -ffp-contract=fast -mavx -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn-8.0/include obj/http_stream.o obj/gemm.o obj/utils.o obj/cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/upsample_layer.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread pkg-config --libs opencv
-L/usr/local/cuda-8.0/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn-8.0/lib64 -lcudnn -lstdc++
/usr/bin/ld: cannot find -lippicv
collect2: error: ld returned 1 exit status
Makefile:110: recipe for target 'darknet' failed
make: *** [darknet] Error 1
You should compile opencv from source, you can e.g. follow this guide I have installed it without a virtual environment though.
@TheMikeyR Alright, I will have a try. At the moment, it works on official darknet but not this version.
@TheMikeyR Hi! can you explain me what does mean -i 0 here --> ./darknet detector demo ./cfg/coco.data ./cfg/yolov2.cfg ./yolov2.weights videofile.mp4 -i 0 -thresh 0.25
@AshleyRoth -i 0 equal to -gpu 0, if you have multiple you can use -gpu 0,1,2...
@TheMikeyR Can we test the video on multiple GPUs?
@ant1pink You can't test 1 video on multiple GPU. You can only train on multiple GPU.
@AlexeyAB Okay, thanks very much. One more question, I followed your suggestion here to save the demo video. When I change GPU from K80 to P100, the FPS increased from 6. to 25., however the FPS didn't change in the saved video.
@ant1pink This is done to avoid slowing the result videofile on slow GPU.
Hi guys,
Is there a way to test on video rather than video stream?
Thanks,