Open Ramzichebli123 opened 3 years ago
Hello, concernant l'argument input il est détaillé ici :
parser.add_argument('-i', '--input', type=str, required=True, help='directory of input known faces')
Il s'agit de l'argument qui fait référence au dossier des visages connus.
Ensuite Peut tu stp mettre en forme ta demande ? Je ne comprend pas grand chose ... :-)
Merci,
Je t'invite à lire ici comment ouvrir une issue correctement sur un repo github https://medium.com/nyc-planning-digital/writing-a-proper-github-issue-97427d62a20f#:~:text=When%20you%20click%20%E2%80%9CNew%20issue,you%20write%20a%20proper%20issue.
Et je t'invite aussi à utilisé correctement la syntaxe markdown : https://guides.github.com/features/mastering-markdown/
bonjour, de quoi je dois remplacer le "-i" et "--input" ?? et dans help='directory of input known faces' j'ai mis le path de dossier qui contient les images ??
Désolé je ne comprend pas la question ?
bonjour voila l'erreur que j'ai
runfile('/home/imex/spyder/easy_facial_recognition-master/easy_facial_recognition.py', wdir='/home/imex/spyder/easy_facial_recognition-master') [INFO] Starting System... [INFO] Importing pretrained model.. [INFO] Importing pretrained model.. usage: easy_facial_recognition.py [-h] -i INPUT easy_facial_recognition.py: error: the following arguments are required: -i/--input An exception has occurred, use %tb to see the full traceback.
L'erreur est clair :
easy_facial_recognition.py: error: the following arguments are required: -i/--input
Dans le lancement du fichier il n'y a effectivement aucun argument :
easy_facial_recognition.py: error: the following arguments are required: -i/--input
https://www.tutorialspoint.com/python/python_command_line_arguments.htm
Bonjour je viens de lire : https://www.tutorialspoint.com/python/python_command_line_arguments.htm je comprend pas comment ressoudre l'erreur je pourrais avoir quelque précision ? Merci de votre réponse
bonjour monsieur anis c'est moi que j'ai contacterai tout de suite j'ai un problème dans les arguments input (--i , --input) et je sais pas comment le réglé ?? voila le code :
Code Anis - Defend Intelligence
import cv2 import dlib import PIL.Image import numpy as np from imutils import face_utils import argparse from pathlib import Path import os import ntpath
parser = argparse.ArgumentParser(description='Easy Facial Recognition App') parser.add_argument('-i', '--input', type=str, required=True, help='directory of input known faces')
print('[INFO] Starting System...') print('[INFO] Importing pretrained model..') pose_predictor_68_point = dlib.shape_predictor("pretrained_model/shape_predictor_68_face_landmarks.dat") pose_predictor_5_point = dlib.shape_predictor("pretrained_model/shape_predictor_5_face_landmarks.dat") face_encoder = dlib.face_recognition_model_v1("pretrained_model/dlib_face_recognition_resnet_model_v1.dat") face_detector = dlib.get_frontal_face_detector() print('[INFO] Importing pretrained model..')
def transform(image, face_locations): coord_faces = [] for face in face_locations: rect = face.top(), face.right(), face.bottom(), face.left() coord_face = max(rect[0], 0), min(rect[1], image.shape[1]), min(rect[2], image.shape[0]), max(rect[3], 0) coord_faces.append(coord_face) return coord_faces
def encode_face(image): face_locations = face_detector(image, 1) face_encodings_list = [] landmarks_list = [] for face_location in face_locations:
DETECT FACES
def easy_face_reco(frame, known_face_encodings, known_face_names): rgb_small_frame = frame[:, :, ::-1]
ENCODING FACE
if name == 'main': args = parser.parse_args()