EnderBakan
80+
- Katılım
- 27 Ağustos 2020
- Mesajlar
- 2
Dahası
- Reaksiyon skoru
- 0
- İsim
- Ender Bakan
Python da yüz tanıma yapacağım ancak böyle bir hata alıyorum nedenini bilen varmı?
Hata:
Traceback (most recent call last):
File "C:\Users\BAKAN\PycharmProjects\proje\AAA\main.py", line 12, in <module>
from simple_facerec import SimpleFacerec
ModuleNotFoundError: No module named 'simple_facerec'
Process finished with exit code 1
Python:
import cv2
from simple_facerec import SimpleFacerec
# Encode faces from a folder
sfr = SimpleFacerec()
sfr.load_encoding_images("images/")
# Load Camera
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
# Detect Faces
face_locations, face_names = sfr.detect_known_faces(frame)
for face_loc, name in zip(face_locations, face_names):
y1, x2, y2, x1 = face_loc[0], face_loc[1], face_loc[2], face_loc[3]
cv2.putText(frame, name,(x1, y1 - 10), cv2.FONT_HERSHEY_DUPLEX, 1, (0, 0, 200), 2)
cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 0, 200), 4)
cv2.imshow("Frame", frame)
key = cv2.waitKey(1)
if key == 27:
break
cap.release()
cv2.destroyAllWindows()
Hata:
Traceback (most recent call last):
File "C:\Users\BAKAN\PycharmProjects\proje\AAA\main.py", line 12, in <module>
from simple_facerec import SimpleFacerec
ModuleNotFoundError: No module named 'simple_facerec'
Process finished with exit code 1