import os os.chdir('./model') os.system('./darknet detect cfg/yolov2.cfg yolov2.weights data/dog.jpg')