A Python wrapper on Darknet. Compatible with YOLO V3.
APACHE-2.0 License
A Python wrapper on Darknet. Compatible with latest YOLO V3. YOLO 3.0 is an Object Detector by pjreddie.
Image source: http://absfreepic.com/free-photos/download/crowded-cars-on-street-4032x2272_48736.html
Refer the following link to preview YOLO3-4-Py in Google Colab: [Google Colab].
Copy the notebook to your drive and run all cells. Ensure that you are in a GPU runtime. You can change the runtime by accessing the menu Runtime/Change runtime type.
pydarknet.set_cuda_device(GPU_INDEX)
sudo apt-get install python3-dev
)pip3 install numpy
pip3 install cython
NOTE: OpenCV 3.4.1 has a bug which causes Darknet to fail. Therefore this wrapper would not work with OpenCV 3.4.1.
More details are available at https://github.com/pjreddie/darknet/issues/502
Installation from PyPI distribution (as described below) is the most convenient approach if you intend to use yolo34py for your projects.
python3 -m pip install yolo34py
python3 -m pip install yolo34py-gpu
NOTE: PyPI Deployments does not use OpenCV due to complexity involved in installation.
To get best performance, it is recommended to install from source with OpenCV enabled.
NOTE: Make sure CUDA_HOME environment variable is set.
python3 setup.py build_ext --inplace
to install library locally.sh download_models.sh
.python3 webcam_demo.py
, python3 video_demo.py
or python3 image_demo.py
input
directory. Or else run input/download_sample_images.sh
sh run.sh
or sh run-gpu.sh
output
directory.GPU Version requires nvidia-docker
export GPU=1
.export OPENCV=1
./src
and run pip3 install .
to install library.export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DARKNET_HOME
Kindly raise your issues in the issues section of GitHub repository.
Feel free to send PRs or discuss on possible future improvements in issues section. Your contributions are most welcome!