Zorrat / Student-Online-Exam-AntiCheat-Tool

Online Exam Anti-Cheat tool with Cell Phone detection and face recognition
MIT License
22 stars 6 forks source link

help with the error #2

Open Ramki84 opened 1 year ago

Ramki84 commented 1 year ago

python webCamDemo.py --name "Vamshi N" --phone true --verbose Loading..... WARNING:tensorflow:No training configuration found in the save file, so the model was not compiled. Compile it manually. 34 Completed Faces Found in Faces Directory Vamshi N Press (q) To abort 1/1 [==============================] - 2s 2s/step Processing Frame number: 1 Number of frames where phone was detected: 0 Number of Frames where Student was missing: 1

Traceback (most recent call last): File "C:\Users\ramad\Downloads\Student-Online-Exam-AntiCheat-Tool-master\webCamDemo.py", line 69, in img,absentFramesTotal = aUtils.faceRecInference(faceEncodingsKnown,faceNames,img,absentFramesTotal,nameToCheck) File "C:\Users\ramad\Downloads\Student-Online-Exam-AntiCheat-Tool-master\antiCheatUtils.py", line 285, in faceRecInference faceEncsCurr = faceRec.face_encodings(frameS, faceLocsCurr) File "C:\Users\ramad\AppData\Local\Programs\Python\Python39\lib\site-packages\face_recognition\api.py", line 214, in face_encodings return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] File "C:\Users\ramad\AppData\Local\Programs\Python\Python39\lib\site-packages\face_recognition\api.py", line 214, in return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] TypeError: compute_face_descriptor(): incompatible function arguments. The following argument types are supported:

  1. (self: _dlib_pybind11.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),numpy.uint8], face: _dlib_pybind11.full_object_detection, num_jitters: int = 0, padding: float = 0.25) -> _dlib_pybind11.vector
  2. (self: _dlib_pybind11.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),numpy.uint8], num_jitters: int = 0) -> _dlib_pybind11.vector
  3. (self: _dlib_pybind11.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),numpy.uint8], faces: _dlib_pybind11.full_object_detections, num_jitters: int = 0, padding: float = 0.25) -> _dlib_pybind11.vectors
  4. (self: _dlib_pybind11.face_recognition_model_v1, batch_img: List[numpy.ndarray[(rows,cols,3),numpy.uint8]], batch_faces: List[_dlib_pybind11.full_object_detections], num_jitters: int = 0, padding: float = 0.25) -> _dlib_pybind11.vectorss
  5. (self: _dlib_pybind11.face_recognition_model_v1, batch_img: List[numpy.ndarray[(rows,cols,3),numpy.uint8]], num_jitters: int = 0) -> _dlib_pybind11.vectors

Invoked with: <_dlib_pybind11.face_recognition_model_v1 object at 0x000001CDB9E05AF0>, array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [241, 241, 241], [243, 243, 243], [243, 243, 244]],

   [[255, 255, 255],
    [255, 255, 255],
    [255, 255, 255],
    ...,
    [241, 241, 241],
    [242, 242, 243],
    [243, 243, 244]],

   [[255, 255, 255],
    [255, 255, 255],
    [255, 255, 255],
    ...,
    [240, 240, 240],
    [241, 241, 241],
    [240, 240, 240]],

   ...,

   [[227, 227, 220],
    [226, 227, 222],
    [226, 227, 222],
    ...,
    [ 29,  29,  29],
    [ 31,  29,  29],
    [ 38,  28,  30]],

   [[224, 225, 219],
    [226, 226, 222],
    [229, 230, 225],
    ...,
    [ 28,  28,  28],
    [ 27,  28,  28],
    [ 24,  29,  28]],

   [[224, 224, 216],
    [224, 226, 220],
    [222, 227, 222],
    ...,
    [ 30,  30,  30],
    [ 30,  30,  30],
    [ 29,  29,  29]]], dtype=uint8), <_dlib_pybind11.full_object_detection object at 0x000001CDC8D668F0>, 1

PS C:\Users\ramad\Downloads\Student-Online-Exam-AntiCheat-Tool-master>

Zorrat commented 1 year ago

Place the model file in correct folder i.e. models/yolo/yolov4.h5 https://drive.google.com/file/d/1RCD4x8rudipNBahxO6Tsk4VsmhbxrmBL/view?usp=sharing