yolov4-custom-functions  by theAIGuysCode

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

Created 5 years ago
603 stars

Top 54.3% 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

Inactive

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

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Deshraj Yadav Deshraj Yadav(Cofounder of Mem0), and
7 more.

rcnn by rbgirshick

0.2%
2k
Object detection system using CNNs and region proposals
Created 11 years ago
Updated 8 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf).

ImageAI by OlafenwaMoses

0.0%
9k
Python library for computer vision tasks
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.