Skip to content

Files

Latest commit

d21f5ef · May 11, 2023

History

History
This branch is up to date with BecayeSoft/Gun-Detection-Project:main.

model

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023
May 11, 2023

Guns Detection with YOLOv8

A model that is able to detect guns in images and videos.

  • Build the model (YOLOv8 Ultralytics | Python)
  • Integrate the model to the bakcend (Flask API)
  • Build the front end application (Angular)
  • Freeze requirements

Setup

Clone the project

git clone https://github.com/BecayeSoft/Guns-Detection-YOLOv8

Install the requirements

pip install -r requirements.txt

Understanding the Code

main.py

main.py loads the dataset from Roboflow using a DataFlow.py object, train a YOLOv8 model using Model.py on the dataset, and exports the model.
Finally, it logs the model to Comet using Monitor.py.

ImageDownLoader.py

A class that contains methods to download images from Google, unsplash and pixabay.

download_image.py

A script that download images using ImageDownLoader.py.

DataFlow.py

A class to load the dataset from Roboflow.
Additionally, it contains two methods to load a Roboflow model trained on a specific version of the dataset, and another method to make inference.
These two were never used.

Model.py

A class that contains everything to build the model.
Model.py contains methods to load or train the model, make inferences, export the model and more.

Monitor.py

A class to monitor the model's performances using Comet.
Monitor.py contains methods to log the hyperparameters, the performance metrics and to upload the model.

By default, the model is automatically logged to Comet. This class allows us to create custom logs.

Model Graph

Model