Open Muchai248 opened 1 year ago
Please help I am stuck in this error I am getting this exact error https://stackoverflow.com/questions/76025408/face-recognition-module-crashing-when-a-face-is-in-frame-python3
The traceback I received:-
Traceback (most recent call last):
File "f:\storage 1 backup\Coding\MINI PROJECT 6TH SEM\main.py", line 58, in
Invoked with: <_dlib_pybind11.face_recognition_model_v1 object at 0x00000213428F0370>, array([[[207, 202, 201], [207, 202, 201], [208, 203, 202], ..., [176, 131, 104], [172, 127, 107], [174, 130, 100]],
[[206, 203, 205],
[204, 201, 202],
[205, 202, 203],
...,
[177, 135, 101],
[173, 132, 98],
[171, 130, 97]],
[[207, 204, 206],
[[133, 133, 149],
[133, 133, 151],
[135, 135, 154],
...,
[ 36, 30, 33],
[ 38, 33, 35],
[ 37, 32, 34]]], dtype=uint8), <_dlib_pybind11.full_object_detection object at 0x000002132A5CB030>, 1
Hello there I am having the same issue,
Please help me solve it `
/home/x/workspace/face-recognition-2/frc/bin/python /home/x/workspace/face-recognition-2/main.py
Traceback (most recent call last):
File "/home/x/workspace/face-recognition-2/main.py", line 54, in
Invoked with: <_dlib_pybind11.face_recognition_model_v1 object at 0x7fdc4cbd59b0>, array([[[166, 182, 179], [167, 182, 180], [168, 184, 181], ..., [197, 206, 221], [197, 209, 221], [196, 208, 223]],
[[170, 182, 180],
[172, 181, 178],
[172, 183, 179],
...,
[193, 212, 221],
[192, 212, 221],
[192, 211, 218]],
[[157, 180, 177],
[163, 183, 181],
[170, 183, 182],
...,
[193, 213, 222],
[191, 213, 218],
[193, 211, 221]],
...,
[[ 49, 49, 49],
[ 45, 46, 44],
[ 50, 51, 48],
...,
[ 27, 27, 27],
[ 26, 28, 28],
[ 27, 29, 28]],
[[ 48, 48, 47],
[ 45, 46, 43],
[ 50, 51, 48],
...,
[ 27, 27, 27],
[ 26, 30, 28],
[ 25, 30, 28]],
[[ 46, 46, 45],
[ 48, 49, 43],
[ 50, 51, 46],
...,
[ 25, 28, 27],
[ 27, 28, 28],
[ 26, 29, 28]]], dtype=uint8), <_dlib_pybind11.full_object_detection object at 0x7fdc51ffde30>, 1`
Hey, this helped me in solving my issue,
Try
rgb_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
instead of
rgb_frame = frame[:, :, ::-1]
Credits:-original issue
Description
Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. IMPORTANT: If your issue is related to a specific picture, include it so others can reproduce the issue.
What I Did