图像语义分割python_图像标签的单阶段语义分割(CVPR 2020)

该资源提供了仅使用图像级注释进行自我监督训练的单阶段语义分割方法,实现对Pascal VOC 2012数据集的分割。通过训练单一网络模型,即使在没有像素级标签的情况下,也能获得具有竞争力的结果。
摘要由CSDN通过智能技术生成

Single-Stage Semantic Segmentation from Image Labels

This repository contains the original implementation of our paper:

Single-stage Semantic Segmentation from Image Labels

results.gif

We attain competitive results by training a single network model

for segmentation in a self-supervised fashion using only

image-level annotations (one run of 20 epochs on Pascal VOC).

Setup

Minimum requirements. This project was originally developed with Python 3.6, PyTorch 1.0 and CUDA 9.0. The training requires at least two Titan X GPUs (12Gb memory each).

Setup your Python environment. Please, clone the repository and install the dependencies. We recommend using Anaconda 3 distribution: conda create -n --file requirements.txt

Download and link to the dataset. We train our model on the original Pascal VOC 2012 augmented with the SBD data (10K images in total). Download the data from:

Link to the data: ln -s /data/voc

ln -s /data/sbd

Make sure that the first directory in data/voc is VOCdevkit; the first directory in data/sbd is benchmark_RELEASE.

Download pre-trained models. Download the initial weights (pre-trained on ImageNet) for the backbones you are planning to use and place them into /models/weights/.

Backbone

Initial Weights

Comment

Training, Inference and Evaluation

The directory launch contains template bash scripts for training, inference and evaluation.

Training. For each run, you need to specify names of two variables, for example

EXP=baselines

RUN_ID=v01

Running bash ./launch/run_voc_resnet38.sh will create a directory ./logs/pascal_voc/baselines/v01 with tensorboard events and will save snapshots into ./snapshots/pascal_voc/baselines/v01.

Inference. To generate final masks, please, use the script ./launch/infer_val.sh. You will need to specify:

EXP and RUN_ID you used for training;

OUTPUT_DIR the path where to save the masks;

FILELIST specifies the file to the data split;

SNAPSHOT specifies the model suffix in the format e000Xs0.000. For example, e020Xs0.928;

(optionally) EXTRA_ARGS specify additional arguments to the inference script.

Evaluation. To compute IoU of the masks, please, run ./launch/eval_seg.sh. You will need to specify SAVE_DIR that contains the masks and FILELIST specifying the split for evaluation.

Pre-trained model

For testing, we provide our pre-trained WideResNet38 model:

Backbone

Val

Val (+ CRF)

Link

The also release the masks predicted by this model:

Split

IoU

IoU (+ CRF)

Link

Comment

The suffix -clean means we used ground-truth image-level labels to remove masks of the categories not present in the image. These masks are commonly used as pseudo ground truth to train another segmentation model in fully supervised regime.

Acknowledgements

We thank PyTorch team, and Jiwoon Ahn for releasing his code that helped in the early stages of this project.

Citation

We hope that you find this work useful. If you would like to acknowledge us, please, use the following citation:

@inproceedings{Araslanov:2020:WSEG,

title = {Single-Stage Semantic Segmentation from Image Labels},

author = {Araslanov, Nikita and and Roth, Stefan},

booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},

year = {2020}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值