cloud-annotations / object-detection-react

⚛️ Real-Time Custom Object Detection with TensorFlow.js
MIT License
255 stars 108 forks source link

How to use detection for static images by uploading them? #37

Closed NSTiwari closed 3 years ago

NSTiwari commented 3 years ago

The app is great in real-time. How can it be tweaked to detect objects in static images uploaded by the user?

bourdakos1 commented 3 years ago

Thanks :)

Check out the SDK there are instructions on how to use it: https://github.com/cloud-annotations/javascript-sdk

brony28 commented 3 years ago

Hello @bourdakos1 , I tried using the SDK and it's showing the proper result in browser's Console Panel. But there is no bounding box appearing on the detected object.

bourdakos1 commented 3 years ago

Ah, yea you would need to draw the bounding boxes yourself somehow. I normally use a <canvas> element which has strokeRect as part of its API: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeRect

brony28 commented 3 years ago

Oh Yes. It worked. Thank you, Sir.