Realtime Object Detection application on browser. Serving YOLOv8 in browser using tensorflow.js
with webgl
backend.
Setup
git clone https://github.com/afidzulinn/web-view-infusion.git
cd web-view-infusion
npm install
Scripts
npm start # Start dev server
YOLOv8l cutom trained model converted to tensorflow.js.
used model : yolov8l
Use another model
Use another YOLOv8 model.
-
Export YOLOv8 model to tfjs format. Read more on the official documentation
from ultralytics import YOLO model = YOLO("yolov8l.pt") model.export(format="tfjs")
-
Copy
yolov8*_web_model
to./public
-
Update
modelName
inApp.jsx
to new model name... // model configs const modelName = "yolov8*"; // change to new model name ...
-
Done
Please update src/utils/labels.json
with your new classes.