Ezaldeen99 / BackgroundRemoval

Background Removal written with swift using u2net model
Apache License 2.0
204 stars 34 forks source link

Image size and dimension problem #6

Open ketssssss opened 1 year ago

ketssssss commented 1 year ago

How I can get an updated image with the proper size and dimension?

mgstar1021 commented 1 year ago

@ketssssss

You can try a cormel model supports high resolution(1024*1024).

Ezaldeen99 commented 1 year ago

@ketssssss

The reason for the dimension change is that the model only support square size input.

This means I have to resize your image first get the mask and then apply the mask to your picture and since the mask is already square this bug happens.

I agree that this is not the optimal solution, and this should be fixed by croping the extra dimension image. Contribution is highly appreciated.

In the mean time I will keep this issue opened until I have time to refactor some stuff