Comments (9)
A hack to solve this:
The weights come from here:
https://drive.google.com/uc?id=1qcr9DbgsX3ryrz2uU8w4Xm3cOrRywXqb
You can download them and put them on your equivalent of this path:
/Users/myself/.deepface/weights/yolov8n-face.pt
Or to be sure, print it in Yolo.py
weight_path = f"{folder_utils.get_deepface_home()}{PATH}"
print(weight_path)
from deepface.
Need detailed exception message please
Normally, exception thrown module and line info should be printed. As I understand, you customize something because these are not standard output of deepface.
from deepface.
When I test that backend as
DeepFace.analyze(img_path=img_path, detector_backend="yolov8")
Then I am having a successful response.
[{'emotion': {'angry': 0.27702577454904015,
'disgust': 1.6584374963028672e-06,
'fear': 5.269103613165452e-05,
'happy': 58.46902829039434,
'sad': 0.10684493573024102,
'surprise': 0.004627124696059116,
'neutral': 41.14242388515757},
'dominant_emotion': 'happy',
'region': {'x': 233, 'y': 79, 'w': 152, 'h': 216},
'face_confidence': 0.863529622554779,
'age': 30,
'gender': {'Woman': 99.9902606010437, 'Man': 0.009742558904690668},
'dominant_gender': 'Woman',
'race': {'asian': 0.2046308602172649,
'indian': 0.3006282674523155,
'black': 0.02210449442703989,
'white': 83.31937094446248,
'middle eastern': 7.54583746468052,
'latino hispanic': 8.607432014193058},
'dominant_race': 'white'}]
So, your case may be related to the input image you are feeding (share with me if it is not private), or depending on your customization.
from deepface.
That error message should come from regex, and regex is not being used in deepface. You may get it from something different than deepface?
from deepface.
Closed because exception message is not coming from deepface
from deepface.
Here's a bit more information about the error:
Traceback (most recent call last):
File "project/face_recognition/deepface_library/find_match.py", line 32, in <module>
dfs = DeepFace.find(img_path=test_image_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/DeepFace.py", line 296, in find
return recognition.find(
^^^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/modules/recognition.py", line 209, in find
source_objs = detection.extract_faces(
^^^^^^^^^^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/modules/detection.py", line 84, in extract_faces
face_objs = DetectorWrapper.detect_faces(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/detectors/DetectorWrapper.py", line 82, in detect_faces
face_detector: Detector = build_model(detector_backend)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/detectors/DetectorWrapper.py", line 50, in build_model
face_detector = face_detector()
^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/detectors/Yolo.py", line 25, in __init__
self.model = self.build_model()
^^^^^^^^^^^^^^^^^^
File "project/tensorflow-metal-test/lib/python3.11/site-packages/deepface/detectors/Yolo.py", line 47, in build_model
gdown.download(WEIGHT_URL, weight_path, quiet=False)
File "project/tensorflow-metal-test/lib/python3.11/site-packages/gdown/download.py", line 259, in download
filename_from_url = m.groups()[0]
^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'groups'
from deepface.
Closed with PR - #1038
Thank you @Any-Winter-4079
from deepface.
@serengil can you release a new version of DeepaFace on Pypi?
from deepface.
I will do it soon, meanwhile you can use the source code as
$ git clone https://github.com/serengil/deepface.git
$ cd deepface
$ pip install -e .
from deepface.
Related Issues (20)
- Request for support of model conversion like in .onnx or .engine file. HOT 2
- [FEATURE]: extract_faces return face center point info or stop further enlargement if face center point can't be kept at image center HOT 8
- [BUG]: TypeError: unhashable type: 'list' HOT 2
- Fine Tuning Threshold in Face Recognition HOT 1
- New api endpoint HOT 4
- [BUG]: license is not shown in pip package
- Add TFace & Anti-Spoofing models π HOT 3
- Which Billion-Scale Database is the best for Face Recognition Query? HOT 1
- [BUG]: The verify function in gunicorn is unavailable
- [BUG]: <Wrong display of height and width values ββin DeepFace.represent function> HOT 2
- [BUG]: x of facial area left and right eye seems to be swapped since version 0.0.90 HOT 8
- [BUG]: Models ArcFace, Dlib, and others are not working. VGG-Face is the only model working for me HOT 3
- [BUG]: Age of children detected wrong HOT 1
- [BUG]: tensorflow deprecation warning with tf-keras HOT 1
- [FEATURE]: Nix flake deployment mechanism HOT 3
- [FEATURE]: Face Recognition in an image filled with other people HOT 2
- FAU Detection HOT 1
- [BUG]: Intermittent Packet Type Mismatch Error in Long-Term Face Detection with DeepFace and MediaPipe "Graph has errors: Packet type mismatch on a calculator receiving from stream "image": ; Empty packets are not allowed for type: OneOf<::mediapipe::Image, ::mediapipe::ImageFrame, mediapipe::GpuBuffer>" HOT 1
- [More info from find method]: Find method should optionally return full face detection results HOT 3
- [BUG]: deepface "find" method runs very slowly (16 sec per iteration), unable to use gpu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepface.