arunponnusamy / object-detection-opencv

YOLO Object detection with OpenCV and Python.
http://arunponnusamy.com/yolo-object-detection-opencv-python.html
MIT License
472 stars 336 forks source link

yolo_opencv.py: error: the following arguments are required: -i/--image, -c/--config, -w/--weights, -cl/--classes #36

Closed prince0310 closed 2 years ago

prince0310 commented 2 years ago

i am getting this error, though i have implemented right path

prince0310 commented 2 years ago

I have debug by comment out the line and manually put the path of file whereever required.

ap = argparse.ArgumentParser()

ap.add_argument('-i',"--image" ,"-/home/ryzenrtx/Documents/light/object-detection-opencv-master/dog.jpg", required=False,

help='path to input image')

ap.add_argument('-c', "-/home/ryzenrtx/Documents/light/object-detection-opencv-master/yolov3.cfg", required=False,

help='path to yolo config file')

ap.add_argument('-w', "-/home/ryzenrtx/Documents/light/object-detection-opencv-master/yolov3.weights", required=False,

help='path to yolo pre-trained weights')

ap.add_argument('-cl', "-/home/ryzenrtx/Documents/light/object-detection-opencv-master/yolov3.txt", required=False,

help='path to text file containing class names')

args = ap.parse_args()