mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
resolving bug 1096
This commit is contained in:
parent
86445ca478
commit
049ab8cdff
@ -22,8 +22,15 @@ class YuNetClient(Detector):
|
||||
"""
|
||||
|
||||
opencv_version = cv2.__version__.split(".")
|
||||
if not len(opencv_version) >= 2:
|
||||
raise ValueError(
|
||||
f"OpenCv's version must have major and minor values but it is {opencv_version}"
|
||||
)
|
||||
|
||||
if len(opencv_version) > 2 and int(opencv_version[0]) == 4 and int(opencv_version[1]) < 8:
|
||||
opencv_version_major = int(opencv_version[0])
|
||||
opencv_version_minor = int(opencv_version[1])
|
||||
|
||||
if opencv_version_major < 4 or (opencv_version_major == 4 and opencv_version_minor < 8):
|
||||
# min requirement: https://github.com/opencv/opencv_zoo/issues/172
|
||||
raise ValueError(f"YuNet requires opencv-python >= 4.8 but you have {cv2.__version__}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user