feat: updated yarn.lock and find best path for haarcascade
This commit is contained in:
6841
client/yarn.lock
6841
client/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,16 @@
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
import os.path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
FACE_DATA = 'haarcascade_frontalface_default.xml'
|
FACE_DATA = next(filter(os.path.exists, [
|
||||||
|
'/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml',
|
||||||
|
'/usr/share/opencv4/haarcascades/haarcascade_frontalface_default.xml',
|
||||||
|
]))
|
||||||
|
|
||||||
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + FACE_DATA)
|
face_cascade = cv2.CascadeClassifier(FACE_DATA)
|
||||||
|
|
||||||
|
|
||||||
class Camera:
|
class Camera:
|
||||||
|
|||||||
Reference in New Issue
Block a user