Object detection on browser with Yolo and Tensorflowjs

Updated 28 June 2021

In this tutorial, I am going to explain what is Yolo, why we are going to use Yolo and how can we run YOLO on a browser with tensorflowjs. Here I am using yolo-tiny model for detection on real-time. There are more models available you can try other than yolo-tiny model. let’s start:-

 

What is Yolo?

Yolo is an effective, fast, and accurate object detection algorithm.it is popular because of its high accuracy on the images but also runs in real-time. Yolo framework stands for You Only Look Once. it means that it requires only one forward propagation pass through the neural network to make predictions. in other words, the YOLO framework takes the entire image in a single instance and predicts the bounding box coordinates and class probabilities for these boxes. with YOLO a single CNN simultaneously predicts multiple bounding boxes. YOLO trains on full images and directly optimizes detection performance.

 

Benefits of YOLO: 

The biggest advantage of using YOLO is it is extremely fast it can process 30 frames per second. It looks at the whole image at test time so its predictions are informed by the global context in the image. It also makes predictions with a single network evaluation unlike systems like R-CNN which require thousands for a single image. This makes it extremely fast, more than 1000x faster than R-CNN and 100x faster than Fast R-CNN. See our paper for more details on the full system.

For more click here —

 

Implementation of YOLO with Tensorflowjs:

let’s start coding now-

index.html

 

index.js

 

package.json

Run the Project

you have to go through the project directory and run these commands

install the dependencies

build the project by yarn

to run our project on browser

 

See the result:

You can see the two images, top one is video and the last one is canvas where we are drawing video frame and drawing the bounding box.
I Hope This Blog Will Help You To Understand YOLO and object detection using Yolo and Tensorflowjs on the browser. Feel Free To Comment If Any Problem Or For Any Suggestions. for more blogs like this please check out here. Thank You

 

Reference

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


2 comments

  • Dai Software
    • Simant Verma (Moderator)
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home