YOLO in Python without the C build headaches
A Cython wrapper that lets you pip-install YOLO v3 instead of wrestling Darknet's Makefile.

What it does
YOLO3-4-Py wraps pjreddie’s Darknet C library in Cython, exposing YOLO v3 object detection through a Python API. You can pip install yolo34py for CPU inference or yolo34py-gpu for CUDA acceleration. It ships with webcam, video, and image demos, plus a Google Colab notebook for trying it in a browser.
The interesting bit
The wrapper handles the messy C interop so you don’t have to maintain a Darknet build. It also supports pointing DARKNET_HOME at a custom Darknet checkout if you need to patch the underlying C code — a rare bit of flexibility for a convenience wrapper.
Key highlights
- Two PyPI packages:
yolo34py(CPU) andyolo34py-gpu(CUDA) - GPU device selection via
pydarknet.set_cuda_device() - Docker and nvidia-docker support for reproducible runs
- OpenCV 3.x integration for better performance when building from source
- Google Colab demo with GPU runtime instructions
Caveats
- PyPI builds skip OpenCV due to “complexity involved in installation,” so performance lags behind a source build
- OpenCV 3.4.1 specifically breaks Darknet; the README warns you off it
- Last meaningful update was a 2021 pkg-config fix for Ubuntu 20.04; YOLO v4 lives in a different repo entirely
Verdict Worth a look if you need YOLO v3 in a Python pipeline today and want to avoid C build tooling. Skip it if you need YOLO v4 or want the fastest inference — you’ll want a native Darknet build with OpenCV, or a more modern framework entirely.