本模型使用预训练好的guided diffusion作为特征提取器,并在有标注的训练数据很少的情况下取得了SOTA的结果。
本模型的生成效果如下所示:
本模型研究了执行反向扩散过程的扩散网络的中间激活值,并利用这些激活值作为输入图像的语义级别特征表示。
借助强大的扩散模型作为特征提取器,本模型提供了一种简单的语义分割方法,
即使只提供少量训练图像也可以取得优越的结果。
具体的模型如下图所示
使用方式:
适用范围:
在ModelScope框架上,提供输入图像,即可以通过简单的Pipeline调用来使用本模型。
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.outputs import OutputKeys
input_location = 'https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/image_ffhq34_00041527.png'
pp = pipeline(Tasks.semantic_segmentation, model='damo/cv_diffusion_image-segmentation')
result = pp(input_location)
# if you want to save the result, you can run
vis_img = result[OutputKeys.OUTPUT_IMG]
vis_img.save('result.png')
训练数据为从FFHQ-256、LSUN、ADE20K和CelebAMask-HQ中收集的子集。
Method | Bedroom-28 | FFHQ-34 | Cat-15 | Horse-21 | CelebA-19 | ADE-Bedroom-30 |
---|---|---|---|---|---|---|
ALAE | 20.0 ± 1.0 | 48.1 ± 1.3 | -- | -- | 49.7 ± 0.7 | 15.0 ± 0.5 |
VDVAE | -- | 57.3 ± 1.1 | -- | -- | 54.1 ± 1.0 | -- |
GAN Inversion | 13.9 ± 0.6 | 51.7 ± 0.8 | 21.4 ± 1.7 | 17.7 ± 0.4 | 51.5 ± 2.3 | 11.1 ± 0.2 |
GAN Encoder | 22.4 ± 1.6 | 53.9 ± 1.3 | 32.0 ± 1.8 | 26.7 ± 0.7 | 53.9 ± 0.8 | 15.7 ± 0.3 |
SwAV | 41.0 ± 2.3 | 54.7 ± 1.4 | 44.1 ± 2.1 | 51.7 ± 0.5 | 53.2 ± 1.0 | 30.3 ± 1.5 |
SwAVw2 | 42.4 ± 1.7 | 56.9 ± 1.3 | 45.1 ± 2.1 | 54.0 ± 0.9 | 52.4 ± 1.3 | 30.6 ± 1.0 |
MAE | 45.0 ± 2.0 | 58.8 ± 1.1 | 52.4 ± 2.3 | 63.4 ± 1.4 | 57.8 ± 0.4 | 31.7 ± 1.8 |
DatasetGAN | 31.3 ± 2.7 | 57.0 ± 1.0 | 36.5 ± 2.3 | 45.4 ± 1.4 | -- | -- |
DatasetDDPM | 47.9 ± 2.9 | 56.0 ± 0.9 | 47.6 ± 1.5 | 60.8 ± 1.0 | -- | -- |
DDPM-Seg | 49.4 ± 1.9 | 59.1 ± 1.4 | 53.7 ± 3.3 | 65.0 ± 0.8 | 59.9 ± 1.0 | 34.6 ± 1.7 |
如果你觉得这个模型对你有所帮助,请考虑引用下面的相关论文:
@article{baranchuk2021label,
title={Label-efficient semantic segmentation with diffusion models},
author={Baranchuk, Dmitry and Rubachev, Ivan and Voynov, Andrey and Khrulkov, Valentin and Babenko, Artem},
journal={arXiv preprint arXiv:2112.03126},
year={2021}
}
git clone https://www.modelscope.cn/damo/cv_diffusion_image-segmentation.git