/webview-object-detection-app

Object detection application using webview and yolov5

Primary LanguagePython

Webview Object Detection Application

python pywebview opencv React Flask PyQt5

sample

Webview object detection application.

Features :

  • Detect local image
  • Live detection with webcam
  • Change YOLOv5 model, currently only support yolov5s and yolov5n models.
  • Specific detection, specific detection up to 10 items.

Supported Platforms

Platforms Tested Tested Web Engine
Windows Webview2 Edge Chromium and Qt
Linux [Debian based] Qt

Webview2 Edge Chromium will automatically be used on windows and Qt will automatically be used in linux. But if you want to use Qt in windows machine you can start by installing pywebview[qt] dependencies using this command

yarn install-dep pywebview[qt]

and change gui parameter to "qt" in src\main.py.

    ...
    webview.start(gui="qt", debug=DEBUG)
    ...

Setup

Clone this repo and run this commands on your terminal

yarn run init

that will install all dependencies to run the app.

Note : Please refer to installation guide and make sure all dependencies are set to run pywebview application.

Start the Application

On your terminal run this command

yarn start

Note : This template only support hot reload to apply changes in your frontend code you need but any changes on app/backend code you need to close and run the app again.

Build the Application

Build the application using this command

yarn build

This will build the application to production on publish directory.

Note : Please make sure to set

DEBUG = FALSE

in main.py before deploying the app for production.