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

Use with model based on ssd_mobilnet dataset? #14

Closed Tameli closed 4 years ago

Tameli commented 4 years ago

Hi @paul-pias

Is it possible to execute your script with a model that was trained with TensorFlow and the "ssd_mobilenet_v2_quantized_coco" dataset? The format of the model is .pb as well. I tried it by changing the path to the model and the labelmap in your "objDet_utils.py" script(line 15 and 18). But I get a "NoneType: none" exception in line 102 of your "object_detection.py" script. I would be very grateful for your help! (I'm using my webcam, so changed id to 0)

OS: Windows 10 TF: 1.15.0 Python: 3.5.5

paul-pias commented 4 years ago

Can I see what is the outputs you are getting from the model? You may use the Distance Measurement formula as long as you get the bounding boxes from your model. But for running the object detection part using the TensorFlow model and draw the bounding boxes you might have to change a lot of code.

Tameli commented 4 years ago

Hi @paul-pias

I followed your advice and used your formula for the distance in my object detection script and it works! Thank you! The output of my model are the coordinates of the bounding boxes.