Giter Club home page Giter Club logo

apocalypse0121 / yolov7-mbg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luisaugustos/yolov7-mbg

0.0 0.0 0.0 32.22 MB

Detect mosquito breeding grounds with YOLOv7 and Transformer Prediction Head. Based on a custom dataset of 5,094 annotated images from SMT Lab (UFRJ), this algorithm can detect breeding sites in real-world scenarios. Developed for a conference challenge.

License: GNU General Public License v3.0

Shell 0.01% Python 1.19% Jupyter Notebook 98.80% Dockerfile 0.01%

yolov7-mbg's Introduction

Automatic Detection of Mosquito Breeding Grounds

This project aims to detect mosquito breeding grounds using YOLOv7 with a Transformer Prediction Head (Swin Transformer) using pre-trained weights based on VISDRONE dataset. The dataset used consists of a subset of videos 2, 6, 9, and 12 from the Mosquito Database, which has been pre-processed and augmented.

Dataset

The dataset used for training consists of 5094 images, which have been resized to from 3840x2160 to 1536x864 and/or 640x640 (two versions) and augmented with the following settings:

  • Outputs per training example: 2
  • Bounding Box Rotation: Between -15° and +15°
  • Bounding Box Shear: ±15° Horizontal, ±15° Vertical

The pre-processed dataset is available at https://universe.roboflow.com/luis-augusto-silva-bq4bv/mosquito-suh0p/dataset/1.

Classes

This model identify 6 classes

  • bottle
  • bucket
  • pool
  • puddle
  • tire
  • water tanks

Requirements

To run this project, you will need:

  • Python 3.x
  • PyTorch
  • OpenCV
  • YOLOv7

Install

You can install the required packages by running:

$ git clone https://github.com/luisaugustos/YOLOv7-MBG
$ cd YOLOv7-MBG
$ pip install -r requirements.txt

Usage

To use the pre-trained model for mosquito breeding ground detection, you can run the following command:

$ python3 detect.py --weights runs/train/yolov7x_ep300_bs20_mosquito_first9/weights/best.pt --conf 0.25 --img-size 640 --source /Users/luisaugustos/Downloads/dataset_mosquito/video10.avi

Train

train.py allows you to train new model from strach.

$ python3 train.py --name yolov7x_ep300_bs20_mosquito_first --batch 16 --workers 4 --epochs 300 --data mosquito-1/data.yaml --weights yolov7x_training.pt --cfg cfg/training/yolov7x.yaml

Results

Class Images Labels P R [email protected]
all 404 1229 0.937 0.842 0.884
bottle 404 101 0.841 0.525 0.58
bucket 404 161 0.974 0.924 0.969
pool 404 116 0.943 0.879 0.924
puddle 404 25 0.926 0.96 0.949
tire 404 189 0.958 0.837 0.914
water tanks 404 637 0.978 0.925 0.969

Confusion Matrix F1 Curve

Training results

Results

Acknowledgements

This project was inspired by the Mosquito Database and built on top of the YOLOv7 implementation.

Special Thanks to @elloza and your big server. Thanks to all friends from ESALAB Team too.

References

Thanks to their great works

yolov7-mbg's People

Contributors

luisaugustos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.