xuebinqin / U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."
Apache License 2.0
8.66k stars 1.49k forks source link

convert u2net_portrait.pth to coreml #233

Open mgstar1021 opened 3 years ago

mgstar1021 commented 3 years ago

I convert u2net_portrait.pth to mlmodel and result is different. I can find there is a normalized code. pred = 1- d1[:,0,:,:]

How can I do using coremltools?

Origin img_1585 2

python model img_1585_

mlmodel out_p0

ioskevinshah commented 2 years ago

Can please share the CoreML model?

adirkol commented 2 years ago

@mgstar1021 can you please share the CoreML model? Thanks