Photo by SIMON LEE on Unsplash

Error: Traceback (most recent call last):
File “D:\Attendance_System_Us\main.py”, line 10, in <module>
faceloc = face_recognition.face_locations(imgModi)[0]
File “D:\Attendance_System_Us\venv\lib\site-packages\face_recognition\api.py”, line 121, in face_locations
return [_trim_css_to_bounds(_rect_to_css(face), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, model)]
File “D:\Attendance_System_Us\venv\lib\site-packages\face_recognition\api.py”, line 105, in _raw_face_locations
return face_detector(img, number_of_times_to_upsample)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.

Solutions :

uninstall numpy >=2

  1. pip uninstall numpy
  2. pip install numpy==1.25.1

Thank You :)

--

--

Shivam Vatshayan
Shivam Vatshayan

Written by Shivam Vatshayan

Blockchain Developer || Project Developer || Software Engineer

No responses yet