yolov5-pytorch  by bubbliiiing

PyTorch implementation for YOLOv5 object detection

created 3 years ago
1,119 stars

Top 34.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a PyTorch implementation of the YOLOv5 object detection model, targeting researchers and developers who need to train custom object detection models. It offers flexibility in model size (s, m, l, x), learning rate schedules, optimizers, and batch size adaptation, enabling users to fine-tune performance for specific datasets.

How It Works

The project implements YOLOv5, a state-of-the-art object detection architecture, in PyTorch. It supports various training configurations, including different learning rate decay methods (step, cosine), optimizers (Adam, SGD), and adaptive learning rates based on batch size. The implementation also includes features like multi-GPU training, heatmap generation, and EMA (Exponential Moving Average) for improved training stability and performance.

Quick Start & Requirements

  • Install: Clone the repository and install dependencies.
  • Prerequisites: torch==1.2.0. Pre-trained weights and VOC dataset are available via Baidu Netdisk links provided in the README.
  • Training: Run train.py after preparing data and configuring paths in voc_annotation.py and train.py.
  • Prediction: Modify yolo.py with model_path and classes_path, then run predict.py.
  • Evaluation: Modify yolo.py and get_map.py with relevant paths, then run get_map.py.
  • Links: VOC dataset, Pre-trained weights

Highlighted Details

  • Supports YOLOv5 versions s, m, l, x.
  • Achieves mAP@0.5:0.95 of 49.4% on COCO-Val2017 with yolov5_x.
  • Includes options for Adam/SGD optimizers and step/cosine learning rate decay.
  • Features multi-GPU training and heatmap generation.

Maintenance & Community

The repository was created in February 2022, with significant updates in April 2022 adding multi-GPU support and performance enhancements. The README lists related repositories for other YOLO versions by the same author.

Licensing & Compatibility

The repository does not explicitly state a license. The project references other GitHub repositories, including Ultralytics' YOLOv5, which is typically under AGPL-3.0. Users should verify licensing for commercial use.

Limitations & Caveats

The project relies on specific, older versions of PyTorch (torch==1.2.0) and requires downloading datasets and weights from external Baidu Netdisk links, which may have availability or speed limitations. The README mentions that official YOLOv5 saves half-precision models, while this repository saves full-precision models, leading to size differences.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
24 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.