A general obect detection class based on yolo darknet model.
- model(str): yolo model name (default:'yolo')
- threshold(float): threshold of the given model (default:0.4)
- gpu(float): percentage of gpu use desired (default:0 running entirely on cpu)
- tensorflow
- cython
- darkflow
- git-lfs
pip install --user cython
pip install --user git+https://github.com/MacherLabs/darkflow.git
pip install --user git+<https-url>
or
pip install --user git+ssh://[email protected]/macherlabs/yolo.git
from yolo import ObjectDetectorYolo
detector = ObjectDetectorYolo(model='yolo')
image_url = '../test.jpg'
imgcv = cv2.imread(image_url)
if imgcv is not None:
results = detector.run(imgcv)
pprint.pprint(results)
else:
print("Could not read image: {}".format(image_url))# yolo