AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.65k stars 7.96k forks source link

issue detecting object which are trained on stereo cameras images #1673

Open AvaniPitre opened 5 years ago

AvaniPitre commented 5 years ago

Hi @AlexeyAB I have trained images taken from both stereo cameras by marking accurately but while detecting Its detect cam1 image (LHS) correctly other cam2(RHS) which is slightly crossed (as taken from some angle)is not been detected properly.. for all test cases same problem I have trained using yolov2-tiny-obj.cfg. my camera parameters are 1) Distance between cameras [mm] 146 mm 2) Angle between cameras [deg] - 10 deg 3) Focal length [mm] 25 mm do I have to set angle parameter in cfg? do we need to set some specific parameters to be set in cfg for training images obtained from stereo cameras? Please guide thanks

AlexeyAB commented 5 years ago

@AvaniPitre Hi,

cam2(RHS) which is slightly crossed (as taken from some angle)is not been detected properly.. for all test cases same problem

How much the detection displaced in pixels?

do I have to set angle parameter in cfg?

No, angle-parameter doesn't work for Yolo currently.

do we need to set some specific parameters to be set in cfg for training images obtained from stereo cameras?

Do you want to get Distance between camera and object by disparity calculation between two bounded boxes that are detected by two cameras? Or do you want just increase accuracy by concatenation bounded boxes from 2 cameras?

May be you should (pre-process) do camera callibration and image rectification in the same way as for StereoBM in the OpenCV: https://github.com/opencv/opencv/blob/master/samples/cpp/stereo_calib.cpp

AvaniPitre commented 5 years ago

thanks for quick reply Or do you want just increase accuracy by concatenation bounded boxes from 2 cameras? yes. Increasing accuracy is more important for me after that comes the calculating distance.

AlexeyAB commented 5 years ago

Or do you want just increase accuracy by concatenation bounded boxes from 2 cameras? yes. Increasing accuracy is more important for me after that comes the calculating distance.

In this case you shouldn't do camera callibration and image rectification.

Just use images from both 1 and 2 cameras for Training dataset. In any cases there will be disparity for the same object between these 2 cameras.

AvaniPitre commented 5 years ago

Yes thanks.. I will try focusing on training