how to convert .pth to .onnx #680
Replies: 1 comment
-
i find the answer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't understand Python and machine learning very well.
When I take a standard model u2net.onnx, it generates correct masks.
When I convert u2net.pth to u2net.onnx via python code, the model starts producing incorrect masks.
Why is this happening? Can someone help?
I attach screenshots of masks and code in Python.
55.jpg - original image
56.png - correct mask generated by standard model
55.png - Incorrect mask generated by converted model
command used to generate masks:
rembg i -om -m u2net_custom -x '{"model_path": "~/.u2net/u2net_converted.onnx"}' 55.jpg 55.png
python code for conversion:
Beta Was this translation helpful? Give feedback.
All reactions