-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colab Attribute Error #44
Comments
I think the face was not detected. Try lowering the detection threshold #39 or resizing the image deepinsight/insightface#1052. |
The solution provided by @woctezuma is correct, you can have a try~.Many thanks~. |
Sometimes it fails on files that worked until an hour before :-) |
Love this project, and the demo project/colab works fine if I don't touch the demo image and the demo video, but as soon as I change either one to test it with my own samples I get an error. Can someone help tell me what I'm doing wrong, or missing?
Here's the output it gives me when it fails.
`AttributeError Traceback (most recent call last)
in ()
23 # img_a = Image.open(pic_a).convert('RGB')
24 img_a_whole = cv2.imread(pic_a)
---> 25 img_a_align_crop, _ = app.get(img_a_whole,crop_size)
26 img_a_align_crop_pil = Image.fromarray(cv2.cvtColor(img_a_align_crop[0],cv2.COLOR_BGR2RGB))
27 img_a = transformer_Arcface(img_a_align_crop_pil)
1 frames
/usr/local/lib/python3.7/dist-packages/insightface/model_zoo/scrfd.py in detect(self, img, threshold, input_size, max_num, metric)
202 input_size = self.input_size if input_size is None else input_size
203
--> 204 im_ratio = float(img.shape[0]) / img.shape[1]
205 model_ratio = float(input_size[1]) / input_size[0]
206 if im_ratio>model_ratio:
AttributeError: 'NoneType' object has no attribute 'shape'`
The text was updated successfully, but these errors were encountered: