Darkflow is a Python 3 tool that makes the Darknet open source neural networks available in Python using Tensorflow.
Here's how I got it working on my laptop:
cd /tmp
git clone https://github.com/thtrieu/darkflow
cd darkflow
virtualenv --python=python3 .venv
source .venv/bin/activate
pip install Cython
pip install numpy
pip install tensorflow
pip install opencv-python
pip install .
python setup.py build_ext --inplace
flow --help
mkdir bin
# Downloaded yolo.weights from http://pjreddie.com/darknet/yolo/
cd bin
wget https://pjreddie.com/media/files/yolo.weights
cd ..
flow --imgdir sample_img/ --model cfg/yolo.cfg --load bin/yolo.weights
open sample_img/out/
mkdir my_photos
# Copied some of my photos to my_photos
flow --imgdir my_photos/ --model cfg/yolo.cfg --load bin/yolo.weights
open my_photos/out/
When i typed the command flow --help this is the error message
Traceback (most recent call last):
File "/Users/ahlamyusuf/darkflow/.venv/bin/flow", line 4, in
from darkflow.cli import cliHandler
File "/Users/ahlamyusuf/darkflow/.venv/lib/python3.7/site-packages/darkflow/cli.py", line 3, in
from .net.build import TFNet
File "/Users/ahlamyusuf/darkflow/.venv/lib/python3.7/site-packages/darkflow/net/build.py", line 5, in
from .ops import op_create, identity
File "/Users/ahlamyusuf/darkflow/.venv/lib/python3.7/site-packages/darkflow/net/ops/init.py", line 1, in
from .simple import *
File "/Users/ahlamyusuf/darkflow/.venv/lib/python3.7/site-packages/darkflow/net/ops/simple.py", line 1, in
import tensorflow.contrib.slim as slim
ModuleNotFoundError: No module named 'tensorflow.contrib'