Upgrade insightface #447
Reference in New Issue
Block a user
Delete Branch "woctezuma/upgrade-insightface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The following issue arises with
insightface==0.6.2or below, including the recommended version (0.2.1).See:
This issue is fixed by upgrading to
insightface==0.7or above, but the following issue arises.This pull request fixes this second issue, which allows to use the latest version of
insightface(0.7.3).Fix:
Can confirm, fix works :)
Again getting the same error "RetinaFace.detect() got an unexpected keyword argument 'threshold'". Can you share your .ipynb file?
!git clone https://github.com/woctezuma/SimSwap.git
I have used insightface==0.7.3
You should use the branch which incorporates the fix.
Otherwise you get the main branch, which is an exact copy of the official
SimSwap.Ok thank you, It works like a charm. It is 9 commits behind, will you update it?
I can do that, but there is no much point: only the README and the notebook were modified in the 9 commits, so no Python code.
Edit: Done this time, but the point of this branch is that the pull request could be merged in the official repository, not to maintain it whenever there is a new update in the official repository. 😛
ok
Thanks by the way.
In the latest insightface version, delete line 65 of
insightface_func/face_detect_crop_multi.py:TO
face_detect_crop_single.pyis same.Yes, that is partially what I did:
If you only do that, then you cannot specify the detection threshold. For instance, the default value (0.5) is used instead of 0.6.
https://github.com/deepinsight/insightface/blob/c2db41402c627cab8ea32d55da591940f2258276/python-package/insightface/model_zoo/scrfd.py#L85C1-L85C1
https://github.com/neuralchen/SimSwap/blob/a5f6dea67398eec9ee71e156f7ad15dbd7ce4977/test_wholeimage_swapsingle.py#L55-L56
NB:
antelope.zipcontains a file hinting at SCRFD for detection:glintr100.onnxrecognitionscrfd_10g_bnkps.onnxdetectionbased on the outputs found in Colab:
So the detection model is SCRFD.
https://github.com/neuralchen/SimSwap/blob/a5f6dea67398eec9ee71e156f7ad15dbd7ce4977/insightface_func/face_detect_crop_single.py#L41-L43
https://github.com/neuralchen/SimSwap/blob/a5f6dea67398eec9ee71e156f7ad15dbd7ce4977/insightface_func/face_detect_crop_single.py#L47-L48
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.