Skip to content

Object Detection application right in your browser. Serving YOLOv5 in browser using tensorflow.js with webgl backend.

Notifications You must be signed in to change notification settings

TheSUNSRise/AnimalIdentification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Detection using YOLOv5 and Tensorflow.js

love tensorflow.js


Vue3 version of yolov5-tfjs


Object Detection application right in your browser. Serving YOLOv5 in browser using tensorflow.js with webgl backend.

Setup

git clone https://github.com/TheSUNSRise/AnimalIdentification.git
cd AnimalIdentification
npm install #Install dependencies

Scripts

npm run dev # Start dev server
npm run build # Build for productions

Model

YOLOv5n model converted to tensorflow.js.

used model : yolov5n
size       : 7.5 Mb

Use another model

Use another YOLOv5 model.

  1. Clone yolov5 repository

    git clone https://github.com/ultralytics/yolov5.git && cd yolov5

    Install requirements.txt first

    pip install -r requirements.txt
  2. Export model to tensorflow.js format

    export.py --weights yolov5*.pt --include tfjs
  3. Copy yolov5*_web_model to ./public

  4. Update modelName in animalIdentification -> index.vue to new model name

    ...
    // model configs
    const modelName = "yolov5*"; // change to new model name
    const classThreshold = 0.25;
    ...
  5. Done! 😊

Reference

https://github.com/Hyuto/yolov5-tfjs https://github.com/ultralytics/yolov5

About

Object Detection application right in your browser. Serving YOLOv5 in browser using tensorflow.js with webgl backend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published