paul-pias / Object-Detection-and-Distance-Measurement

Using yolov3 & yolov4 weights objects are being detected from live video frame along with the measurement of the object from the camera without the support of any extra hardware device.
348 stars 118 forks source link

Doubt regarding the distance estimation #24

Open Subhankar48 opened 4 years ago

Subhankar48 commented 4 years ago

The formula for the distance estimation is mentioned as distancei = (2 x 3.14 x 180) ÷ (w + h x 360) x 1000 + 3. I have a counterexample in mind. Please let me know if I have made a mistake. Suppose you take two objects, one much larger than the other. Place the smaller object close to the camera and the larger object far away from the camera while ensuring the fact that both the objects take up the same bounding box space in the camera. In this case, the distance estimate will be the same for both objects when one of them is in fact much farther than the other.

paul-pias commented 4 years ago

The example that you gave is completely dependent on the performance of the object detector you are using. For instance, many modern object detectors face problems while detecting large and medium objects. You can read my answers in Issue#16 and Issue#18.

HassanBinHaroon commented 2 years ago

Check out the following relevant and easiest implementation.

https://github.com/HassanBinHaroon/object_detection-PLUS-distance_estimation-v1