How does AI bounding box detection work?

? Learn in 30 seconds

It looks so simple when AI does it right?

But the AI doesn’t give you an image, it gives you data. It’s up to you to make it look simple. The results you get are presented in a way so you can choose specific items fr…


This content originally appeared on DEV Community and was authored by Gant ℒ??ℴ??ℯ

? Learn in 30 seconds

It looks so simple when AI does it right?

But the AI doesn't give you an image, it gives you data. It's up to you to make it look simple. The results you get are presented in a way so you can choose specific items from all the returned results.

Object Detection Balloon

You might think a box gives you four values, and you're right, but it only gives you TWO points. From that you can infer a box to draw that identifies the object.

Object Detection Math 2 points

However... it very rarely gives you one box. Lots of times you get a whole bunch of boxes for you to chose from.

This is because the model is often trained to return X results no matter what, and sometimes it's meant to detect a whole wide array of objects, not just one.

Overlap Object Detection

Many boxes are identified by what they are detecting, like people or tables etc. But you might have a photo with three people in it, and it returns 30 people boxes. Each of these boxes generally give you a score of confidence, and it's your job to identify if they are identifying the same object, or separate objects.

There's some well known algorithms to take the best of the best.

Object Detection Scores

Once you have the boxes you're interested in, you can draw them easily with a canvas. In JavaScript you just overlay a canvas on the image and draw rectangles there.

Detection overlay in JavaScript Web

The final result lets you draw clean object detection on websites. It's pretty cool and easy to do this on images and video.

Object Detection with nonMaxSuppression

Want the code to do this? It's all in Chapter 6 of my book with a deep explanation.

Buy a copy of the book
Book Image

I'm looking forward to what you can do with your very own AI object detection! Don't forget to tag your cool stuff with the #MadeWithTFJS Hashtag on Twitter!

And don't forget to follow me for more AI tidbits like this!

Rock Paper Scissors in TensorFlow.js


This content originally appeared on DEV Community and was authored by Gant ℒ??ℴ??ℯ


Print Share Comment Cite Upload Translate Updates
APA

Gant ℒ??ℴ??ℯ | Sciencx (2021-08-13T16:29:49+00:00) How does AI bounding box detection work?. Retrieved from https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/

MLA
" » How does AI bounding box detection work?." Gant ℒ??ℴ??ℯ | Sciencx - Friday August 13, 2021, https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/
HARVARD
Gant ℒ??ℴ??ℯ | Sciencx Friday August 13, 2021 » How does AI bounding box detection work?., viewed ,<https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/>
VANCOUVER
Gant ℒ??ℴ??ℯ | Sciencx - » How does AI bounding box detection work?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/
CHICAGO
" » How does AI bounding box detection work?." Gant ℒ??ℴ??ℯ | Sciencx - Accessed . https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/
IEEE
" » How does AI bounding box detection work?." Gant ℒ??ℴ??ℯ | Sciencx [Online]. Available: https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/. [Accessed: ]
rf:citation
» How does AI bounding box detection work? | Gant ℒ??ℴ??ℯ | Sciencx | https://www.scien.cx/2021/08/13/how-does-ai-bounding-box-detection-work/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.