U-2-Net icon indicating copy to clipboard operation
U-2-Net copied to clipboard

The training settings about portriat

Open menyifang opened this issue 3 years ago • 4 comments

Hi Xuebin, thank you for your great work u2net! I have some questions about the training settings of human portrait drawing.

  1. what is the size of input images with original 512*512 and what operations are used in "transform"? Are the operations totally the same as the segmentation task(RescaleT, RandomCrop, ToTensorLab)?
  2. how many iterations for training and what is the final loss in the APDrawing dataset? Thank you for your reply.

menyifang avatar Dec 29 '20 03:12 menyifang

I have the same problem, did you solve it?

zozoteacher avatar Jul 26 '22 06:07 zozoteacher

you mean portrait generation or human portrait segmentation. For portrait generation we trained with 512x512 input size. Other settings are kept the same with U2Net for SOD. The only issues you may have to be careful is that the protrait is black and the background is white. You may need to change the threshold order for your output.

On Mon, Jul 25, 2022 at 11:00 PM zozoteacher @.***> wrote:

I have the same problem, did you solve it?

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/138#issuecomment-1195040511, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORKULTA667FTKWKIPPDVV55JPANCNFSM4VMXPQNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage: https://xuebinqin.github.io/

xuebinqin avatar Jul 27 '22 03:07 xuebinqin

Thank you for your answer. I have one more question for portrait generation. For the output of the pre-trained model (u2net_portrait.pth), the portrait is white and the background is black. Did you change the label to white for portrait and black for background before training.

zozoteacher avatar Jul 27 '22 03:07 zozoteacher

You can either flip the white and black in training stage or do that in inference stage.

On Tue, Jul 26, 2022 at 8:55 PM zozoteacher @.***> wrote:

Thank you for your answer. I have one more question for portrait generation. For the output of the pre-trained model (u2net_portrait.pth), the portrait is white and the background is black. Did you change the label to white for portrait and black for background before training.

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/138#issuecomment-1196236583, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORPOBIWCXP7YLMYXE6LVWCXJVANCNFSM4VMXPQNQ . You are receiving this because you commented.Message ID: @.***>

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage: https://xuebinqin.github.io/

xuebinqin avatar Jul 27 '22 04:07 xuebinqin