ZHKKKe / MODNet

A Trimap-Free Portrait Matting Solution in Real Time [AAAI 2022]
Apache License 2.0
3.82k stars 636 forks source link

Anyone who would kindly share their training code? #199

Open nico00 opened 2 years ago

nico00 commented 2 years ago

Since it seems that the complete training code will never be released, is there anyone who would kindly share their working code? Thanks in advance

bickkysahani commented 2 years ago

I am also looking for the training code.

yashsandansing commented 2 years ago

https://www.kaggle.com/code/daggerx/modnet?scriptVersionId=107316373 You'll need to modify some stuff a bit but mostly this is the code that I'm currently using for training.

skyler14 commented 1 year ago

https://www.kaggle.com/code/daggerx/modnet?scriptVersionId=107316373 You'll need to modify some stuff a bit but mostly this is the code that I'm currently using for training.

how good were teh results you got @yashsandansing

yashsandansing commented 8 months ago

@skyler14 sorry for the late reply. I did try experimenting with the training but it went horribly wrong with my training loop. The images had random blobs in the center. so areas were randomly considered as background. So the results were worse than this pre-trained model. I suspect my training loop had some critical errors that I missed Considering that I had very little experience back then, the code was very bad. I will try to create a PR for this as soon as I can

zzzcyyyw commented 7 months ago

https://www.kaggle.com/code/daggerx/modnet?scriptVersionId=107316373 You'll need to modify some stuff a bit but mostly this is the code that I'm currently using for training.

Hi, do you only have one picture per training batch? Because I noticed that in your data processing section, the size of the images is not consistent and you should not be able to train batches. May I ask you with solve this problem?

zhenzi0322 commented 1 week ago

https://www.kaggle.com/code/daggerx/modnet?scriptVersionId=107316373 You'll need to modify some stuff a bit but mostly this is the code that I'm currently using for training.

I tried, but couldn't train normally.

RuntimeError: stack expects each tensor to be equal size, but got [3, 512, 736] at entry 0 and [3, 512, 672] at entry 1