AndreyGermanov / yolov8_inference_video_javascript

Detect objects in images in a web browser using the YOLOv8 neural network
GNU General Public License v3.0
28 stars 11 forks source link

YOLOv8 object detection in videos in a web browser

This is a web interface to YOLOv8 object detection neural network that allows to run object detection right in a web browser without any backend using ONNX runtime.

This is a source code for a "How to detect objects in videos in a web browser using YOLOv8 neural network and JavaScript" tutorial.

Install

Clone this repository: git clone git@github.com:AndreyGermanov/yolov8_inference_video_javascript.git

Download the last version of the "ort-wasm-simd.wasm" from here: https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort-wasm-simd.wasm to the root of the repository.

Run

You need to run index.html using any local webserver, for example internal webserver of Visual Studio Code. Ensure that the ONNX runtime library ort-wasm-simd.wasm, the model file yolov8n.onnx and the sample.mp4 video file exist in the same folder with index.html.

Using the interface, you can press "Play" button to start object detection on the sample video.