Closed Mikachu2333 closed 2 months ago
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.
I also encountered this problem, it seems to be caused by the inconsistency between Linux system commands and Windows system commands. After trying, the correct usage for Windows is:
rembg i -m u2net_custom -x "{\"model_path\": \"C:/your model path/your model name.onnx\"}" ./images/input.jpg ./images/output.jpg
I have successfully used the model I trained myself, but I need to pay attention to the '' '/' issue between the model path and the image path. I hope you can help me
Thanks a thousand of time!
Sum
I decide to use
u2net_human_seg.onnx
on my custom dir withPython embedded
(in order to make a portable package) and meet problem.To Reproduce
Steps to reproduce the behavior:
python312._pth
file's line 5 from#import site
toimport site
python.exe
in dir to run it. (A folder will be create as the rusult which located nearpython.exe
in the dir namedScripts
)pip.exe
inScripts
dir to installrembg
u2net_human_seg.onnx
and place it to theScripts
dirScripts
dir and run the command as followCommand1 (Error)
Use relative path.
Command2 (Error)
Use absolute path.
Command3 (Error)
Change quotation marks
1
2
3
Command3 (Error)
Use equal sign
1
2
Error msg
Expected behavior
Run successfully without any error.
System and Python info
Windows 10, 22H2, 19045.4291
Python 3.12.3 (embedded)
Rembg version
v2.0.57 (latest)
Additional info
u2net_custom.py
, line 37 (after comments) to show kwargs and args, and, I see nothing aboutmodel_path
as if this kwarg has been delete when program transform the args info.Code:
Show: