# Tianxiaomo/pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4

Repository: https://github.com/Tianxiaomo/pytorch-YOLOv4
Canonical: https://ross.abutalabs.com/products/pytorch-yolov4
Language: Python
License: Apache-2.0
License Family: permissive
Topics: yolov4, pytorch, darknet2pytorch, darknet2onnx, tensorrt, onnx, pytorch-yolov4, yolov4-tiny, yolov3
Last push: 2024-06-19T20:43:20+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2321, "days_push": 805, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4521, forks 1481 (observed 2026-08-28T04:08:52.762086+00:00)

## What it is
A minimal PyTorch implementation of YOLOv4 (and YOLOv4-tiny) supporting inference and training, with tools to convert Darknet weights to PyTorch and ONNX, and ONNX to TensorRT. It includes pretrained weights, training scripts with Mosaic augmentation, and demo utilities.

## Use cases
- run YOLOv4 object detection inference in PyTorch
- train YOLOv4 on my own custom dataset
- convert darknet weights to pytorch
- convert YOLOv4 model to ONNX for deployment
- deploy YOLOv4 with TensorRT for faster inference
- use yolov4-tiny for lightweight detection
- detect objects in images or camera feed

## When to choose
- you need YOLOv4 in PyTorch rather than Darknet
- you want to fine-tune YOLOv4 on custom data with Mosaic augmentation
- you need a conversion path from Darknet weights to ONNX/TensorRT

## When to avoid
- you need the latest YOLO architectures like YOLOv7/v8 or YOLO11
- you want a maintained production pipeline with active development
- you need non-PyTorch frameworks like TensorFlow

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, computer-vision, image-processing, deep-learning
- domain: computer-vision, machine-learning, deep-learning, image-processing
- platform: python, cross-platform
- tags: yolov4, object-detection, pytorch, onnx, tensorrt, darknet, yolov4-tiny, model-conversion, gpu

## Member repositories
- Tianxiaomo/pytorch-YOLOv4 (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:52.762086+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:17.044233+00:00, confidence not recorded.
  - readme: https://github.com/Tianxiaomo/pytorch-YOLOv4 (fetched 2026-08-28T04:08:52.762086+00:00, sha 0a55031fe871)
- Data as of 2026-08-30T08:39:29.467469+00:00.
