CSI camera with darknet
Hi,
I want to use a CSI Camera with darknet, but I don't know how he can recognize this camera.
When I try a simple "./darknet detector demo" with yolov3-tiny, I get 3 warnings telling me about cap_gstreamer.cpp : -module v4l2src0 reported : internalt data stream error -unable to start pipeline -pipelin have not been created
then a "million lines" of : VIDIOC_QBUF: Invalid argument.
Sincerely,
What computer, webcam and OS are you using?
I suggest to test a simple camera capture program to be sure the camera works before doing darknet.
[edit] BTW, if you want to do Yolo on a Raspberry Pi, be prepared that it will be vvvvveeeeeeeeerrrrryyyyy slow!
I'm using a Jetson Nano with a derived version of Ubuntu 18.04 : L4T 32.3.1 I already tried the camera with others programs and it's working, I just don't know where it's possible to tell to darknet that I use a CSI camera.
If you have the OpenCV camera capture example working, just use the darknet API; replace the processing part (
cvtColor(...)
) in the example above with the darknet object detector:boxes = detector.detect(frame);
Of course, you'll need to add
#include <darknet/yolo_v2_class.hpp>
,Detector detector;
,std::vector<bbox> boxes;
and so on.I'm a begginer to this domain, if I understand well, I have to create a code that calls darknet with the API, and then I will be able to select the camera i'm using, with the help of openCV?
it's more the contrary. You create a code that reads camera frames in a loop (so you can be sure the camera works), then add a processing step for each frame, which in this case is object detection using Darknet. And you are lucky, as it's a single function call that does all the processing.