Shortcuts

图像抠图

概览

  • 预训练权重个数: 9

  • 配置文件个数: 0

  • 论文个数: 3

    • ALGORITHM: 3

GCA (AAAI’2020)

任务: 图像抠图

GCA (AAAI'2020)
@inproceedings{li2020natural,
  title={Natural Image Matting via Guided Contextual Attention},
  author={Li, Yaoyi and Lu, Hongtao},
  booktitle={Association for the Advancement of Artificial Intelligence (AAAI)},
  year={2020}
}

算法 SAD MSE GRAD CONN GPU 信息 下载
基线 (原文) 40.62 0.0106 21.53 38.43 - -
GCA (原文) 35.28 0.0091 16.92 32.53 - -
基线 (复现) 34.61 0.0083 16.21 32.12 4 模型 | 日志
GCA (复现) 33.38 0.0081 14.96 30.59 4 模型 | 日志

其他结果

算法 SAD MSE GRAD CONN GPU 信息 下载
基线 (使用 DIM 流水线) 49.95 0.0144 30.21 49.67 4 模型 | 日志
GCA (使用 DIM 流水线) 49.42 0.0129 28.07 49.47 4 模型 | 日志

快速开始

训练

训练说明

您可以使用以下命令来训练模型。

## CPU上训练
CUDA_VISIBLE_DEVICES=-1 python tools/train.py configs/gca/gca_r34_4xb10-200k_comp1k.py

## 单个GPU上训练
python tools/train.py configs/gca/gca_r34_4xb10-200k_comp1k.py

## 多个GPU上训练
./tools/dist_train.sh configs/gca/gca_r34_4xb10-200k_comp1k.py 8

更多细节可以参考 train_test.md 中的 Train a model 部分。

测试

测试说明

您可以使用以下命令来测试模型。

## CPU上测试
CUDA_VISIBLE_DEVICES=-1 python tools/test.py configs/gca/gca_r34_4xb10-200k_comp1k.py https://download.openmmlab.com/mmediting/mattors/gca/gca_r34_4x10_200k_comp1k_SAD-33.38_20220615-65595f39.pth

## 单个GPU上测试
python tools/test.py configs/gca/gca_r34_4xb10-200k_comp1k.py https://download.openmmlab.com/mmediting/mattors/gca/gca_r34_4x10_200k_comp1k_SAD-33.38_20220615-65595f39.pth

## 多个GPU上测试
./tools/dist_test.sh configs/gca/gca_r34_4xb10-200k_comp1k.py https://download.openmmlab.com/mmediting/mattors/gca/gca_r34_4x10_200k_comp1k_SAD-33.38_20220615-65595f39.pth 8

更多细节可以参考 train_test.md 中的 Test a pre-trained model 部分。

IndexNet (ICCV’2019)

任务: 图像抠图

IndexNet (ICCV'2019)
@inproceedings{hao2019indexnet,
  title={Indices Matter: Learning to Index for Deep Image Matting},
  author={Lu, Hao and Dai, Yutong and Shen, Chunhua and Xu, Songcen},
  booktitle={Proc. IEEE/CVF International Conference on Computer Vision (ICCV)},
  year={2019}
}

算法 SAD MSE GRAD CONN GPU 信息 下载
M2O DINs (原文) 45.8 0.013 25.9 43.7 - -
M2O DINs (复现) 45.6 0.012 25.5 44.8 1 模型 | 日志

The performance of training (best performance) with different random seeds diverges in a large range. You may need to run several experiments for each setting to obtain the above performance.

其他结果

算法 SAD MSE GRAD CONN GPU 信息 下载
M2O DINs (使用 DIM 流水线) 50.1 0.016 30.8 49.5 1 模型 | 日志

快速开始

训练

训练说明

您可以使用以下命令来训练模型。

## CPU上训练
CUDA_VISIBLE_DEVICES=-1 python tools/train.py configs/indexnet/indexnet_mobv2_1xb16-78k_comp1k.py

## 单个GPU上训练
python tools/train.py configs/indexnet/indexnet_mobv2_1xb16-78k_comp1k.py

## 多个GPU上训练
./tools/dist_train.sh configs/indexnet/indexnet_mobv2_1xb16-78k_comp1k.py 8

更多细节可以参考 train_test.md 中的 Train a model 部分。

测试

测试说明

您可以使用以下命令来测试模型。

## CPU上测试
CUDA_VISIBLE_DEVICES=-1 python tools/test.py configs/indexnet/indexnet_mobv2_1xb16-78k_comp1k.py https://download.openmmlab.com/mmediting/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k_SAD-45.6_20200618_173817-26dd258d.pth

## 单个GPU上测试
python tools/test.py configs/indexnet/indexnet_mobv2_1xb16-78k_comp1k.py https://download.openmmlab.com/mmediting/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k_SAD-45.6_20200618_173817-26dd258d.pth

## 多个GPU上测试
./tools/dist_test.sh configs/indexnet/indexnet_mobv2_1xb16-78k_comp1k.py https://download.openmmlab.com/mmediting/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k_SAD-45.6_20200618_173817-26dd258d.pth 8

更多细节可以参考 train_test.md 中的 Test a pre-trained model 部分。

DIM (CVPR’2017)

任务: 图像抠图

DIM (CVPR'2017)
@inproceedings{xu2017deep,
  title={Deep image matting},
  author={Xu, Ning and Price, Brian and Cohen, Scott and Huang, Thomas},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={2970--2979},
  year={2017}
}

算法 SAD MSE GRAD CONN GPU 信息 下载
第一阶段 (原文) 54.6 0.017 36.7 55.3 - -
第三阶段 (原文) 50.4 0.014 31.0 50.8 - -
第一阶段 (复现) 53.8 0.017 32.7 54.5 1 模型 | 日志
第二阶段 (复现) 52.3 0.016 29.4 52.4 1 模型 | 日志
第三阶段 (复现) 50.6 0.015 29.0 50.7 1 模型 | 日志
第一阶段 (online merge) - - - - - -

  • 第一阶段:训练不带精炼器的编码器-解码器部分。 \

  • 第二阶段:固定编码器-解码器部分,训练精炼器部分。 \

  • 第三阶段:微调整个网络模型。

模型在训练过程中的性能不稳定。因此,展示的性能并非来自最后一个模型权重文件,而是训练期间在验证集上取得的最佳性能。

不同随机种子的训练性能(最佳性能)的发散程度很大,您可能需要为每个设置运行多个实验以获得上述性能。

快速开始

训练

训练说明

您可以使用以下命令来训练模型。

DIM 训练有三个阶段。

阶段 1: 训练不带精炼器的编码器-解码器部分。

## CPU上训练
CUDA_VISIBLE_DEVICES=-1 python tools/train.py configs/dim/dim_stage1-v16_1xb1-1000k_comp1k.py

## 单个GPU上训练
python tools/train.py configs/dim/dim_stage1-v16_1xb1-1000k_comp1k.py

## 多个GPU上训练
./tools/dist_train.sh configs/dim/dim_stage1-v16_1xb1-1000k_comp1k.py 8

阶段 2: 固定编码器-解码器部分,训练精炼器部分。

## CPU上训练
CUDA_VISIBLE_DEVICES=-1 python tools/train.py configs/dim/dim_stage2-v16-pln_1xb1-1000k_comp1k.py

## 单个GPU上训练
python tools/train.py configs/dim/dim_stage2-v16-pln_1xb1-1000k_comp1k.py

## 多个GPU上训练
./tools/dist_train.sh configs/dim/dim_stage2-v16-pln_1xb1-1000k_comp1k.py 8

阶段 3: 微调整个网络模型。

## CPU上训练
CUDA_VISIBLE_DEVICES=-1 python tools/train.py configs/dim/dim_stage3-v16-pln_1xb1-1000k_comp1k.py

## 单个GPU上训练
python tools/train.py configs/dim/dim_stage3-v16-pln_1xb1-1000k_comp1k.py

## 多个GPU上训练
./tools/dist_train.sh configs/dim/dim_stage3-v16-pln_1xb1-1000k_comp1k.py 8

更多细节可以参考 train_test.md 中的 Train a model 部分。

测试

测试说明

您可以使用以下命令来测试模型。

## CPU上测试
CUDA_VISIBLE_DEVICES=-1 python tools/test.py onfigs/dim/dim_stage3-v16-pln_1xb1-1000k_comp1k.py https://download.openmmlab.com/mmediting/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k_SAD-50.6_20200609_111851-647f24b6.pth

## 单个GPU上测试
python tools/test.py onfigs/dim/dim_stage3-v16-pln_1xb1-1000k_comp1k.py https://download.openmmlab.com/mmediting/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k_SAD-50.6_20200609_111851-647f24b6.pth

## 多个GPU上测试
./tools/dist_test.sh onfigs/dim/dim_stage3-v16-pln_1xb1-1000k_comp1k.py https://download.openmmlab.com/mmediting/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k_SAD-50.6_20200609_111851-647f24b6.pth 8

更多细节可以参考 train_test.md 中的 Test a pre-trained model 部分。

Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.