Skip to content

chenjun2hao/Matting.fm

Repository files navigation

Fast Portrait Matting with Flow Matching

Cover

📻 Overview

We refer to depthfm to perform the portrait matting task. We utilize the generalization and robustness capabilities obtained after training with stable diffusion on a large amount of data. We use the principle of flow matching to fine-tune the pre-trained model with less data. Summary: Achieve better robustness with less data and less training time.

我们参考depthfm来做人像matting任务,利用stable diffusion在大量数据上训练后获得的泛化,鲁棒性能力,使用flow matching原理来使用更少数据微调预训练的模型。总结:用更少的数据,更少的训练时间,达到更好的鲁棒性

🛠️ Setup

Please refer to the depthfm project and install the dependent software.

🚀 Test

download the pretrained model from BaiDu passwd:6s57, and put in exp/matting.

python inference_matting.py \
   --num_steps 2 \
   --ensemble_size 4 \
   --ckpt ${MODEL_PATH}

the matting results Results

📈 Train

We refer to the papers LFM and depthfm and perform simple fine-tuning on the P3M10K dataset. For specific details, please modify the code in the train_matting.py script.

我们参看LFMdepthfm论文在P3M10K数据集上进行简单微调.具体细节请修改train_matting.py脚本中的代码。

🎓 Citation

the code main from depthfm and LFM, Thank them for their excellent work.

About

matting with flow matting

Topics

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors