yolov4-custom-functions  by theAIGuysCode

TensorFlow code for YOLOv4/v3 object detection, plus custom functions

created 5 years ago
604 stars

Top 55.0% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a collection of custom functions for YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny models, implemented in TensorFlow, TensorFlow Lite, and TensorRT. It targets users who want to extend the capabilities of standard object detection models with features like object counting, detailed detection information, cropping detections, and OCR integration for tasks like license plate recognition.

How It Works

The project leverages existing YOLO implementations and adds custom Python functions that are integrated into the detection pipeline. These functions are triggered via command-line flags, allowing users to enable features like object counting (--count), detailed output (--info), cropping detections (--crop), and OCR for license plates (--plate) or general text (--ocr). It supports conversion to TensorFlow Lite for edge devices and TensorRT for optimized GPU inference.

Quick Start & Requirements

  • Installation: Conda environments (conda-cpu.yml, conda-gpu.yml) or pip (requirements.txt, requirements-gpu.txt).
  • Prerequisites: CUDA Toolkit 10.1 (for GPU TensorFlow), Tesseract OCR binary.
  • Weights: Download pre-trained yolov4.weights or yolov4-tiny.weights.
  • Documentation: Official Quick Start

Highlighted Details

  • Custom Functions: Object counting (total and per-class), detection info printing, cropping detections, license plate recognition via Tesseract OCR, generic OCR on detections.
  • Framework Support: TensorFlow, TensorFlow Lite (including FP16 and INT8 quantization), TensorRT (FP16).
  • Model Support: YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny.
  • Custom Training: Supports using custom trained YOLOv4 weights and class names.

Maintenance & Community

  • The repository is a fork/extension of hunglc007/tensorflow-yolov4-tflite.
  • Feature requests are handled via GitHub Issues.

Licensing & Compatibility

  • The repository's license is not explicitly stated in the README. The base repository it references (tensorflow-yolov4-tflite) is MIT licensed.

Limitations & Caveats

  • The author notes that custom functions "may worsen the overall speed" and are not optimized for time complexity compared to their other repository.
  • INT8 quantization for YOLOv4/YOLOv4-tiny is noted as having issues.
  • Tesseract OCR can significantly slow down video processing.
Health Check
Last commit

2 years ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.