Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

which values have to be add into numpy.add_argument()?

I got some code for human body detection using pedestrian detection OpenCV,link text. I attached the code below where i wanto replace the np.add_argument() value with my trainning set values. i have refered some tutorials , but i can't understand the concept and its not working out in my case.

from __future__ import print_function
from imutils.object_detection import non_max_suppression
from imutils import paths
import numpy as np
import argparse
import imutils
import cv2

# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--images", required=True, help="path to images directory")
args = vars(ap.parse_args())

# initialize the HOG descriptor/person detector
hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())

How can i replace the 'ap.add_argument() with