TypeError: 'NoneType' object is not iterable #211

Open
opened 2022-03-11 23:43:14 +01:00 by sao-g · 2 comments
sao-g commented 2022-03-11 23:43:14 +01:00 (Migrated from github.com)

i keep getting the above error. Of the 26 faces i've used, only one successfully returns a swap. All else gives this error. Any help is appreciated. i'm VERY new to this. Full error code:

set det-size: (640, 640)
Traceback (most recent call last):
File "test_wholeimage_swapsingle.py", line 62, in
img_a_align_crop, _ = app.get(img_a_whole,crop_size)
TypeError: 'NoneType' object is not iterable

i keep getting the above error. Of the 26 faces i've used, only one successfully returns a swap. All else gives this error. Any help is appreciated. i'm VERY new to this. Full error code: set det-size: (640, 640) Traceback (most recent call last): File "test_wholeimage_swapsingle.py", line 62, in <module> img_a_align_crop, _ = app.get(img_a_whole,crop_size) TypeError: 'NoneType' object is not iterable
BeaverInGreenland commented 2022-05-25 11:34:48 +02:00 (Migrated from github.com)

Hello, you can find your solution here: https://github.com/neuralchen/SimSwap/issues/39#issuecomment-873758730

You should reduce the face detection threshold in test_wholeimage_swapsingle.py for the following code:

app = Face_detect_crop(name='antelope', root='./insightface_func/models')
app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640))
Hello, you can find your solution here: https://github.com/neuralchen/SimSwap/issues/39#issuecomment-873758730 You should reduce the face detection threshold in `test_wholeimage_swapsingle.py` for the following code: ``` app = Face_detect_crop(name='antelope', root='./insightface_func/models') app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640)) ```
sukritshankar commented 2023-01-19 18:26:57 +01:00 (Migrated from github.com)

Hello, you can find your solution here: #39 (comment)

You should reduce the face detection threshold in test_wholeimage_swapsingle.py for the following code:

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

This is correct !! A detection threshold of 0.2 works well for me, even for side faces. Insight Face library (that the authors use for face detection) looks crappy though, as some very clear faces are detected with quite low probability - Or their models suffer from adversarial problems !!

> Hello, you can find your solution here: [#39 (comment)](https://github.com/neuralchen/SimSwap/issues/39#issuecomment-873758730) > > You should reduce the face detection threshold in `test_wholeimage_swapsingle.py` for the following code: > > ``` > app = Face_detect_crop(name='antelope', root='./insightface_func/models') > app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640)) > ``` This is correct !! **A detection threshold of 0.2 works well for me**, even for side faces. Insight Face library (that the authors use for face detection) looks crappy though, as some very clear faces are detected with quite low probability - Or their models suffer from adversarial problems !!
Sign in to join this conversation.