This buildpack downloads and extracts Darknet.
Just add the buildpack to your heroku app by executing:
heroku buildpacks:add https://github.com/berinhard/heroku-buildpack-darknet.git
The darknet project will be available stored in /app/darknet/
.
You can just execute /app/darknet/darknet ...
from your app.
If you're running this buildpack with a Python application, you can run from your python code:
import subprocess, shlex
command = './darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg'
detect = subprocess.Popen(
shlex.split(command),
cwd='/app/darknet/',
)
detect.wait()
Inspired by heroku-buildpack-wkhtmltopdf.