debbyfangyu / face-recognition

Here is some code that I practice and write during my internship for face recognition.
0 stars 0 forks source link

step1/face detection #1

Open debbyfangyu opened 5 years ago

debbyfangyu commented 5 years ago

face-detection

debbyfangyu commented 5 years ago

import the necessary packages

import numpy as np import argparse import cv2 import sys #for debug

construct the argument parse and parse the arguments

ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required=True,help="path to input image") ap.add_argument("-p", "--prototxt", required=True,help="path to Caffe 'deploy' prototxt file") ap.add_argument("-m", "--model", required=True,help="path to Caffe pre-trained model") ap.add_argument("-c", "--confidence", type=float, default=0.5, help="minimum probability to filter weak detections")

debbyfangyu commented 5 years ago

args = vars(ap.parse_args())

args=vars(ap.parse_args(["--image", "the path you save the photo", "--prototxt", "deploy.prototxt.txt", "--model", "res10_300x300_ssd_iter_140000.caffemodel"]))