Closed mrunhap closed 2 months ago
Since the model only accepts images of size 768x1024, we crop the input person image to fit the corresponding aspect ratio. You can adjust the aspect ratio of the input image to 4:3 to avoid cropping or edit the resize&crop code to padding rather than crop.
Since the model only accepts images of size 768x1024, we crop the input person image to fit the corresponding aspect ratio. You can adjust the aspect ratio of the input image to 4:3 to avoid cropping or edit the resize&crop code to padding rather than crop.
Thanks! It work.
Since the model only accepts images of size 768x1024, we crop the input person image to fit the corresponding aspect ratio. You can adjust the aspect ratio of the input image to 4:3 to avoid cropping or edit the resize&crop code to padding rather than crop.
大佬我改了下pipeline.py中的代码,把check_inputs函数中的: image = resize_and_crop(image, (width, height)) mask = resize_and_crop(mask, (width, height)) 改成: image = resize_and_padding(image, (width, height)) mask = resize_and_padding(mask, (width, height)) 但是没有生效,输出图片依然是有裁剪的。
麻烦大佬有空看下。
As you can see the input image shown in the result is different from the person image I uploaded, I tried different param but also didn't work.
I also check the person image on server /tmp/gradio/xxx/composite.png, it's not cropped.