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

how to implement to tiny yolo voc? #21

Open Voltress opened 4 years ago

Voltress commented 4 years ago

Hello there @paul-pias

This code is very interesting, any clue on how to implement object detection and distance measurement for yolotinyvoc, which i use with darkflow. Any suggestion? Thanks in advance

paul-pias commented 4 years ago

Any pull request is welcome. You may try changing the weight and cfg files to try on. But I would suggest you try new Object Detectors such as YOLOv4 or Yolact++.

Voltress commented 4 years ago

Thanks for your suggestion @paul-pias , but i want to ask you something more. In the formula distance = (2 3.14 180) / (w.item()+ h.item() 360) 1000 + 3, "w.item()+ h.item()" what do you mean w.item () + h.item (), do w and h be the width and height of the bounding box when detecting an object? or w and h is the frame size of the video / image used? dog Thanks in advance

paul-pias commented 4 years ago

.item() is a Pytorch function to retrieve values out of a PyTorch Tensor. You can see the documentation for reference.

The width and height used in the formula are from each object's bounding box. The size of the frame had been declared globally with the variables self.height and self.width.

HassanBinHaroon commented 2 years ago

Check out the following relevant and easiest implementation.

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