← all repositories
theAIGuysCode/yolov4-custom-functions

The slower YOLOv4 repo that counts and crops for you

A collection of YOLOv4 post-processing experiments—counting, cropping, and OCR—that the author admits will likely slow your inference down.

609 stars Python Computer VisionML Frameworks
yolov4-custom-functions
Not currently ranked — collecting fresh signals.
star history

What it does This repo wraps YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny with a handful of post-detection utilities implemented in TensorFlow, TFLite, and TensorRT. You can count detected objects in total or per class, crop each detection into its own image, print bounding-box metadata, or pipe regions of interest through Tesseract OCR for license-plate recognition and general text extraction. It acts as a utility layer between a YOLO detector and common CV tasks.

The interesting bit The author openly admits this is the slower, less-optimized sibling of their main YOLOv4 TensorFlow repo, prioritizing “cool customizations” over frame rate. That honesty is refreshing: the value is not speed but the pre-built integration of otherwise tedious post-processing steps like plate recognition, which includes its own image-preprocessing pipeline before hitting Tesseract.

Key highlights

  • Object counting with a --count flag, plus an optional per-class breakdown by tweaking a function parameter in core/functions.py.
  • Automatic cropping of every detection to detections/crop/ via a --crop flag.
  • License-plate recognition using a custom-trained YOLOv4 model and Tesseract OCR, including grayscale, thresholding, and dilation preprocessing.
  • A generic OCR flag to run Tesseract on any detected bounding box to extract text.
  • Supports YOLOv4/v3 and their tiny variants across TensorFlow, TFLite, and TensorRT backends.

Caveats

  • The README warns that these custom functions worsen overall speed and time complexity; if you need optimal inference, the author points to another repository.
  • Some features, like per-class counting, require editing source code rather than toggling a command-line flag.
  • Running OCR requires installing Tesseract binaries separately; it is not bundled.

Verdict Grab this if you want ready-made YOLO post-processing for counting, cropping, or OCR without writing your own pipeline. Skip it if you are chasing production throughput or need a clean, fully flag-driven API.

Frequently asked

What is theAIGuysCode/yolov4-custom-functions?
A collection of YOLOv4 post-processing experiments—counting, cropping, and OCR—that the author admits will likely slow your inference down.
Is yolov4-custom-functions open source?
Yes — theAIGuysCode/yolov4-custom-functions is open source, released under the MIT license.
What language is yolov4-custom-functions written in?
theAIGuysCode/yolov4-custom-functions is primarily written in Python.
How popular is yolov4-custom-functions?
theAIGuysCode/yolov4-custom-functions has 609 stars on GitHub.
Where can I find yolov4-custom-functions?
theAIGuysCode/yolov4-custom-functions is on GitHub at https://github.com/theAIGuysCode/yolov4-custom-functions.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.