robmarkcole / coral-pi-rest-server

Perform inferencing of tensorflow-lite models on an RPi with acceleration from Coral USB stick
https://coral.ai/products/accelerator
MIT License
67 stars 20 forks source link

Bounding boxes incorrect #62

Closed robmarkcole closed 2 years ago

robmarkcole commented 2 years ago

After my quick hacking to update to use pycoral the bounding boxes are incorrect - perhaps since the image is resized to (300, 300) before processing?

scho0ck commented 2 years ago

Do you have any idea how to fix this I'm currently looking into this as the newer library is much faster. BTW I actually use this on my BlueIris NVR with the offical DeepStack integration and apart from the bounding box issue on the pycoral version it's working fine.

robmarkcole commented 2 years ago

Options are: read new docs and find the change, or hack it

scho0ck commented 2 years ago

FYI

The scaling is fine that's handled by the scale variable however the object was wrong this works fine

                            "y_min": int(obj.bbox[1]),
                            "x_min": int(obj.bbox[0]),
                            "y_max": int(obj.bbox[3]),
                            "x_max": int(obj.bbox[2]),
robmarkcole commented 2 years ago

Excellent, could you make a PR to apply this fix? Thanks

robmarkcole commented 2 years ago

fixed