rembg
rembg copied to clipboard
[BUG] argmax_dispatcher() got an unexpected keyword argument 'keepdims'
Describe the bug When using rembg with -m u2net_cloth_seg option, it would give out error message “argmax_dispatcher() got an unexpected keyword argument 'keepdims'”, with no output file in the output folder.
To Reproduce Just run “rembg p inputfolder outputfolder -m u2net_cloth_seg”
Expected behavior The photo should be processed with no error.
Images Any input images would trigger error.
OS Version: Windows 10 19044.1889
Rembg version: v2.0.25
Additional context Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32
Looks like the requirements.txt is incorrect. It lists numpy==1.21.6
, but 1.21.6
version of argmax
doesn't have keepdims
as a parameter. 1.22.0
does have it.
https://github.com/numpy/numpy/blob/v1.21.6/numpy/core/fromnumeric.py#L1122 https://github.com/numpy/numpy/blob/v1.22.0/numpy/core/fromnumeric.py#L1128
Unfortunately after upgrading to numpy
1.22.0
, while rembg
no longer crashes using u2net_cloth_seg
, the output images for u2net_cloth_seg
are broken (the other models still work fine).
This issue is stale because it has been open for 30 days with no activity.
Was anyone able to solve this? @brianmcdonnell @Sherman-Liu
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.