Coder Social home page Coder Social logo

akanametov / yolov7 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wongkinyiu/yolov7

0.0 0.0 0.0 48.46 MB

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

License: GNU General Public License v3.0

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

yolov7's Introduction

Official YOLOv7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

Performance

Model Test Size AP50test batch 1 fps batch 32 average time
YOLOv7-Tiny 640 98.7% 417 fps 2.4 ms

Installation

Docker environment (recommended)

Expand
# create the docker container, you can change the share memory size if you have more.
nvidia-docker run --name yolov7 -it -v your_coco_path/:/coco/ -v your_code_path/:/yolov7 --shm-size=64g nvcr.io/nvidia/pytorch:21.08-py3

# apt install required packages
apt update
apt install -y zip htop screen libgl1-mesa-glx

# pip install required packages
pip install seaborn thop

# go to code folder
cd /yolov7

Testing

yolov7-tiny-builder.pt

python test.py --data data/builder.yaml --img 640 --batch 32 --conf 0.001 --iou 0.5 --device 0 --weights yolov7-tiny-builder.pt --name yolov7_tiny_builder_val

You will get the results:

   Class      Images      Labels           P           R      [email protected]  [email protected]:.95
     all         200        1376       0.985       0.969       0.987       0.679
    vest         200         486        0.98       0.986       0.997       0.707
  helmet         200         404       0.992       0.928       0.968       0.573
  person         200         486       0.984       0.994       0.997       0.757

Inference

On image:

python detect.py --weights yolov7-tiny-builder.pt --conf 0.25 --img-size 640 --source inference/images/builder/1779.jpg

Results

PR curve:

Losses and mAP:

Confusion matrix:

Training

Data preparation

bash scripts/get_dataset.sh

Single GPU training

# train tiny model
python train.py --epochs 100 --workers 4 --device 0 --batch-size 32 --data data/builder.yaml --img 640 640 --cfg cfg/training/yolov7-tiny-builder.yaml --weights 'yolov7-tiny.pt' --name yolov7_tiny_builder --hyp data/hyp.scratch.tiny.yaml

Transfer learning

yolov7-tiny.pt

Citation

@article{wang2022yolov7,
  title={{YOLOv7}: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors},
  author={Wang, Chien-Yao and Bochkovskiy, Alexey and Liao, Hong-Yuan Mark},
  journal={arXiv preprint arXiv:2207.02696},
  year={2022}
}

Acknowledgements

Expand

yolov7's People

Contributors

ak391 avatar akanametov avatar akashad98 avatar alexeyab avatar alexeysi avatar dhiaeddine-oussayed avatar dmlon avatar greatv avatar hran2004 avatar ian321 avatar jpkoponen avatar kadirnar avatar kayce001 avatar kivanctezoren avatar ksnzh avatar linaom1214 avatar linghu8812 avatar m-gangloff avatar mkhoshbin72 avatar philipp-schmidt avatar raymondben avatar sashaalderson avatar spacewalk01 avatar taka-wang avatar triple-mu avatar wongkinyiu 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.