This a simple Object Detection App working on browser using Flask and YOLOv3. The user can select any image and the app will visualise an image with results together with a list of detected objects and a counter showing the total number of deteted objects.
The object detection based on YOLOv3
YOLOv3 320x320 from Darknet Weights are available at YOLOv3 Weights
The configuration file used from cfg File The labels for COCO are used from coco names
Note Download the model weights and save it under data/model/
as yolov3.weights
before running the App
Making the app run locally, the dependencies shall be created in a virtual enviorment as follows:
Create an enviorment for the app using
conda env create -f environment.yml
The complete enviorment is listed under the file environment_all.yml
Create the virtual enviorment and install the required libraries from requirements.txt
pip install -r requirements.txt
/show_image
Used to visualise the uploaded image
/detect_object
Used to perform object detection using YOLOv3
Run the app in Debug Mode
flask --app flask_object_detection_app --debug run
OR
python flask_object_detection_app.py
- Build the Docker Image
Build the image with docker build -t odapp .
- Run the app in Docker
After sucessful building, run the docker
docker run -ti --rm -p 5000:5000 odapp
and open a browser in the host machine http://localhost:5000/
to visualise the app.
You can select the image in this page
Developed from the tutorial from Thinkinfi