Skip to content
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

TypeError: cannot unpack non-iterable NoneType object #39

Open
loboere opened this issue Jul 5, 2021 · 3 comments
Open

TypeError: cannot unpack non-iterable NoneType object #39

loboere opened this issue Jul 5, 2021 · 3 comments

Comments

@loboere
Copy link

loboere commented Jul 5, 2021

when I use an custom image I get this

-------------- End ----------------
input mean and std: 127.5 127.5
find model: ./insightface_func/models/antelope/glintr100.onnx recognition
find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection
set det-size: (640, 640)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-21-c61bb4ca883a> in <module>()
     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)

TypeError: cannot unpack non-iterable NoneType object
@NNNNAI
Copy link
Collaborator

NNNNAI commented Jul 5, 2021

Could you show me your full command line ? Cause i cannot identify which command you are using.Many thanks.

@loboere
Copy link
Author

loboere commented Jul 5, 2021

is the last cell of the colab
just change iron man for another face

@AceSix
Copy link
Collaborator

AceSix commented Jul 5, 2021

Hello, it seems this error is caused by face detection failure in the source image your provided. You can try to turn down det_thresh in the app.prepare function in the last cell, right after model creation:

app = Face_detect_crop(name='antelope', root='./insightface_func/models')
app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640))

or use another image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants