Upload folder using huggingface_hub
Browse files- README.md +90 -0
- line1/cityscapes/FCN_r50SS3PR-d16_cityscapes/config.py +195 -0
- line1/cityscapes/FCN_r50SS3PR-d16_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/FCN_r50SS3PR-d32_cityscapes/config.py +196 -0
- line1/cityscapes/FCN_r50SS3PR-d32_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/FCN_r50SS3PR-d8_cityscapes/config.py +195 -0
- line1/cityscapes/FCN_r50SS3PR-d8_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/ccnet_r50SS3PR-d16_cityscapes/config.py +195 -0
- line1/cityscapes/ccnet_r50SS3PR-d16_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/ccnet_r50SS3PR-d32_cityscapes/config.py +196 -0
- line1/cityscapes/ccnet_r50SS3PR-d32_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/ccnet_r50SS3PR-d8_cityscapes/config.py +196 -0
- line1/cityscapes/ccnet_r50SS3PR-d8_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/isanet_r50SS3PR-d16_cityscapes/config.py +198 -0
- line1/cityscapes/isanet_r50SS3PR-d16_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/isanet_r50SS3PR-d32_cityscapes/config.py +199 -0
- line1/cityscapes/isanet_r50SS3PR-d32_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/isanet_r50SS3PR-d8_cityscapes/config.py +197 -0
- line1/cityscapes/isanet_r50SS3PR-d8_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/pcaa_r50SSPR-d16_cityscapes/config.py +190 -0
- line1/cityscapes/pcaa_r50SSPR-d16_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/pcaa_r50SSPR-d32_cityscapes/config.py +191 -0
- line1/cityscapes/pcaa_r50SSPR-d32_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/pspnet_r50SS3PR-d16_cityscapes/config.py +197 -0
- line1/cityscapes/pspnet_r50SS3PR-d16_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/pspnet_r50SS3PR-d32_cityscapes/config.py +199 -0
- line1/cityscapes/pspnet_r50SS3PR-d32_cityscapes/iter_40000.pth +3 -0
- line1/cityscapes/pspnet_r50SS3PR-d8_cityscapes/config.py +197 -0
- line1/cityscapes/pspnet_r50SS3PR-d8_cityscapes/iter_40000.pth +3 -0
- line1/pascalcontext/FCN_r50SS3PR-d32_pascalcontext/config.py +203 -0
- line1/pascalcontext/FCN_r50SS3PR-d32_pascalcontext/iter_40000.pth +3 -0
- line1/pascalcontext/ccnet_r50SS3PR-d32_pascalcontext/config.py +200 -0
- line1/pascalcontext/ccnet_r50SS3PR-d32_pascalcontext/iter_40000.pth +3 -0
- line1/pascalcontext/isanet_r50SS3PR-d32_pascalcontext/config.py +202 -0
- line1/pascalcontext/isanet_r50SS3PR-d32_pascalcontext/iter_40000.pth +3 -0
- line1/pascalcontext/pspnet_r50SS3PR-d32_pascalcontext/config.py +200 -0
- line1/pascalcontext/pspnet_r50SS3PR-d32_pascalcontext/iter_40000.pth +3 -0
- line2/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2/best_mIoU_iter_150000.pth +3 -0
- line2/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2/config.py +483 -0
README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SFM: Spatial Frequency Modulation for Semantic Segmentation (TPAMI 2025)
|
| 2 |
+
|
| 3 |
+
Official checkpoints for the paper **Spatial Frequency Modulation for Semantic Segmentation**
|
| 4 |
+
(TPAMI 2025, [arXiv:2507.11893](https://arxiv.org/abs/2507.11893),
|
| 5 |
+
DOI [10.1109/TPAMI.2025.3592621](https://doi.org/10.1109/TPAMI.2025.3592621)).
|
| 6 |
+
|
| 7 |
+
Code: **https://github.com/Linwei-Chen/SFM**
|
| 8 |
+
|
| 9 |
+
Two released technical lines:
|
| 10 |
+
|
| 11 |
+
- **Line 1 — FCN-style models**: ARS + qhull non-uniform upsampling (MSAU, paper Eq. 17/18)
|
| 12 |
+
+ cascaded LPRM, built on mmsegmentation 0.25.0.
|
| 13 |
+
Eval code and the 18 configs: [`SFM_mmseg0x/`](https://github.com/Linwei-Chen/SFM/tree/main/SFM_mmseg0x).
|
| 14 |
+
- **Line 2 — FPN**: ARS + CARAFE-style feature reassembly with 3-point dynamic-sampling
|
| 15 |
+
weighted alignment, on Mask2Former (mmsegmentation 1.x).
|
| 16 |
+
Code and config: [`SFM_mask2former/`](https://github.com/Linwei-Chen/SFM/tree/main/SFM_mask2former).
|
| 17 |
+
|
| 18 |
+
Every checkpoint below is **verified from training/eval logs to meet or exceed the
|
| 19 |
+
paper-reported mIoU**. Each model folder contains `config.py` (the exact config paired
|
| 20 |
+
with that checkpoint) and the weight file.
|
| 21 |
+
|
| 22 |
+
## Line 1 — Cityscapes (val mIoU, ResNet-50)
|
| 23 |
+
|
| 24 |
+
| folder | paper | measured |
|
| 25 |
+
| --- | --- | --- |
|
| 26 |
+
| `line1/cityscapes/ccnet_r50SS3PR-d32_cityscapes` | 76.3 | **76.34** |
|
| 27 |
+
| `line1/cityscapes/ccnet_r50SS3PR-d16_cityscapes` | 78.5 | 78.45 |
|
| 28 |
+
| `line1/cityscapes/ccnet_r50SS3PR-d8_cityscapes` | 79.3 | **79.39** |
|
| 29 |
+
| `line1/cityscapes/isanet_r50SS3PR-d32_cityscapes` (OCNet) | 75.8 | **75.82** |
|
| 30 |
+
| `line1/cityscapes/isanet_r50SS3PR-d16_cityscapes` (OCNet) | 78.0 | **78.00** |
|
| 31 |
+
| `line1/cityscapes/isanet_r50SS3PR-d8_cityscapes` (OCNet) | 79.7 | **79.74** |
|
| 32 |
+
| `line1/cityscapes/FCN_r50SS3PR-d32_cityscapes` | 76.2 | **76.20** |
|
| 33 |
+
| `line1/cityscapes/FCN_r50SS3PR-d16_cityscapes` | 77.8 | 77.78 |
|
| 34 |
+
| `line1/cityscapes/FCN_r50SS3PR-d8_cityscapes` | 78.7 | 78.65 |
|
| 35 |
+
| `line1/cityscapes/pspnet_r50SS3PR-d32_cityscapes` | 76.0 | **76.18** |
|
| 36 |
+
| `line1/cityscapes/pspnet_r50SS3PR-d16_cityscapes` | 78.1 | 78.05 |
|
| 37 |
+
| `line1/cityscapes/pspnet_r50SS3PR-d8_cityscapes` | 79.5 | **79.52** |
|
| 38 |
+
| `line1/cityscapes/pcaa_r50SSPR-d32_cityscapes` (PCAA, col. 1) | 76.8 | **76.83** |
|
| 39 |
+
| `line1/cityscapes/pcaa_r50SSPR-d16_cityscapes` (PCAA, col. 2) | 77.9 | 77.86 |
|
| 40 |
+
|
| 41 |
+
Weight file in each folder: `iter_40000.pth`.
|
| 42 |
+
|
| 43 |
+
## Line 1 — PascalContext-59 (val mIoU, ResNet-50)
|
| 44 |
+
|
| 45 |
+
| folder | paper | measured |
|
| 46 |
+
| --- | --- | --- |
|
| 47 |
+
| `line1/pascalcontext/FCN_r50SS3PR-d32_pascalcontext` | 46.0 | **46.35** |
|
| 48 |
+
| `line1/pascalcontext/pspnet_r50SS3PR-d32_pascalcontext` | 49.7 | 49.68 |
|
| 49 |
+
| `line1/pascalcontext/ccnet_r50SS3PR-d32_pascalcontext` | 49.1 | 49.07 |
|
| 50 |
+
| `line1/pascalcontext/isanet_r50SS3PR-d32_pascalcontext` (OCNet) | 49.9 | 49.85 |
|
| 51 |
+
|
| 52 |
+
## Line 2 — ADE20K (val mIoU, Mask2Former Swin-T)
|
| 53 |
+
|
| 54 |
+
| folder | paper | measured |
|
| 55 |
+
| --- | --- | --- |
|
| 56 |
+
| `line2/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2` | 49.1 | **49.34** (re-evaluated 2025-10) |
|
| 57 |
+
|
| 58 |
+
Weight file: `best_mIoU_iter_150000.pth`.
|
| 59 |
+
|
| 60 |
+
## Evaluation
|
| 61 |
+
|
| 62 |
+
**Line 1** (see [`SFM_mmseg0x/README.md`](https://github.com/Linwei-Chen/SFM/blob/main/SFM_mmseg0x/README.md)
|
| 63 |
+
for environment setup and qhull compilation):
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
PYTHONPATH=<SFM_mmseg0x> python tools/test.py \
|
| 67 |
+
<model_folder>/config.py <model_folder>/iter_40000.pth --eval mIoU
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
**Line 2** (see [`SFM_mask2former/`](https://github.com/Linwei-Chen/SFM/tree/main/SFM_mask2former)):
|
| 71 |
+
download the checkpoint, point `load_from` in
|
| 72 |
+
[`mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2.py`](https://github.com/Linwei-Chen/SFM/blob/main/SFM_mask2former/configs/mask2former/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2.py)
|
| 73 |
+
to it, then run the standard mmseg 1.x `tools/test.py` with the config.
|
| 74 |
+
|
| 75 |
+
## Citation
|
| 76 |
+
|
| 77 |
+
```bibtex
|
| 78 |
+
@article{chen2023spatialfrequency,
|
| 79 |
+
title={Spatial Frequency Modulation for Semantic Segmentation},
|
| 80 |
+
author={Chen, Linwei and Fu, Ying and Gu, Lin and Zheng, Dezhi and Dai, Jifeng},
|
| 81 |
+
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
|
| 82 |
+
year={2025},
|
| 83 |
+
volume={47},
|
| 84 |
+
number={11},
|
| 85 |
+
pages={9767-9784},
|
| 86 |
+
doi={10.1109/TPAMI.2025.3592621}
|
| 87 |
+
}
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
Code is released under the Apache-2.0 license.
|
line1/cityscapes/FCN_r50SS3PR-d16_cityscapes/config.py
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
model = dict(
|
| 141 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 142 |
+
log_dir=None,
|
| 143 |
+
edge_loss_weight=100,
|
| 144 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 145 |
+
sampler_num=3,
|
| 146 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 147 |
+
backbone=dict(
|
| 148 |
+
type='ResNetV1cSaliencySampler',
|
| 149 |
+
log_dir=None,
|
| 150 |
+
sampler_num=3,
|
| 151 |
+
sampler_strides=(1, 1, 1),
|
| 152 |
+
sampler_paddings=(5, 5, 5),
|
| 153 |
+
sampler_fwhm=(3, 3, 3),
|
| 154 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge', 'none'),
|
| 155 |
+
use_lpf=False,
|
| 156 |
+
depth=50,
|
| 157 |
+
num_stages=4,
|
| 158 |
+
out_indices=(0, 1, 2, 3),
|
| 159 |
+
dilations=(1, 1, 1, 2),
|
| 160 |
+
strides=(1, 2, 2, 1),
|
| 161 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 162 |
+
norm_eval=False,
|
| 163 |
+
style='pytorch',
|
| 164 |
+
contract_dilation=True),
|
| 165 |
+
decode_head=dict(
|
| 166 |
+
type='FCNHead',
|
| 167 |
+
in_channels=2048,
|
| 168 |
+
in_index=3,
|
| 169 |
+
channels=512,
|
| 170 |
+
num_convs=2,
|
| 171 |
+
concat_input=True,
|
| 172 |
+
dropout_ratio=0.1,
|
| 173 |
+
num_classes=19,
|
| 174 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 175 |
+
align_corners=True,
|
| 176 |
+
loss_decode=dict(
|
| 177 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 178 |
+
auxiliary_head=dict(
|
| 179 |
+
type='FCNHead',
|
| 180 |
+
in_channels=1024,
|
| 181 |
+
in_index=2,
|
| 182 |
+
channels=256,
|
| 183 |
+
num_convs=1,
|
| 184 |
+
concat_input=False,
|
| 185 |
+
dropout_ratio=0.1,
|
| 186 |
+
num_classes=19,
|
| 187 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 188 |
+
align_corners=True,
|
| 189 |
+
loss_decode=dict(
|
| 190 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 191 |
+
train_cfg=dict(),
|
| 192 |
+
test_cfg=dict(mode='whole'))
|
| 193 |
+
work_dir = 'work_dirs'
|
| 194 |
+
gpu_ids = [0]
|
| 195 |
+
auto_resume = False
|
line1/cityscapes/FCN_r50SS3PR-d16_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94d51c81fc1c4fb041cf48d21b19c692646390038151945e11e0f78b80ef16d2
|
| 3 |
+
size 399506919
|
line1/cityscapes/FCN_r50SS3PR-d32_cityscapes/config.py
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
model = dict(
|
| 141 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 142 |
+
log_dir=None,
|
| 143 |
+
edge_loss_weight=100,
|
| 144 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 145 |
+
sampler_num=3,
|
| 146 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 147 |
+
backbone=dict(
|
| 148 |
+
type='ResNetV1cSaliencySampler',
|
| 149 |
+
log_dir=None,
|
| 150 |
+
sampler_num=3,
|
| 151 |
+
sampler_strides=(1, 1, 1),
|
| 152 |
+
sampler_paddings=(5, 5, 5),
|
| 153 |
+
sampler_fwhm=(3, 3, 3),
|
| 154 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 155 |
+
'avgpsp_semantic_edge'),
|
| 156 |
+
use_lpf=False,
|
| 157 |
+
depth=50,
|
| 158 |
+
num_stages=4,
|
| 159 |
+
out_indices=(0, 1, 2, 3),
|
| 160 |
+
dilations=(1, 1, 1, 1),
|
| 161 |
+
strides=(1, 2, 2, 2),
|
| 162 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 163 |
+
norm_eval=False,
|
| 164 |
+
style='pytorch',
|
| 165 |
+
contract_dilation=True),
|
| 166 |
+
decode_head=dict(
|
| 167 |
+
type='FCNHead',
|
| 168 |
+
in_channels=2048,
|
| 169 |
+
in_index=3,
|
| 170 |
+
channels=512,
|
| 171 |
+
num_convs=2,
|
| 172 |
+
concat_input=True,
|
| 173 |
+
dropout_ratio=0.1,
|
| 174 |
+
num_classes=19,
|
| 175 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 176 |
+
align_corners=True,
|
| 177 |
+
loss_decode=dict(
|
| 178 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 179 |
+
auxiliary_head=dict(
|
| 180 |
+
type='FCNHead',
|
| 181 |
+
in_channels=1024,
|
| 182 |
+
in_index=2,
|
| 183 |
+
channels=256,
|
| 184 |
+
num_convs=1,
|
| 185 |
+
concat_input=False,
|
| 186 |
+
dropout_ratio=0.1,
|
| 187 |
+
num_classes=19,
|
| 188 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 189 |
+
align_corners=True,
|
| 190 |
+
loss_decode=dict(
|
| 191 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 192 |
+
train_cfg=dict(),
|
| 193 |
+
test_cfg=dict(mode='whole'))
|
| 194 |
+
work_dir = 'work_dirs'
|
| 195 |
+
gpu_ids = [0]
|
| 196 |
+
auto_resume = False
|
line1/cityscapes/FCN_r50SS3PR-d32_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6d30f1787ef746cd7347ccc81ecdb169e696817678a7cf7fcab9860bd3decf3
|
| 3 |
+
size 407952719
|
line1/cityscapes/FCN_r50SS3PR-d8_cityscapes/config.py
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
model = dict(
|
| 141 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 142 |
+
log_dir=None,
|
| 143 |
+
edge_loss_weight=100,
|
| 144 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 145 |
+
sampler_num=3,
|
| 146 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 147 |
+
backbone=dict(
|
| 148 |
+
type='ResNetV1cSaliencySampler',
|
| 149 |
+
log_dir=None,
|
| 150 |
+
sampler_num=3,
|
| 151 |
+
sampler_strides=(1, 1, 1),
|
| 152 |
+
sampler_paddings=(5, 5, 5),
|
| 153 |
+
sampler_fwhm=(3, 3, 3),
|
| 154 |
+
sampler_mode=('avgpsp_semantic_edge', 'none', 'none'),
|
| 155 |
+
use_lpf=False,
|
| 156 |
+
depth=50,
|
| 157 |
+
num_stages=4,
|
| 158 |
+
out_indices=(0, 1, 2, 3),
|
| 159 |
+
dilations=(1, 1, 2, 4),
|
| 160 |
+
strides=(1, 2, 1, 1),
|
| 161 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 162 |
+
norm_eval=False,
|
| 163 |
+
style='pytorch',
|
| 164 |
+
contract_dilation=True),
|
| 165 |
+
decode_head=dict(
|
| 166 |
+
type='FCNHead',
|
| 167 |
+
in_channels=2048,
|
| 168 |
+
in_index=3,
|
| 169 |
+
channels=512,
|
| 170 |
+
num_convs=2,
|
| 171 |
+
concat_input=True,
|
| 172 |
+
dropout_ratio=0.1,
|
| 173 |
+
num_classes=19,
|
| 174 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 175 |
+
align_corners=True,
|
| 176 |
+
loss_decode=dict(
|
| 177 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 178 |
+
auxiliary_head=dict(
|
| 179 |
+
type='FCNHead',
|
| 180 |
+
in_channels=1024,
|
| 181 |
+
in_index=2,
|
| 182 |
+
channels=256,
|
| 183 |
+
num_convs=1,
|
| 184 |
+
concat_input=False,
|
| 185 |
+
dropout_ratio=0.1,
|
| 186 |
+
num_classes=19,
|
| 187 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 188 |
+
align_corners=True,
|
| 189 |
+
loss_decode=dict(
|
| 190 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 191 |
+
train_cfg=dict(),
|
| 192 |
+
test_cfg=dict(mode='whole'))
|
| 193 |
+
work_dir = 'work_dirs'
|
| 194 |
+
gpu_ids = [0]
|
| 195 |
+
auto_resume = False
|
line1/cityscapes/FCN_r50SS3PR-d8_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d6efdfab4af26f719d3d14f8254ec58cb631548bc4eeb1542cf302e967b7d76
|
| 3 |
+
size 397373119
|
line1/cityscapes/ccnet_r50SS3PR-d16_cityscapes/config.py
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge', 'none'),
|
| 156 |
+
align_corners=True,
|
| 157 |
+
depth=50,
|
| 158 |
+
num_stages=4,
|
| 159 |
+
out_indices=(0, 1, 2, 3),
|
| 160 |
+
dilations=(1, 1, 1, 2),
|
| 161 |
+
strides=(1, 2, 2, 1),
|
| 162 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 163 |
+
norm_eval=False,
|
| 164 |
+
style='pytorch',
|
| 165 |
+
contract_dilation=True),
|
| 166 |
+
decode_head=dict(
|
| 167 |
+
type='CCHead',
|
| 168 |
+
in_channels=2048,
|
| 169 |
+
in_index=3,
|
| 170 |
+
channels=512,
|
| 171 |
+
recurrence=2,
|
| 172 |
+
dropout_ratio=0.1,
|
| 173 |
+
num_classes=19,
|
| 174 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 175 |
+
align_corners=True,
|
| 176 |
+
loss_decode=dict(
|
| 177 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 178 |
+
auxiliary_head=dict(
|
| 179 |
+
type='FCNHead',
|
| 180 |
+
in_channels=1024,
|
| 181 |
+
in_index=2,
|
| 182 |
+
channels=256,
|
| 183 |
+
num_convs=1,
|
| 184 |
+
concat_input=False,
|
| 185 |
+
dropout_ratio=0.1,
|
| 186 |
+
num_classes=19,
|
| 187 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 188 |
+
align_corners=True,
|
| 189 |
+
loss_decode=dict(
|
| 190 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 191 |
+
train_cfg=dict(),
|
| 192 |
+
test_cfg=dict(mode='whole'))
|
| 193 |
+
work_dir = 'work_dirs'
|
| 194 |
+
gpu_ids = [0]
|
| 195 |
+
auto_resume = False
|
line1/cityscapes/ccnet_r50SS3PR-d16_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07235190b73871be8b7e8ad73a29e4ef589167947883a72918bde34272a66d02
|
| 3 |
+
size 402138917
|
line1/cityscapes/ccnet_r50SS3PR-d32_cityscapes/config.py
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 156 |
+
'avgpsp_semantic_edge'),
|
| 157 |
+
align_corners=True,
|
| 158 |
+
depth=50,
|
| 159 |
+
num_stages=4,
|
| 160 |
+
out_indices=(0, 1, 2, 3),
|
| 161 |
+
dilations=(1, 1, 1, 1),
|
| 162 |
+
strides=(1, 2, 2, 2),
|
| 163 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 164 |
+
norm_eval=False,
|
| 165 |
+
style='pytorch',
|
| 166 |
+
contract_dilation=True),
|
| 167 |
+
decode_head=dict(
|
| 168 |
+
type='CCHead',
|
| 169 |
+
in_channels=2048,
|
| 170 |
+
in_index=3,
|
| 171 |
+
channels=512,
|
| 172 |
+
recurrence=2,
|
| 173 |
+
dropout_ratio=0.1,
|
| 174 |
+
num_classes=19,
|
| 175 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 176 |
+
align_corners=True,
|
| 177 |
+
loss_decode=dict(
|
| 178 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 179 |
+
auxiliary_head=dict(
|
| 180 |
+
type='FCNHead',
|
| 181 |
+
in_channels=1024,
|
| 182 |
+
in_index=2,
|
| 183 |
+
channels=256,
|
| 184 |
+
num_convs=1,
|
| 185 |
+
concat_input=False,
|
| 186 |
+
dropout_ratio=0.1,
|
| 187 |
+
num_classes=19,
|
| 188 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 189 |
+
align_corners=True,
|
| 190 |
+
loss_decode=dict(
|
| 191 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 192 |
+
train_cfg=dict(),
|
| 193 |
+
test_cfg=dict(mode='whole'))
|
| 194 |
+
work_dir = 'work_dirs'
|
| 195 |
+
gpu_ids = [0]
|
| 196 |
+
auto_resume = False
|
line1/cityscapes/ccnet_r50SS3PR-d32_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:571a0a2671fa9e9093ca448109b7a699a11a8547dbab305c58da7244364a37d9
|
| 3 |
+
size 410566315
|
line1/cityscapes/ccnet_r50SS3PR-d8_cityscapes/config.py
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'none', 'none'),
|
| 156 |
+
psp_ratio=4,
|
| 157 |
+
align_corners=True,
|
| 158 |
+
depth=50,
|
| 159 |
+
num_stages=4,
|
| 160 |
+
out_indices=(0, 1, 2, 3),
|
| 161 |
+
dilations=(1, 1, 2, 4),
|
| 162 |
+
strides=(1, 2, 1, 1),
|
| 163 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 164 |
+
norm_eval=False,
|
| 165 |
+
style='pytorch',
|
| 166 |
+
contract_dilation=True),
|
| 167 |
+
decode_head=dict(
|
| 168 |
+
type='CCHead',
|
| 169 |
+
in_channels=2048,
|
| 170 |
+
in_index=3,
|
| 171 |
+
channels=512,
|
| 172 |
+
recurrence=2,
|
| 173 |
+
dropout_ratio=0.1,
|
| 174 |
+
num_classes=19,
|
| 175 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 176 |
+
align_corners=True,
|
| 177 |
+
loss_decode=dict(
|
| 178 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 179 |
+
auxiliary_head=dict(
|
| 180 |
+
type='FCNHead',
|
| 181 |
+
in_channels=1024,
|
| 182 |
+
in_index=2,
|
| 183 |
+
channels=256,
|
| 184 |
+
num_convs=1,
|
| 185 |
+
concat_input=False,
|
| 186 |
+
dropout_ratio=0.1,
|
| 187 |
+
num_classes=19,
|
| 188 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 189 |
+
align_corners=True,
|
| 190 |
+
loss_decode=dict(
|
| 191 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 192 |
+
train_cfg=dict(),
|
| 193 |
+
test_cfg=dict(mode='whole'))
|
| 194 |
+
work_dir = 'work_dirs'
|
| 195 |
+
gpu_ids = [0]
|
| 196 |
+
auto_resume = False
|
line1/cityscapes/ccnet_r50SS3PR-d8_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3dab9ec69e3c720630d271a508b0b7343ecf10771d8628bc2094fb39d54db57c
|
| 3 |
+
size 400005565
|
line1/cityscapes/isanet_r50SS3PR-d16_cityscapes/config.py
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge', 'none'),
|
| 156 |
+
use_lpf=False,
|
| 157 |
+
use_checkpoint=False,
|
| 158 |
+
align_corners=True,
|
| 159 |
+
depth=50,
|
| 160 |
+
num_stages=4,
|
| 161 |
+
out_indices=(0, 1, 2, 3),
|
| 162 |
+
dilations=(1, 1, 1, 2),
|
| 163 |
+
strides=(1, 2, 2, 1),
|
| 164 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 165 |
+
norm_eval=False,
|
| 166 |
+
style='pytorch',
|
| 167 |
+
contract_dilation=True),
|
| 168 |
+
decode_head=dict(
|
| 169 |
+
type='ISAHead',
|
| 170 |
+
in_channels=2048,
|
| 171 |
+
in_index=3,
|
| 172 |
+
channels=512,
|
| 173 |
+
isa_channels=256,
|
| 174 |
+
down_factor=(8, 8),
|
| 175 |
+
dropout_ratio=0.1,
|
| 176 |
+
num_classes=19,
|
| 177 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 178 |
+
align_corners=True,
|
| 179 |
+
loss_decode=dict(
|
| 180 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 181 |
+
auxiliary_head=dict(
|
| 182 |
+
type='FCNHead',
|
| 183 |
+
in_channels=1024,
|
| 184 |
+
in_index=2,
|
| 185 |
+
channels=256,
|
| 186 |
+
num_convs=1,
|
| 187 |
+
concat_input=False,
|
| 188 |
+
dropout_ratio=0.1,
|
| 189 |
+
num_classes=19,
|
| 190 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 191 |
+
align_corners=True,
|
| 192 |
+
loss_decode=dict(
|
| 193 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 194 |
+
train_cfg=dict(),
|
| 195 |
+
test_cfg=dict(mode='whole'))
|
| 196 |
+
work_dir = 'work_dirs'
|
| 197 |
+
gpu_ids = [0]
|
| 198 |
+
auto_resume = False
|
line1/cityscapes/isanet_r50SS3PR-d16_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f0c2fc75e729225551fe0c9f85f617a054699bcd640cbe85eccc8b340172244
|
| 3 |
+
size 305241224
|
line1/cityscapes/isanet_r50SS3PR-d32_cityscapes/config.py
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 156 |
+
'avgpsp_semantic_edge'),
|
| 157 |
+
use_lpf=False,
|
| 158 |
+
use_checkpoint=False,
|
| 159 |
+
align_corners=True,
|
| 160 |
+
depth=50,
|
| 161 |
+
num_stages=4,
|
| 162 |
+
out_indices=(0, 1, 2, 3),
|
| 163 |
+
dilations=(1, 1, 1, 1),
|
| 164 |
+
strides=(1, 2, 2, 2),
|
| 165 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 166 |
+
norm_eval=False,
|
| 167 |
+
style='pytorch',
|
| 168 |
+
contract_dilation=True),
|
| 169 |
+
decode_head=dict(
|
| 170 |
+
type='ISAHead',
|
| 171 |
+
in_channels=2048,
|
| 172 |
+
in_index=3,
|
| 173 |
+
channels=512,
|
| 174 |
+
isa_channels=256,
|
| 175 |
+
down_factor=(8, 8),
|
| 176 |
+
dropout_ratio=0.1,
|
| 177 |
+
num_classes=19,
|
| 178 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 179 |
+
align_corners=True,
|
| 180 |
+
loss_decode=dict(
|
| 181 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 182 |
+
auxiliary_head=dict(
|
| 183 |
+
type='FCNHead',
|
| 184 |
+
in_channels=1024,
|
| 185 |
+
in_index=2,
|
| 186 |
+
channels=256,
|
| 187 |
+
num_convs=1,
|
| 188 |
+
concat_input=False,
|
| 189 |
+
dropout_ratio=0.1,
|
| 190 |
+
num_classes=19,
|
| 191 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 192 |
+
align_corners=True,
|
| 193 |
+
loss_decode=dict(
|
| 194 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 195 |
+
train_cfg=dict(),
|
| 196 |
+
test_cfg=dict(mode='whole'))
|
| 197 |
+
work_dir = 'work_dirs'
|
| 198 |
+
gpu_ids = [0]
|
| 199 |
+
auto_resume = False
|
line1/cityscapes/isanet_r50SS3PR-d32_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b401459ecf697ad6696266d3e18974291c24ab51a8ba8975118e4416110a27e
|
| 3 |
+
size 313687024
|
line1/cityscapes/isanet_r50SS3PR-d8_cityscapes/config.py
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'none', 'none'),
|
| 156 |
+
use_checkpoint=True,
|
| 157 |
+
align_corners=True,
|
| 158 |
+
depth=50,
|
| 159 |
+
num_stages=4,
|
| 160 |
+
out_indices=(0, 1, 2, 3),
|
| 161 |
+
dilations=(1, 1, 2, 4),
|
| 162 |
+
strides=(1, 2, 1, 1),
|
| 163 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 164 |
+
norm_eval=False,
|
| 165 |
+
style='pytorch',
|
| 166 |
+
contract_dilation=True),
|
| 167 |
+
decode_head=dict(
|
| 168 |
+
type='ISAHead',
|
| 169 |
+
in_channels=2048,
|
| 170 |
+
in_index=3,
|
| 171 |
+
channels=512,
|
| 172 |
+
isa_channels=256,
|
| 173 |
+
down_factor=(8, 8),
|
| 174 |
+
dropout_ratio=0.1,
|
| 175 |
+
num_classes=19,
|
| 176 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 177 |
+
align_corners=True,
|
| 178 |
+
loss_decode=dict(
|
| 179 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 180 |
+
auxiliary_head=dict(
|
| 181 |
+
type='FCNHead',
|
| 182 |
+
in_channels=1024,
|
| 183 |
+
in_index=2,
|
| 184 |
+
channels=256,
|
| 185 |
+
num_convs=1,
|
| 186 |
+
concat_input=False,
|
| 187 |
+
dropout_ratio=0.1,
|
| 188 |
+
num_classes=19,
|
| 189 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 190 |
+
align_corners=True,
|
| 191 |
+
loss_decode=dict(
|
| 192 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 193 |
+
train_cfg=dict(),
|
| 194 |
+
test_cfg=dict(mode='whole'))
|
| 195 |
+
work_dir = 'work_dirs'
|
| 196 |
+
gpu_ids = [0]
|
| 197 |
+
auto_resume = False
|
line1/cityscapes/isanet_r50SS3PR-d8_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eaaca01a9a0e4815c6e0eae346eedfa568da7223fbe0352d85c686d99a66bf15
|
| 3 |
+
size 303107360
|
line1/cityscapes/pcaa_r50SSPR-d16_cityscapes/config.py
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (512, 1024)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(512, 1024), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(512, 1024), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2048, 1024),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(512, 1024), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(512, 1024), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2048, 1024),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2048, 1024),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = False
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
edge_loss_weight=100,
|
| 144 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 145 |
+
sampler_num=3,
|
| 146 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 147 |
+
backbone=dict(
|
| 148 |
+
type='ResNetV1cSaliencySampler',
|
| 149 |
+
align_corners=False,
|
| 150 |
+
sampler_num=3,
|
| 151 |
+
sampler_strides=(1, 1, 1),
|
| 152 |
+
sampler_paddings=(5, 5, 5),
|
| 153 |
+
sampler_fwhm=(3, 3, 3),
|
| 154 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge', 'none'),
|
| 155 |
+
use_checkpoint=False,
|
| 156 |
+
depth=50,
|
| 157 |
+
num_stages=4,
|
| 158 |
+
out_indices=(0, 1, 2, 3),
|
| 159 |
+
dilations=(1, 1, 1, 2),
|
| 160 |
+
strides=(1, 2, 2, 1),
|
| 161 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 162 |
+
norm_eval=False,
|
| 163 |
+
style='pytorch',
|
| 164 |
+
contract_dilation=True),
|
| 165 |
+
decode_head=dict(
|
| 166 |
+
type='CAAHead',
|
| 167 |
+
in_channels=2048,
|
| 168 |
+
in_index=3,
|
| 169 |
+
channels=512,
|
| 170 |
+
dropout=True,
|
| 171 |
+
num_classes=19,
|
| 172 |
+
align_corners=False),
|
| 173 |
+
auxiliary_head=dict(
|
| 174 |
+
type='FCNHead',
|
| 175 |
+
in_channels=1024,
|
| 176 |
+
in_index=2,
|
| 177 |
+
channels=256,
|
| 178 |
+
num_convs=1,
|
| 179 |
+
concat_input=False,
|
| 180 |
+
dropout_ratio=0.1,
|
| 181 |
+
num_classes=19,
|
| 182 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 183 |
+
align_corners=False,
|
| 184 |
+
loss_decode=dict(
|
| 185 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 186 |
+
train_cfg=dict(),
|
| 187 |
+
test_cfg=dict(mode='whole'))
|
| 188 |
+
work_dir = 'work_dirs'
|
| 189 |
+
gpu_ids = [0]
|
| 190 |
+
auto_resume = False
|
line1/cityscapes/pcaa_r50SSPR-d16_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:431874af23bee024659153e9516acd68645168f9ffc50c22f45d28676ea433ce
|
| 3 |
+
size 405910736
|
line1/cityscapes/pcaa_r50SSPR-d32_cityscapes/config.py
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (512, 1024)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(512, 1024), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(512, 1024), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2048, 1024),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(512, 1024), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(512, 1024), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2048, 1024),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2048, 1024),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = False
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
edge_loss_weight=100,
|
| 144 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 145 |
+
sampler_num=3,
|
| 146 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 147 |
+
backbone=dict(
|
| 148 |
+
type='ResNetV1cSaliencySampler',
|
| 149 |
+
align_corners=False,
|
| 150 |
+
sampler_num=3,
|
| 151 |
+
sampler_strides=(1, 1, 1),
|
| 152 |
+
sampler_paddings=(5, 5, 5),
|
| 153 |
+
sampler_fwhm=(3, 3, 3),
|
| 154 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 155 |
+
'avgpsp_semantic_edge'),
|
| 156 |
+
use_checkpoint=False,
|
| 157 |
+
depth=50,
|
| 158 |
+
num_stages=4,
|
| 159 |
+
out_indices=(0, 1, 2, 3),
|
| 160 |
+
dilations=(1, 1, 1, 1),
|
| 161 |
+
strides=(1, 2, 2, 2),
|
| 162 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 163 |
+
norm_eval=False,
|
| 164 |
+
style='pytorch',
|
| 165 |
+
contract_dilation=True),
|
| 166 |
+
decode_head=dict(
|
| 167 |
+
type='CAAHead',
|
| 168 |
+
in_channels=2048,
|
| 169 |
+
in_index=3,
|
| 170 |
+
channels=512,
|
| 171 |
+
dropout=False,
|
| 172 |
+
num_classes=19,
|
| 173 |
+
align_corners=False),
|
| 174 |
+
auxiliary_head=dict(
|
| 175 |
+
type='FCNHead',
|
| 176 |
+
in_channels=1024,
|
| 177 |
+
in_index=2,
|
| 178 |
+
channels=256,
|
| 179 |
+
num_convs=1,
|
| 180 |
+
concat_input=False,
|
| 181 |
+
dropout_ratio=0.1,
|
| 182 |
+
num_classes=19,
|
| 183 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 184 |
+
align_corners=False,
|
| 185 |
+
loss_decode=dict(
|
| 186 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 187 |
+
train_cfg=dict(),
|
| 188 |
+
test_cfg=dict(mode='whole'))
|
| 189 |
+
work_dir = 'work_dirs'
|
| 190 |
+
gpu_ids = [0]
|
| 191 |
+
auto_resume = False
|
line1/cityscapes/pcaa_r50SSPR-d32_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d59cac3617d1c3181ba175a68be356c030ef282db553ced04900eaae530e90c6
|
| 3 |
+
size 414356088
|
line1/cityscapes/pspnet_r50SS3PR-d16_cityscapes/config.py
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge', 'none'),
|
| 156 |
+
use_lpf=False,
|
| 157 |
+
use_checkpoint=False,
|
| 158 |
+
align_corners=True,
|
| 159 |
+
depth=50,
|
| 160 |
+
num_stages=4,
|
| 161 |
+
out_indices=(0, 1, 2, 3),
|
| 162 |
+
dilations=(1, 1, 1, 2),
|
| 163 |
+
strides=(1, 2, 2, 1),
|
| 164 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 165 |
+
norm_eval=False,
|
| 166 |
+
style='pytorch',
|
| 167 |
+
contract_dilation=True),
|
| 168 |
+
decode_head=dict(
|
| 169 |
+
type='PSPHead',
|
| 170 |
+
in_channels=2048,
|
| 171 |
+
in_index=3,
|
| 172 |
+
channels=512,
|
| 173 |
+
pool_scales=(1, 2, 3, 6),
|
| 174 |
+
dropout_ratio=0.1,
|
| 175 |
+
num_classes=19,
|
| 176 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 177 |
+
align_corners=True,
|
| 178 |
+
loss_decode=dict(
|
| 179 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 180 |
+
auxiliary_head=dict(
|
| 181 |
+
type='FCNHead',
|
| 182 |
+
in_channels=1024,
|
| 183 |
+
in_index=2,
|
| 184 |
+
channels=256,
|
| 185 |
+
num_convs=1,
|
| 186 |
+
concat_input=False,
|
| 187 |
+
dropout_ratio=0.1,
|
| 188 |
+
num_classes=19,
|
| 189 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 190 |
+
align_corners=True,
|
| 191 |
+
loss_decode=dict(
|
| 192 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 193 |
+
train_cfg=dict(),
|
| 194 |
+
test_cfg=dict(mode='whole'))
|
| 195 |
+
work_dir = 'work_dirs'
|
| 196 |
+
gpu_ids = [0]
|
| 197 |
+
auto_resume = False
|
line1/cityscapes/pspnet_r50SS3PR-d16_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3eac1f947070b432221a5bcff0003e45cc5079234a1665991aa47cc2b7024525
|
| 3 |
+
size 395326439
|
line1/cityscapes/pspnet_r50SS3PR-d32_cityscapes/config.py
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 156 |
+
'avgpsp_semantic_edge'),
|
| 157 |
+
psp_ratio=4,
|
| 158 |
+
use_lpf=False,
|
| 159 |
+
use_checkpoint=False,
|
| 160 |
+
align_corners=True,
|
| 161 |
+
depth=50,
|
| 162 |
+
num_stages=4,
|
| 163 |
+
out_indices=(0, 1, 2, 3),
|
| 164 |
+
dilations=(1, 1, 1, 1),
|
| 165 |
+
strides=(1, 2, 2, 2),
|
| 166 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 167 |
+
norm_eval=False,
|
| 168 |
+
style='pytorch',
|
| 169 |
+
contract_dilation=True),
|
| 170 |
+
decode_head=dict(
|
| 171 |
+
type='PSPHead',
|
| 172 |
+
in_channels=2048,
|
| 173 |
+
in_index=3,
|
| 174 |
+
channels=512,
|
| 175 |
+
pool_scales=(1, 2, 3, 6),
|
| 176 |
+
dropout_ratio=0.1,
|
| 177 |
+
num_classes=19,
|
| 178 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 179 |
+
align_corners=True,
|
| 180 |
+
loss_decode=dict(
|
| 181 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 182 |
+
auxiliary_head=dict(
|
| 183 |
+
type='FCNHead',
|
| 184 |
+
in_channels=1024,
|
| 185 |
+
in_index=2,
|
| 186 |
+
channels=256,
|
| 187 |
+
num_convs=1,
|
| 188 |
+
concat_input=False,
|
| 189 |
+
dropout_ratio=0.1,
|
| 190 |
+
num_classes=19,
|
| 191 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 192 |
+
align_corners=True,
|
| 193 |
+
loss_decode=dict(
|
| 194 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 195 |
+
train_cfg=dict(),
|
| 196 |
+
test_cfg=dict(mode='whole'))
|
| 197 |
+
work_dir = 'work_dirs'
|
| 198 |
+
gpu_ids = [0]
|
| 199 |
+
auto_resume = False
|
line1/cityscapes/pspnet_r50SS3PR-d32_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55046d3fa4eaf0006f0568f7287d537d1f0bf49061ca45549f274b6df9528057
|
| 3 |
+
size 403791089
|
line1/cityscapes/pspnet_r50SS3PR-d8_cityscapes/config.py
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'CityscapesDataset'
|
| 2 |
+
data_root = './data/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 1025)
|
| 6 |
+
train_pipeline = [
|
| 7 |
+
dict(type='LoadImageFromFile'),
|
| 8 |
+
dict(type='LoadAnnotations'),
|
| 9 |
+
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 10 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 11 |
+
dict(type='RandomFlip', prob=0.5),
|
| 12 |
+
dict(type='PhotoMetricDistortion'),
|
| 13 |
+
dict(
|
| 14 |
+
type='Normalize',
|
| 15 |
+
mean=[123.675, 116.28, 103.53],
|
| 16 |
+
std=[58.395, 57.12, 57.375],
|
| 17 |
+
to_rgb=True),
|
| 18 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 19 |
+
dict(type='DefaultFormatBundle'),
|
| 20 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 21 |
+
]
|
| 22 |
+
test_pipeline = [
|
| 23 |
+
dict(type='LoadImageFromFile'),
|
| 24 |
+
dict(
|
| 25 |
+
type='MultiScaleFlipAug',
|
| 26 |
+
img_scale=(2049, 1025),
|
| 27 |
+
flip=False,
|
| 28 |
+
transforms=[
|
| 29 |
+
dict(type='Resize', keep_ratio=True),
|
| 30 |
+
dict(type='RandomFlip'),
|
| 31 |
+
dict(
|
| 32 |
+
type='Normalize',
|
| 33 |
+
mean=[123.675, 116.28, 103.53],
|
| 34 |
+
std=[58.395, 57.12, 57.375],
|
| 35 |
+
to_rgb=True),
|
| 36 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 37 |
+
dict(type='Collect', keys=['img'])
|
| 38 |
+
])
|
| 39 |
+
]
|
| 40 |
+
BATCH_SIZE = 8
|
| 41 |
+
GPU = 1
|
| 42 |
+
data = dict(
|
| 43 |
+
samples_per_gpu=8,
|
| 44 |
+
workers_per_gpu=10,
|
| 45 |
+
train=dict(
|
| 46 |
+
type='CityscapesDataset',
|
| 47 |
+
data_root='./data/',
|
| 48 |
+
img_dir='cityscapes/leftImg8bit/train',
|
| 49 |
+
ann_dir='cityscapes/gtFine/train',
|
| 50 |
+
pipeline=[
|
| 51 |
+
dict(type='LoadImageFromFile'),
|
| 52 |
+
dict(type='LoadAnnotations'),
|
| 53 |
+
dict(
|
| 54 |
+
type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
| 55 |
+
dict(type='RandomCrop', crop_size=(513, 1025), cat_max_ratio=0.75),
|
| 56 |
+
dict(type='RandomFlip', prob=0.5),
|
| 57 |
+
dict(type='PhotoMetricDistortion'),
|
| 58 |
+
dict(
|
| 59 |
+
type='Normalize',
|
| 60 |
+
mean=[123.675, 116.28, 103.53],
|
| 61 |
+
std=[58.395, 57.12, 57.375],
|
| 62 |
+
to_rgb=True),
|
| 63 |
+
dict(type='Pad', size=(513, 1025), pad_val=0, seg_pad_val=255),
|
| 64 |
+
dict(type='DefaultFormatBundle'),
|
| 65 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 66 |
+
]),
|
| 67 |
+
val=dict(
|
| 68 |
+
type='CityscapesDataset',
|
| 69 |
+
data_root='./data/',
|
| 70 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 71 |
+
ann_dir='cityscapes/gtFine/val',
|
| 72 |
+
pipeline=[
|
| 73 |
+
dict(type='LoadImageFromFile'),
|
| 74 |
+
dict(
|
| 75 |
+
type='MultiScaleFlipAug',
|
| 76 |
+
img_scale=(2049, 1025),
|
| 77 |
+
flip=False,
|
| 78 |
+
transforms=[
|
| 79 |
+
dict(type='Resize', keep_ratio=True),
|
| 80 |
+
dict(type='RandomFlip'),
|
| 81 |
+
dict(
|
| 82 |
+
type='Normalize',
|
| 83 |
+
mean=[123.675, 116.28, 103.53],
|
| 84 |
+
std=[58.395, 57.12, 57.375],
|
| 85 |
+
to_rgb=True),
|
| 86 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 87 |
+
dict(type='Collect', keys=['img'])
|
| 88 |
+
])
|
| 89 |
+
]),
|
| 90 |
+
test=dict(
|
| 91 |
+
type='CityscapesDataset',
|
| 92 |
+
data_root='./data/',
|
| 93 |
+
img_dir='cityscapes/leftImg8bit/val',
|
| 94 |
+
ann_dir='cityscapes/gtFine/val',
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(
|
| 98 |
+
type='MultiScaleFlipAug',
|
| 99 |
+
img_scale=(2049, 1025),
|
| 100 |
+
flip=False,
|
| 101 |
+
transforms=[
|
| 102 |
+
dict(type='Resize', keep_ratio=True),
|
| 103 |
+
dict(type='RandomFlip'),
|
| 104 |
+
dict(
|
| 105 |
+
type='Normalize',
|
| 106 |
+
mean=[123.675, 116.28, 103.53],
|
| 107 |
+
std=[58.395, 57.12, 57.375],
|
| 108 |
+
to_rgb=True),
|
| 109 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 110 |
+
dict(type='Collect', keys=['img'])
|
| 111 |
+
])
|
| 112 |
+
]))
|
| 113 |
+
ITER_SETTING = 40000
|
| 114 |
+
optimizer = dict(
|
| 115 |
+
type='SGD',
|
| 116 |
+
lr=0.01,
|
| 117 |
+
momentum=0.9,
|
| 118 |
+
weight_decay=0.0005,
|
| 119 |
+
paramwise_cfg=dict(
|
| 120 |
+
custom_keys=dict(
|
| 121 |
+
head=dict(lr_mult=2.0),
|
| 122 |
+
SS=dict(lr_mult=2.0),
|
| 123 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 124 |
+
optimizer_config = dict()
|
| 125 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 126 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 127 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 128 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 129 |
+
log_config = dict(
|
| 130 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 131 |
+
dist_params = dict(backend='nccl')
|
| 132 |
+
log_level = 'INFO'
|
| 133 |
+
load_from = None
|
| 134 |
+
resume_from = None
|
| 135 |
+
workflow = [('train', 1)]
|
| 136 |
+
cudnn_benchmark = False
|
| 137 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 138 |
+
LOG_DIR = None
|
| 139 |
+
SAMPLER_NUM = 3
|
| 140 |
+
ALIGN_CORNERS = True
|
| 141 |
+
model = dict(
|
| 142 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 143 |
+
log_dir=None,
|
| 144 |
+
edge_loss_weight=100,
|
| 145 |
+
pixel_relation=[1, 2, 4, 8, 16, 32, 64],
|
| 146 |
+
sampler_num=3,
|
| 147 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 148 |
+
backbone=dict(
|
| 149 |
+
type='ResNetV1cSaliencySampler',
|
| 150 |
+
log_dir=None,
|
| 151 |
+
sampler_num=3,
|
| 152 |
+
sampler_strides=(1, 1, 1),
|
| 153 |
+
sampler_paddings=(5, 5, 5),
|
| 154 |
+
sampler_fwhm=(3, 3, 3),
|
| 155 |
+
sampler_mode=('avgpsp_semantic_edge', 'none', 'none'),
|
| 156 |
+
use_lpf=False,
|
| 157 |
+
psp_ratio=4,
|
| 158 |
+
align_corners=True,
|
| 159 |
+
depth=50,
|
| 160 |
+
num_stages=4,
|
| 161 |
+
out_indices=(0, 1, 2, 3),
|
| 162 |
+
dilations=(1, 1, 2, 4),
|
| 163 |
+
strides=(1, 2, 1, 1),
|
| 164 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 165 |
+
norm_eval=False,
|
| 166 |
+
style='pytorch',
|
| 167 |
+
contract_dilation=True),
|
| 168 |
+
decode_head=dict(
|
| 169 |
+
type='PSPHead',
|
| 170 |
+
in_channels=2048,
|
| 171 |
+
in_index=3,
|
| 172 |
+
channels=512,
|
| 173 |
+
pool_scales=(1, 2, 3, 6),
|
| 174 |
+
dropout_ratio=0.1,
|
| 175 |
+
num_classes=19,
|
| 176 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 177 |
+
align_corners=True,
|
| 178 |
+
loss_decode=dict(
|
| 179 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 180 |
+
auxiliary_head=dict(
|
| 181 |
+
type='FCNHead',
|
| 182 |
+
in_channels=1024,
|
| 183 |
+
in_index=2,
|
| 184 |
+
channels=256,
|
| 185 |
+
num_convs=1,
|
| 186 |
+
concat_input=False,
|
| 187 |
+
dropout_ratio=0.1,
|
| 188 |
+
num_classes=19,
|
| 189 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 190 |
+
align_corners=True,
|
| 191 |
+
loss_decode=dict(
|
| 192 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 193 |
+
train_cfg=dict(),
|
| 194 |
+
test_cfg=dict(mode='whole'))
|
| 195 |
+
work_dir = 'work_dirs'
|
| 196 |
+
gpu_ids = [0]
|
| 197 |
+
auto_resume = False
|
line1/cityscapes/pspnet_r50SS3PR-d8_cityscapes/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1ee9b839e744b6129e72b2866d3c70177a6d5daa0acf9b4761f020369f9de16
|
| 3 |
+
size 393211425
|
line1/pascalcontext/FCN_r50SS3PR-d32_pascalcontext/config.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'PascalContextDataset59'
|
| 2 |
+
data_root = './data/VOCdevkit/VOC2010/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 513)
|
| 6 |
+
img_scale = (2049, 513)
|
| 7 |
+
train_pipeline = [
|
| 8 |
+
dict(type='LoadImageFromFile'),
|
| 9 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 10 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 11 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 12 |
+
dict(type='RandomFlip', prob=0.5),
|
| 13 |
+
dict(type='PhotoMetricDistortion'),
|
| 14 |
+
dict(
|
| 15 |
+
type='Normalize',
|
| 16 |
+
mean=[123.675, 116.28, 103.53],
|
| 17 |
+
std=[58.395, 57.12, 57.375],
|
| 18 |
+
to_rgb=True),
|
| 19 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 20 |
+
dict(type='DefaultFormatBundle'),
|
| 21 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 22 |
+
]
|
| 23 |
+
test_pipeline = [
|
| 24 |
+
dict(type='LoadImageFromFile'),
|
| 25 |
+
dict(
|
| 26 |
+
type='MultiScaleFlipAug',
|
| 27 |
+
img_scale=(2049, 513),
|
| 28 |
+
flip=False,
|
| 29 |
+
transforms=[
|
| 30 |
+
dict(type='Resize', keep_ratio=True),
|
| 31 |
+
dict(type='RandomFlip'),
|
| 32 |
+
dict(
|
| 33 |
+
type='Normalize',
|
| 34 |
+
mean=[123.675, 116.28, 103.53],
|
| 35 |
+
std=[58.395, 57.12, 57.375],
|
| 36 |
+
to_rgb=True),
|
| 37 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 38 |
+
dict(type='Collect', keys=['img'])
|
| 39 |
+
])
|
| 40 |
+
]
|
| 41 |
+
BATCH_SIZE = 16
|
| 42 |
+
GPU = 1
|
| 43 |
+
data = dict(
|
| 44 |
+
samples_per_gpu=16,
|
| 45 |
+
workers_per_gpu=10,
|
| 46 |
+
train=dict(
|
| 47 |
+
type='PascalContextDataset59',
|
| 48 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 49 |
+
img_dir='JPEGImages',
|
| 50 |
+
ann_dir='SegmentationClassContext',
|
| 51 |
+
split='ImageSets/SegmentationContext/train.txt',
|
| 52 |
+
pipeline=[
|
| 53 |
+
dict(type='LoadImageFromFile'),
|
| 54 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 55 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 56 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 57 |
+
dict(type='RandomFlip', prob=0.5),
|
| 58 |
+
dict(type='PhotoMetricDistortion'),
|
| 59 |
+
dict(
|
| 60 |
+
type='Normalize',
|
| 61 |
+
mean=[123.675, 116.28, 103.53],
|
| 62 |
+
std=[58.395, 57.12, 57.375],
|
| 63 |
+
to_rgb=True),
|
| 64 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 65 |
+
dict(type='DefaultFormatBundle'),
|
| 66 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 67 |
+
]),
|
| 68 |
+
val=dict(
|
| 69 |
+
type='PascalContextDataset59',
|
| 70 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 71 |
+
img_dir='JPEGImages',
|
| 72 |
+
ann_dir='SegmentationClassContext',
|
| 73 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 74 |
+
pipeline=[
|
| 75 |
+
dict(type='LoadImageFromFile'),
|
| 76 |
+
dict(
|
| 77 |
+
type='MultiScaleFlipAug',
|
| 78 |
+
img_scale=(2049, 513),
|
| 79 |
+
flip=False,
|
| 80 |
+
transforms=[
|
| 81 |
+
dict(type='Resize', keep_ratio=True),
|
| 82 |
+
dict(type='RandomFlip'),
|
| 83 |
+
dict(
|
| 84 |
+
type='Normalize',
|
| 85 |
+
mean=[123.675, 116.28, 103.53],
|
| 86 |
+
std=[58.395, 57.12, 57.375],
|
| 87 |
+
to_rgb=True),
|
| 88 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 89 |
+
dict(type='Collect', keys=['img'])
|
| 90 |
+
])
|
| 91 |
+
]),
|
| 92 |
+
test=dict(
|
| 93 |
+
type='PascalContextDataset59',
|
| 94 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 95 |
+
img_dir='JPEGImages',
|
| 96 |
+
ann_dir='SegmentationClassContext',
|
| 97 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 98 |
+
pipeline=[
|
| 99 |
+
dict(type='LoadImageFromFile'),
|
| 100 |
+
dict(
|
| 101 |
+
type='MultiScaleFlipAug',
|
| 102 |
+
img_scale=(2049, 513),
|
| 103 |
+
flip=False,
|
| 104 |
+
transforms=[
|
| 105 |
+
dict(type='Resize', keep_ratio=True),
|
| 106 |
+
dict(type='RandomFlip'),
|
| 107 |
+
dict(
|
| 108 |
+
type='Normalize',
|
| 109 |
+
mean=[123.675, 116.28, 103.53],
|
| 110 |
+
std=[58.395, 57.12, 57.375],
|
| 111 |
+
to_rgb=True),
|
| 112 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 113 |
+
dict(type='Collect', keys=['img'])
|
| 114 |
+
])
|
| 115 |
+
]))
|
| 116 |
+
ITER_SETTING = 40000
|
| 117 |
+
optimizer = dict(
|
| 118 |
+
type='SGD',
|
| 119 |
+
lr=0.004,
|
| 120 |
+
momentum=0.9,
|
| 121 |
+
weight_decay=0.0005,
|
| 122 |
+
paramwise_cfg=dict(
|
| 123 |
+
custom_keys=dict(
|
| 124 |
+
head=dict(lr_mult=2.0),
|
| 125 |
+
SS=dict(lr_mult=2.0),
|
| 126 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 127 |
+
optimizer_config = dict()
|
| 128 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 129 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 130 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 131 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 132 |
+
log_config = dict(
|
| 133 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 134 |
+
dist_params = dict(backend='nccl')
|
| 135 |
+
log_level = 'INFO'
|
| 136 |
+
load_from = None
|
| 137 |
+
resume_from = None
|
| 138 |
+
workflow = [('train', 1)]
|
| 139 |
+
cudnn_benchmark = False
|
| 140 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 141 |
+
LOG_DIR = None
|
| 142 |
+
SAMPLER_NUM = 3
|
| 143 |
+
model = dict(
|
| 144 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 145 |
+
log_dir=None,
|
| 146 |
+
edge_loss_weight=100,
|
| 147 |
+
use_adaptive_residual=False,
|
| 148 |
+
pixel_relation=[1, 2, 4, 8, 16],
|
| 149 |
+
sampler_num=3,
|
| 150 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 151 |
+
backbone=dict(
|
| 152 |
+
type='ResNetV1cSaliencySampler',
|
| 153 |
+
log_dir=None,
|
| 154 |
+
sampler_num=3,
|
| 155 |
+
sampler_strides=(1, 1, 1),
|
| 156 |
+
sampler_paddings=(5, 5, 5),
|
| 157 |
+
sampler_fwhm=(3, 3, 3),
|
| 158 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 159 |
+
'avgpsp_semantic_edge'),
|
| 160 |
+
psp_ratio=4,
|
| 161 |
+
use_lpf=False,
|
| 162 |
+
align_corners=True,
|
| 163 |
+
use_checkpoint=True,
|
| 164 |
+
depth=50,
|
| 165 |
+
num_stages=4,
|
| 166 |
+
out_indices=(0, 1, 2, 3),
|
| 167 |
+
dilations=(1, 1, 1, 1),
|
| 168 |
+
strides=(1, 2, 2, 2),
|
| 169 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 170 |
+
norm_eval=False,
|
| 171 |
+
style='pytorch',
|
| 172 |
+
contract_dilation=True),
|
| 173 |
+
decode_head=dict(
|
| 174 |
+
type='FCNHead',
|
| 175 |
+
in_channels=2048,
|
| 176 |
+
in_index=3,
|
| 177 |
+
channels=512,
|
| 178 |
+
num_convs=2,
|
| 179 |
+
concat_input=True,
|
| 180 |
+
dropout_ratio=0.1,
|
| 181 |
+
num_classes=59,
|
| 182 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 183 |
+
align_corners=True,
|
| 184 |
+
loss_decode=dict(
|
| 185 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 186 |
+
auxiliary_head=dict(
|
| 187 |
+
type='FCNHead',
|
| 188 |
+
in_channels=1024,
|
| 189 |
+
in_index=2,
|
| 190 |
+
channels=256,
|
| 191 |
+
num_convs=1,
|
| 192 |
+
concat_input=False,
|
| 193 |
+
dropout_ratio=0.1,
|
| 194 |
+
num_classes=59,
|
| 195 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 196 |
+
align_corners=True,
|
| 197 |
+
loss_decode=dict(
|
| 198 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 199 |
+
train_cfg=dict(),
|
| 200 |
+
test_cfg=dict(mode='whole'))
|
| 201 |
+
work_dir = 'work_dirs'
|
| 202 |
+
gpu_ids = [0]
|
| 203 |
+
auto_resume = False
|
line1/pascalcontext/FCN_r50SS3PR-d32_pascalcontext/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c22a169e8f832e87259b62f9fde65bf10cf5238cd42301a95baf12b0ab0064ae
|
| 3 |
+
size 408182381
|
line1/pascalcontext/ccnet_r50SS3PR-d32_pascalcontext/config.py
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'PascalContextDataset59'
|
| 2 |
+
data_root = './data/VOCdevkit/VOC2010/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 513)
|
| 6 |
+
img_scale = (2049, 513)
|
| 7 |
+
train_pipeline = [
|
| 8 |
+
dict(type='LoadImageFromFile'),
|
| 9 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 10 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 11 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 12 |
+
dict(type='RandomFlip', prob=0.5),
|
| 13 |
+
dict(type='PhotoMetricDistortion'),
|
| 14 |
+
dict(
|
| 15 |
+
type='Normalize',
|
| 16 |
+
mean=[123.675, 116.28, 103.53],
|
| 17 |
+
std=[58.395, 57.12, 57.375],
|
| 18 |
+
to_rgb=True),
|
| 19 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 20 |
+
dict(type='DefaultFormatBundle'),
|
| 21 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 22 |
+
]
|
| 23 |
+
test_pipeline = [
|
| 24 |
+
dict(type='LoadImageFromFile'),
|
| 25 |
+
dict(
|
| 26 |
+
type='MultiScaleFlipAug',
|
| 27 |
+
img_scale=(2049, 513),
|
| 28 |
+
flip=False,
|
| 29 |
+
transforms=[
|
| 30 |
+
dict(type='Resize', keep_ratio=True),
|
| 31 |
+
dict(type='RandomFlip'),
|
| 32 |
+
dict(
|
| 33 |
+
type='Normalize',
|
| 34 |
+
mean=[123.675, 116.28, 103.53],
|
| 35 |
+
std=[58.395, 57.12, 57.375],
|
| 36 |
+
to_rgb=True),
|
| 37 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 38 |
+
dict(type='Collect', keys=['img'])
|
| 39 |
+
])
|
| 40 |
+
]
|
| 41 |
+
BATCH_SIZE = 16
|
| 42 |
+
GPU = 1
|
| 43 |
+
data = dict(
|
| 44 |
+
samples_per_gpu=16,
|
| 45 |
+
workers_per_gpu=10,
|
| 46 |
+
train=dict(
|
| 47 |
+
type='PascalContextDataset59',
|
| 48 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 49 |
+
img_dir='JPEGImages',
|
| 50 |
+
ann_dir='SegmentationClassContext',
|
| 51 |
+
split='ImageSets/SegmentationContext/train.txt',
|
| 52 |
+
pipeline=[
|
| 53 |
+
dict(type='LoadImageFromFile'),
|
| 54 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 55 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 56 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 57 |
+
dict(type='RandomFlip', prob=0.5),
|
| 58 |
+
dict(type='PhotoMetricDistortion'),
|
| 59 |
+
dict(
|
| 60 |
+
type='Normalize',
|
| 61 |
+
mean=[123.675, 116.28, 103.53],
|
| 62 |
+
std=[58.395, 57.12, 57.375],
|
| 63 |
+
to_rgb=True),
|
| 64 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 65 |
+
dict(type='DefaultFormatBundle'),
|
| 66 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 67 |
+
]),
|
| 68 |
+
val=dict(
|
| 69 |
+
type='PascalContextDataset59',
|
| 70 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 71 |
+
img_dir='JPEGImages',
|
| 72 |
+
ann_dir='SegmentationClassContext',
|
| 73 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 74 |
+
pipeline=[
|
| 75 |
+
dict(type='LoadImageFromFile'),
|
| 76 |
+
dict(
|
| 77 |
+
type='MultiScaleFlipAug',
|
| 78 |
+
img_scale=(2049, 513),
|
| 79 |
+
flip=False,
|
| 80 |
+
transforms=[
|
| 81 |
+
dict(type='Resize', keep_ratio=True),
|
| 82 |
+
dict(type='RandomFlip'),
|
| 83 |
+
dict(
|
| 84 |
+
type='Normalize',
|
| 85 |
+
mean=[123.675, 116.28, 103.53],
|
| 86 |
+
std=[58.395, 57.12, 57.375],
|
| 87 |
+
to_rgb=True),
|
| 88 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 89 |
+
dict(type='Collect', keys=['img'])
|
| 90 |
+
])
|
| 91 |
+
]),
|
| 92 |
+
test=dict(
|
| 93 |
+
type='PascalContextDataset59',
|
| 94 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 95 |
+
img_dir='JPEGImages',
|
| 96 |
+
ann_dir='SegmentationClassContext',
|
| 97 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 98 |
+
pipeline=[
|
| 99 |
+
dict(type='LoadImageFromFile'),
|
| 100 |
+
dict(
|
| 101 |
+
type='MultiScaleFlipAug',
|
| 102 |
+
img_scale=(2049, 513),
|
| 103 |
+
flip=False,
|
| 104 |
+
transforms=[
|
| 105 |
+
dict(type='Resize', keep_ratio=True),
|
| 106 |
+
dict(type='RandomFlip'),
|
| 107 |
+
dict(
|
| 108 |
+
type='Normalize',
|
| 109 |
+
mean=[123.675, 116.28, 103.53],
|
| 110 |
+
std=[58.395, 57.12, 57.375],
|
| 111 |
+
to_rgb=True),
|
| 112 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 113 |
+
dict(type='Collect', keys=['img'])
|
| 114 |
+
])
|
| 115 |
+
]))
|
| 116 |
+
ITER_SETTING = 40000
|
| 117 |
+
optimizer = dict(
|
| 118 |
+
type='SGD',
|
| 119 |
+
lr=0.004,
|
| 120 |
+
momentum=0.9,
|
| 121 |
+
weight_decay=0.0005,
|
| 122 |
+
paramwise_cfg=dict(
|
| 123 |
+
custom_keys=dict(
|
| 124 |
+
head=dict(lr_mult=2.0),
|
| 125 |
+
SS=dict(lr_mult=2.0),
|
| 126 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 127 |
+
optimizer_config = dict()
|
| 128 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 129 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 130 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 131 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 132 |
+
log_config = dict(
|
| 133 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 134 |
+
dist_params = dict(backend='nccl')
|
| 135 |
+
log_level = 'INFO'
|
| 136 |
+
load_from = None
|
| 137 |
+
resume_from = None
|
| 138 |
+
workflow = [('train', 1)]
|
| 139 |
+
cudnn_benchmark = False
|
| 140 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 141 |
+
LOG_DIR = None
|
| 142 |
+
SAMPLER_NUM = 3
|
| 143 |
+
model = dict(
|
| 144 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 145 |
+
log_dir=None,
|
| 146 |
+
edge_loss_weight=100,
|
| 147 |
+
pixel_relation=[1, 2, 4, 8, 16],
|
| 148 |
+
sampler_num=3,
|
| 149 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 150 |
+
backbone=dict(
|
| 151 |
+
type='ResNetV1cSaliencySampler',
|
| 152 |
+
log_dir=None,
|
| 153 |
+
sampler_num=3,
|
| 154 |
+
sampler_strides=(1, 1, 1),
|
| 155 |
+
sampler_paddings=(5, 5, 5),
|
| 156 |
+
sampler_fwhm=(3, 3, 3),
|
| 157 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 158 |
+
'avgpsp_semantic_edge'),
|
| 159 |
+
use_lpf=False,
|
| 160 |
+
align_corners=True,
|
| 161 |
+
use_checkpoint=False,
|
| 162 |
+
depth=50,
|
| 163 |
+
num_stages=4,
|
| 164 |
+
out_indices=(0, 1, 2, 3),
|
| 165 |
+
dilations=(1, 1, 1, 1),
|
| 166 |
+
strides=(1, 2, 2, 2),
|
| 167 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 168 |
+
norm_eval=False,
|
| 169 |
+
style='pytorch',
|
| 170 |
+
contract_dilation=True),
|
| 171 |
+
decode_head=dict(
|
| 172 |
+
type='CCHead',
|
| 173 |
+
in_channels=2048,
|
| 174 |
+
in_index=3,
|
| 175 |
+
channels=512,
|
| 176 |
+
recurrence=2,
|
| 177 |
+
dropout_ratio=0.1,
|
| 178 |
+
num_classes=59,
|
| 179 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 180 |
+
align_corners=True,
|
| 181 |
+
loss_decode=dict(
|
| 182 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 183 |
+
auxiliary_head=dict(
|
| 184 |
+
type='FCNHead',
|
| 185 |
+
in_channels=1024,
|
| 186 |
+
in_index=2,
|
| 187 |
+
channels=256,
|
| 188 |
+
num_convs=1,
|
| 189 |
+
concat_input=False,
|
| 190 |
+
dropout_ratio=0.1,
|
| 191 |
+
num_classes=59,
|
| 192 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 193 |
+
align_corners=True,
|
| 194 |
+
loss_decode=dict(
|
| 195 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 196 |
+
train_cfg=dict(),
|
| 197 |
+
test_cfg=dict(mode='whole'))
|
| 198 |
+
work_dir = 'work_dirs'
|
| 199 |
+
gpu_ids = [0]
|
| 200 |
+
auto_resume = False
|
line1/pascalcontext/ccnet_r50SS3PR-d32_pascalcontext/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6521cb4d2d62c4c813bce96facdbbf9d40bb64028df09191563ebcadb9cf6d0f
|
| 3 |
+
size 410814315
|
line1/pascalcontext/isanet_r50SS3PR-d32_pascalcontext/config.py
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'PascalContextDataset59'
|
| 2 |
+
data_root = './data/VOCdevkit/VOC2010/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 513)
|
| 6 |
+
img_scale = (2049, 513)
|
| 7 |
+
train_pipeline = [
|
| 8 |
+
dict(type='LoadImageFromFile'),
|
| 9 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 10 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 11 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 12 |
+
dict(type='RandomFlip', prob=0.5),
|
| 13 |
+
dict(type='PhotoMetricDistortion'),
|
| 14 |
+
dict(
|
| 15 |
+
type='Normalize',
|
| 16 |
+
mean=[123.675, 116.28, 103.53],
|
| 17 |
+
std=[58.395, 57.12, 57.375],
|
| 18 |
+
to_rgb=True),
|
| 19 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 20 |
+
dict(type='DefaultFormatBundle'),
|
| 21 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 22 |
+
]
|
| 23 |
+
test_pipeline = [
|
| 24 |
+
dict(type='LoadImageFromFile'),
|
| 25 |
+
dict(
|
| 26 |
+
type='MultiScaleFlipAug',
|
| 27 |
+
img_scale=(2049, 513),
|
| 28 |
+
flip=False,
|
| 29 |
+
transforms=[
|
| 30 |
+
dict(type='Resize', keep_ratio=True),
|
| 31 |
+
dict(type='RandomFlip'),
|
| 32 |
+
dict(
|
| 33 |
+
type='Normalize',
|
| 34 |
+
mean=[123.675, 116.28, 103.53],
|
| 35 |
+
std=[58.395, 57.12, 57.375],
|
| 36 |
+
to_rgb=True),
|
| 37 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 38 |
+
dict(type='Collect', keys=['img'])
|
| 39 |
+
])
|
| 40 |
+
]
|
| 41 |
+
BATCH_SIZE = 16
|
| 42 |
+
GPU = 1
|
| 43 |
+
data = dict(
|
| 44 |
+
samples_per_gpu=16,
|
| 45 |
+
workers_per_gpu=10,
|
| 46 |
+
train=dict(
|
| 47 |
+
type='PascalContextDataset59',
|
| 48 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 49 |
+
img_dir='JPEGImages',
|
| 50 |
+
ann_dir='SegmentationClassContext',
|
| 51 |
+
split='ImageSets/SegmentationContext/train.txt',
|
| 52 |
+
pipeline=[
|
| 53 |
+
dict(type='LoadImageFromFile'),
|
| 54 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 55 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 56 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 57 |
+
dict(type='RandomFlip', prob=0.5),
|
| 58 |
+
dict(type='PhotoMetricDistortion'),
|
| 59 |
+
dict(
|
| 60 |
+
type='Normalize',
|
| 61 |
+
mean=[123.675, 116.28, 103.53],
|
| 62 |
+
std=[58.395, 57.12, 57.375],
|
| 63 |
+
to_rgb=True),
|
| 64 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 65 |
+
dict(type='DefaultFormatBundle'),
|
| 66 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 67 |
+
]),
|
| 68 |
+
val=dict(
|
| 69 |
+
type='PascalContextDataset59',
|
| 70 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 71 |
+
img_dir='JPEGImages',
|
| 72 |
+
ann_dir='SegmentationClassContext',
|
| 73 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 74 |
+
pipeline=[
|
| 75 |
+
dict(type='LoadImageFromFile'),
|
| 76 |
+
dict(
|
| 77 |
+
type='MultiScaleFlipAug',
|
| 78 |
+
img_scale=(2049, 513),
|
| 79 |
+
flip=False,
|
| 80 |
+
transforms=[
|
| 81 |
+
dict(type='Resize', keep_ratio=True),
|
| 82 |
+
dict(type='RandomFlip'),
|
| 83 |
+
dict(
|
| 84 |
+
type='Normalize',
|
| 85 |
+
mean=[123.675, 116.28, 103.53],
|
| 86 |
+
std=[58.395, 57.12, 57.375],
|
| 87 |
+
to_rgb=True),
|
| 88 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 89 |
+
dict(type='Collect', keys=['img'])
|
| 90 |
+
])
|
| 91 |
+
]),
|
| 92 |
+
test=dict(
|
| 93 |
+
type='PascalContextDataset59',
|
| 94 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 95 |
+
img_dir='JPEGImages',
|
| 96 |
+
ann_dir='SegmentationClassContext',
|
| 97 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 98 |
+
pipeline=[
|
| 99 |
+
dict(type='LoadImageFromFile'),
|
| 100 |
+
dict(
|
| 101 |
+
type='MultiScaleFlipAug',
|
| 102 |
+
img_scale=(2049, 513),
|
| 103 |
+
flip=False,
|
| 104 |
+
transforms=[
|
| 105 |
+
dict(type='Resize', keep_ratio=True),
|
| 106 |
+
dict(type='RandomFlip'),
|
| 107 |
+
dict(
|
| 108 |
+
type='Normalize',
|
| 109 |
+
mean=[123.675, 116.28, 103.53],
|
| 110 |
+
std=[58.395, 57.12, 57.375],
|
| 111 |
+
to_rgb=True),
|
| 112 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 113 |
+
dict(type='Collect', keys=['img'])
|
| 114 |
+
])
|
| 115 |
+
]))
|
| 116 |
+
ITER_SETTING = 40000
|
| 117 |
+
optimizer = dict(
|
| 118 |
+
type='SGD',
|
| 119 |
+
lr=0.004,
|
| 120 |
+
momentum=0.9,
|
| 121 |
+
weight_decay=0.0005,
|
| 122 |
+
paramwise_cfg=dict(
|
| 123 |
+
custom_keys=dict(
|
| 124 |
+
head=dict(lr_mult=2.0),
|
| 125 |
+
SS=dict(lr_mult=2.0),
|
| 126 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 127 |
+
optimizer_config = dict()
|
| 128 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 129 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 130 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 131 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 132 |
+
log_config = dict(
|
| 133 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 134 |
+
dist_params = dict(backend='nccl')
|
| 135 |
+
log_level = 'INFO'
|
| 136 |
+
load_from = None
|
| 137 |
+
resume_from = None
|
| 138 |
+
workflow = [('train', 1)]
|
| 139 |
+
cudnn_benchmark = False
|
| 140 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 141 |
+
LOG_DIR = None
|
| 142 |
+
SAMPLER_NUM = 3
|
| 143 |
+
model = dict(
|
| 144 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 145 |
+
log_dir=None,
|
| 146 |
+
edge_loss_weight=100,
|
| 147 |
+
use_adaptive_residual=False,
|
| 148 |
+
pixel_relation=[1, 2, 4, 8, 16],
|
| 149 |
+
sampler_num=3,
|
| 150 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 151 |
+
backbone=dict(
|
| 152 |
+
type='ResNetV1cSaliencySampler',
|
| 153 |
+
log_dir=None,
|
| 154 |
+
sampler_num=3,
|
| 155 |
+
sampler_strides=(1, 1, 1),
|
| 156 |
+
sampler_paddings=(5, 5, 5),
|
| 157 |
+
sampler_fwhm=(3, 3, 3),
|
| 158 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 159 |
+
'avgpsp_semantic_edge'),
|
| 160 |
+
use_lpf=False,
|
| 161 |
+
align_corners=True,
|
| 162 |
+
use_checkpoint=False,
|
| 163 |
+
depth=50,
|
| 164 |
+
num_stages=4,
|
| 165 |
+
out_indices=(0, 1, 2, 3),
|
| 166 |
+
dilations=(1, 1, 1, 1),
|
| 167 |
+
strides=(1, 2, 2, 2),
|
| 168 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 169 |
+
norm_eval=False,
|
| 170 |
+
style='pytorch',
|
| 171 |
+
contract_dilation=True),
|
| 172 |
+
decode_head=dict(
|
| 173 |
+
type='ISAHead',
|
| 174 |
+
in_channels=2048,
|
| 175 |
+
in_index=3,
|
| 176 |
+
channels=512,
|
| 177 |
+
isa_channels=256,
|
| 178 |
+
down_factor=(8, 8),
|
| 179 |
+
dropout_ratio=0.1,
|
| 180 |
+
num_classes=59,
|
| 181 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 182 |
+
align_corners=True,
|
| 183 |
+
loss_decode=dict(
|
| 184 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 185 |
+
auxiliary_head=dict(
|
| 186 |
+
type='FCNHead',
|
| 187 |
+
in_channels=1024,
|
| 188 |
+
in_index=2,
|
| 189 |
+
channels=256,
|
| 190 |
+
num_convs=1,
|
| 191 |
+
concat_input=False,
|
| 192 |
+
dropout_ratio=0.1,
|
| 193 |
+
num_classes=59,
|
| 194 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 195 |
+
align_corners=True,
|
| 196 |
+
loss_decode=dict(
|
| 197 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 198 |
+
train_cfg=dict(),
|
| 199 |
+
test_cfg=dict(mode='whole'))
|
| 200 |
+
work_dir = 'work_dirs'
|
| 201 |
+
gpu_ids = [0]
|
| 202 |
+
auto_resume = False
|
line1/pascalcontext/isanet_r50SS3PR-d32_pascalcontext/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:075828916a87c2a613c330e6b68ad1986fd8ce5242463adafb1e881ccc56758e
|
| 3 |
+
size 313916366
|
line1/pascalcontext/pspnet_r50SS3PR-d32_pascalcontext/config.py
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_type = 'PascalContextDataset59'
|
| 2 |
+
data_root = './data/VOCdevkit/VOC2010/'
|
| 3 |
+
img_norm_cfg = dict(
|
| 4 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 5 |
+
crop_size = (513, 513)
|
| 6 |
+
img_scale = (2049, 513)
|
| 7 |
+
train_pipeline = [
|
| 8 |
+
dict(type='LoadImageFromFile'),
|
| 9 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 10 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 11 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 12 |
+
dict(type='RandomFlip', prob=0.5),
|
| 13 |
+
dict(type='PhotoMetricDistortion'),
|
| 14 |
+
dict(
|
| 15 |
+
type='Normalize',
|
| 16 |
+
mean=[123.675, 116.28, 103.53],
|
| 17 |
+
std=[58.395, 57.12, 57.375],
|
| 18 |
+
to_rgb=True),
|
| 19 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 20 |
+
dict(type='DefaultFormatBundle'),
|
| 21 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 22 |
+
]
|
| 23 |
+
test_pipeline = [
|
| 24 |
+
dict(type='LoadImageFromFile'),
|
| 25 |
+
dict(
|
| 26 |
+
type='MultiScaleFlipAug',
|
| 27 |
+
img_scale=(2049, 513),
|
| 28 |
+
flip=False,
|
| 29 |
+
transforms=[
|
| 30 |
+
dict(type='Resize', keep_ratio=True),
|
| 31 |
+
dict(type='RandomFlip'),
|
| 32 |
+
dict(
|
| 33 |
+
type='Normalize',
|
| 34 |
+
mean=[123.675, 116.28, 103.53],
|
| 35 |
+
std=[58.395, 57.12, 57.375],
|
| 36 |
+
to_rgb=True),
|
| 37 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 38 |
+
dict(type='Collect', keys=['img'])
|
| 39 |
+
])
|
| 40 |
+
]
|
| 41 |
+
BATCH_SIZE = 16
|
| 42 |
+
GPU = 1
|
| 43 |
+
data = dict(
|
| 44 |
+
samples_per_gpu=16,
|
| 45 |
+
workers_per_gpu=10,
|
| 46 |
+
train=dict(
|
| 47 |
+
type='PascalContextDataset59',
|
| 48 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 49 |
+
img_dir='JPEGImages',
|
| 50 |
+
ann_dir='SegmentationClassContext',
|
| 51 |
+
split='ImageSets/SegmentationContext/train.txt',
|
| 52 |
+
pipeline=[
|
| 53 |
+
dict(type='LoadImageFromFile'),
|
| 54 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 55 |
+
dict(type='Resize', img_scale=(2049, 513), ratio_range=(0.5, 2.0)),
|
| 56 |
+
dict(type='RandomCrop', crop_size=(513, 513), cat_max_ratio=0.75),
|
| 57 |
+
dict(type='RandomFlip', prob=0.5),
|
| 58 |
+
dict(type='PhotoMetricDistortion'),
|
| 59 |
+
dict(
|
| 60 |
+
type='Normalize',
|
| 61 |
+
mean=[123.675, 116.28, 103.53],
|
| 62 |
+
std=[58.395, 57.12, 57.375],
|
| 63 |
+
to_rgb=True),
|
| 64 |
+
dict(type='Pad', size=(513, 513), pad_val=0, seg_pad_val=255),
|
| 65 |
+
dict(type='DefaultFormatBundle'),
|
| 66 |
+
dict(type='Collect', keys=['img', 'gt_semantic_seg'])
|
| 67 |
+
]),
|
| 68 |
+
val=dict(
|
| 69 |
+
type='PascalContextDataset59',
|
| 70 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 71 |
+
img_dir='JPEGImages',
|
| 72 |
+
ann_dir='SegmentationClassContext',
|
| 73 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 74 |
+
pipeline=[
|
| 75 |
+
dict(type='LoadImageFromFile'),
|
| 76 |
+
dict(
|
| 77 |
+
type='MultiScaleFlipAug',
|
| 78 |
+
img_scale=(2049, 513),
|
| 79 |
+
flip=False,
|
| 80 |
+
transforms=[
|
| 81 |
+
dict(type='Resize', keep_ratio=True),
|
| 82 |
+
dict(type='RandomFlip'),
|
| 83 |
+
dict(
|
| 84 |
+
type='Normalize',
|
| 85 |
+
mean=[123.675, 116.28, 103.53],
|
| 86 |
+
std=[58.395, 57.12, 57.375],
|
| 87 |
+
to_rgb=True),
|
| 88 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 89 |
+
dict(type='Collect', keys=['img'])
|
| 90 |
+
])
|
| 91 |
+
]),
|
| 92 |
+
test=dict(
|
| 93 |
+
type='PascalContextDataset59',
|
| 94 |
+
data_root='./data/VOCdevkit/VOC2010/',
|
| 95 |
+
img_dir='JPEGImages',
|
| 96 |
+
ann_dir='SegmentationClassContext',
|
| 97 |
+
split='ImageSets/SegmentationContext/val.txt',
|
| 98 |
+
pipeline=[
|
| 99 |
+
dict(type='LoadImageFromFile'),
|
| 100 |
+
dict(
|
| 101 |
+
type='MultiScaleFlipAug',
|
| 102 |
+
img_scale=(2049, 513),
|
| 103 |
+
flip=False,
|
| 104 |
+
transforms=[
|
| 105 |
+
dict(type='Resize', keep_ratio=True),
|
| 106 |
+
dict(type='RandomFlip'),
|
| 107 |
+
dict(
|
| 108 |
+
type='Normalize',
|
| 109 |
+
mean=[123.675, 116.28, 103.53],
|
| 110 |
+
std=[58.395, 57.12, 57.375],
|
| 111 |
+
to_rgb=True),
|
| 112 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 113 |
+
dict(type='Collect', keys=['img'])
|
| 114 |
+
])
|
| 115 |
+
]))
|
| 116 |
+
ITER_SETTING = 40000
|
| 117 |
+
optimizer = dict(
|
| 118 |
+
type='SGD',
|
| 119 |
+
lr=0.004,
|
| 120 |
+
momentum=0.9,
|
| 121 |
+
weight_decay=0.0005,
|
| 122 |
+
paramwise_cfg=dict(
|
| 123 |
+
custom_keys=dict(
|
| 124 |
+
head=dict(lr_mult=2.0),
|
| 125 |
+
SS=dict(lr_mult=2.0),
|
| 126 |
+
pixelrelation=dict(lr_mult=2.0))))
|
| 127 |
+
optimizer_config = dict()
|
| 128 |
+
lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False)
|
| 129 |
+
runner = dict(type='IterBasedRunner', max_iters=40000)
|
| 130 |
+
checkpoint_config = dict(by_epoch=False, interval=4000)
|
| 131 |
+
evaluation = dict(interval=4000, metric='mIoU', pre_eval=True)
|
| 132 |
+
log_config = dict(
|
| 133 |
+
interval=10, hooks=[dict(type='TextLoggerHook', by_epoch=False)])
|
| 134 |
+
dist_params = dict(backend='nccl')
|
| 135 |
+
log_level = 'INFO'
|
| 136 |
+
load_from = None
|
| 137 |
+
resume_from = None
|
| 138 |
+
workflow = [('train', 1)]
|
| 139 |
+
cudnn_benchmark = False
|
| 140 |
+
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
| 141 |
+
LOG_DIR = None
|
| 142 |
+
SAMPLER_NUM = 3
|
| 143 |
+
model = dict(
|
| 144 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 145 |
+
log_dir=None,
|
| 146 |
+
edge_loss_weight=100,
|
| 147 |
+
pixel_relation=[1, 2, 4, 8, 16],
|
| 148 |
+
sampler_num=3,
|
| 149 |
+
pretrained='open-mmlab://resnet50_v1c',
|
| 150 |
+
backbone=dict(
|
| 151 |
+
type='ResNetV1cSaliencySampler',
|
| 152 |
+
log_dir=None,
|
| 153 |
+
sampler_num=3,
|
| 154 |
+
sampler_strides=(1, 1, 1),
|
| 155 |
+
sampler_paddings=(5, 5, 5),
|
| 156 |
+
sampler_fwhm=(3, 3, 3),
|
| 157 |
+
sampler_mode=('avgpsp_semantic_edge', 'avgpsp_semantic_edge',
|
| 158 |
+
'avgpsp_semantic_edge'),
|
| 159 |
+
use_lpf=False,
|
| 160 |
+
align_corners=True,
|
| 161 |
+
use_checkpoint=False,
|
| 162 |
+
depth=50,
|
| 163 |
+
num_stages=4,
|
| 164 |
+
out_indices=(0, 1, 2, 3),
|
| 165 |
+
dilations=(1, 1, 1, 1),
|
| 166 |
+
strides=(1, 2, 2, 2),
|
| 167 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 168 |
+
norm_eval=False,
|
| 169 |
+
style='pytorch',
|
| 170 |
+
contract_dilation=True),
|
| 171 |
+
decode_head=dict(
|
| 172 |
+
type='PSPHead',
|
| 173 |
+
in_channels=2048,
|
| 174 |
+
in_index=3,
|
| 175 |
+
channels=512,
|
| 176 |
+
pool_scales=(1, 2, 3, 6),
|
| 177 |
+
dropout_ratio=0.1,
|
| 178 |
+
num_classes=59,
|
| 179 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 180 |
+
align_corners=True,
|
| 181 |
+
loss_decode=dict(
|
| 182 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
| 183 |
+
auxiliary_head=dict(
|
| 184 |
+
type='FCNHead',
|
| 185 |
+
in_channels=1024,
|
| 186 |
+
in_index=2,
|
| 187 |
+
channels=256,
|
| 188 |
+
num_convs=1,
|
| 189 |
+
concat_input=False,
|
| 190 |
+
dropout_ratio=0.1,
|
| 191 |
+
num_classes=59,
|
| 192 |
+
norm_cfg=dict(type='SyncBN', requires_grad=True),
|
| 193 |
+
align_corners=True,
|
| 194 |
+
loss_decode=dict(
|
| 195 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
| 196 |
+
train_cfg=dict(),
|
| 197 |
+
test_cfg=dict(mode='whole'))
|
| 198 |
+
work_dir = 'work_dirs'
|
| 199 |
+
gpu_ids = [0]
|
| 200 |
+
auto_resume = False
|
line1/pascalcontext/pspnet_r50SS3PR-d32_pascalcontext/iter_40000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7dbc796989da83698bc99064ebcbc9b876d948c5e1aba10f365d77c357cb9d2
|
| 3 |
+
size 404020175
|
line2/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2/best_mIoU_iter_150000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c40fdf630ec7ff21c6af0656e8ed8dbaf9b8900f69efaddc2af9df875cc88bc
|
| 3 |
+
size 296765373
|
line2/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2/config.py
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_scope = 'mmseg'
|
| 2 |
+
env_cfg = dict(
|
| 3 |
+
cudnn_benchmark=True,
|
| 4 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
| 5 |
+
dist_cfg=dict(backend='nccl'))
|
| 6 |
+
vis_backends = [dict(type='LocalVisBackend')]
|
| 7 |
+
visualizer = dict(
|
| 8 |
+
type='SegLocalVisualizer',
|
| 9 |
+
vis_backends=[dict(type='LocalVisBackend')],
|
| 10 |
+
name='visualizer')
|
| 11 |
+
log_processor = dict(by_epoch=False)
|
| 12 |
+
log_level = 'INFO'
|
| 13 |
+
load_from = None # 从 HuggingFace 下载 mask2former_swin-t_SFMv2_ade20k 权重后,用 tools/test.py 传入
|
| 14 |
+
resume = False
|
| 15 |
+
tta_model = dict(type='SegTTAModel')
|
| 16 |
+
dataset_type = 'ADE20KDataset'
|
| 17 |
+
data_root = './data/ADEChallengeData2016'
|
| 18 |
+
crop_size = (512, 512)
|
| 19 |
+
train_pipeline = [
|
| 20 |
+
dict(type='LoadImageFromFile'),
|
| 21 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 22 |
+
dict(
|
| 23 |
+
type='RandomChoiceResize',
|
| 24 |
+
scales=[
|
| 25 |
+
256, 307, 358, 409, 460, 512, 563, 614, 665, 716, 768, 819, 870,
|
| 26 |
+
921, 972, 1024
|
| 27 |
+
],
|
| 28 |
+
resize_type='ResizeShortestEdge',
|
| 29 |
+
max_size=2048),
|
| 30 |
+
dict(type='RandomCrop', crop_size=(512, 512), cat_max_ratio=0.75),
|
| 31 |
+
dict(type='RandomFlip', prob=0.5),
|
| 32 |
+
dict(type='PhotoMetricDistortion'),
|
| 33 |
+
dict(type='PackSegInputs')
|
| 34 |
+
]
|
| 35 |
+
test_pipeline = [
|
| 36 |
+
dict(type='LoadImageFromFile'),
|
| 37 |
+
dict(type='Resize', scale=(2048, 512), keep_ratio=True),
|
| 38 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 39 |
+
dict(type='PackSegInputs')
|
| 40 |
+
]
|
| 41 |
+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
|
| 42 |
+
tta_pipeline = [
|
| 43 |
+
dict(type='LoadImageFromFile', backend_args=None),
|
| 44 |
+
dict(
|
| 45 |
+
type='TestTimeAug',
|
| 46 |
+
transforms=[[{
|
| 47 |
+
'type': 'Resize',
|
| 48 |
+
'scale_factor': 0.5,
|
| 49 |
+
'keep_ratio': True
|
| 50 |
+
}, {
|
| 51 |
+
'type': 'Resize',
|
| 52 |
+
'scale_factor': 0.75,
|
| 53 |
+
'keep_ratio': True
|
| 54 |
+
}, {
|
| 55 |
+
'type': 'Resize',
|
| 56 |
+
'scale_factor': 1.0,
|
| 57 |
+
'keep_ratio': True
|
| 58 |
+
}, {
|
| 59 |
+
'type': 'Resize',
|
| 60 |
+
'scale_factor': 1.25,
|
| 61 |
+
'keep_ratio': True
|
| 62 |
+
}, {
|
| 63 |
+
'type': 'Resize',
|
| 64 |
+
'scale_factor': 1.5,
|
| 65 |
+
'keep_ratio': True
|
| 66 |
+
}, {
|
| 67 |
+
'type': 'Resize',
|
| 68 |
+
'scale_factor': 1.75,
|
| 69 |
+
'keep_ratio': True
|
| 70 |
+
}],
|
| 71 |
+
[{
|
| 72 |
+
'type': 'RandomFlip',
|
| 73 |
+
'prob': 0.0,
|
| 74 |
+
'direction': 'horizontal'
|
| 75 |
+
}, {
|
| 76 |
+
'type': 'RandomFlip',
|
| 77 |
+
'prob': 1.0,
|
| 78 |
+
'direction': 'horizontal'
|
| 79 |
+
}], [{
|
| 80 |
+
'type': 'LoadAnnotations'
|
| 81 |
+
}], [{
|
| 82 |
+
'type': 'PackSegInputs'
|
| 83 |
+
}]])
|
| 84 |
+
]
|
| 85 |
+
train_dataloader = dict(
|
| 86 |
+
batch_size=8,
|
| 87 |
+
num_workers=8,
|
| 88 |
+
persistent_workers=True,
|
| 89 |
+
sampler=dict(type='InfiniteSampler', shuffle=True),
|
| 90 |
+
dataset=dict(
|
| 91 |
+
type='ADE20KDataset',
|
| 92 |
+
data_root=data_root,
|
| 93 |
+
data_prefix=dict(
|
| 94 |
+
img_path='images/training', seg_map_path='annotations/training'),
|
| 95 |
+
pipeline=[
|
| 96 |
+
dict(type='LoadImageFromFile'),
|
| 97 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 98 |
+
dict(
|
| 99 |
+
type='RandomChoiceResize',
|
| 100 |
+
scales=[
|
| 101 |
+
256, 307, 358, 409, 460, 512, 563, 614, 665, 716, 768, 819,
|
| 102 |
+
870, 921, 972, 1024
|
| 103 |
+
],
|
| 104 |
+
resize_type='ResizeShortestEdge',
|
| 105 |
+
max_size=2048),
|
| 106 |
+
dict(type='RandomCrop', crop_size=(512, 512), cat_max_ratio=0.75),
|
| 107 |
+
dict(type='RandomFlip', prob=0.5),
|
| 108 |
+
dict(type='PhotoMetricDistortion'),
|
| 109 |
+
dict(type='PackSegInputs')
|
| 110 |
+
]))
|
| 111 |
+
val_dataloader = dict(
|
| 112 |
+
batch_size=1,
|
| 113 |
+
num_workers=8,
|
| 114 |
+
persistent_workers=True,
|
| 115 |
+
sampler=dict(type='DefaultSampler', shuffle=False),
|
| 116 |
+
dataset=dict(
|
| 117 |
+
type='ADE20KDataset',
|
| 118 |
+
data_root=data_root,
|
| 119 |
+
data_prefix=dict(
|
| 120 |
+
img_path='images/validation',
|
| 121 |
+
seg_map_path='annotations/validation'),
|
| 122 |
+
pipeline=[
|
| 123 |
+
dict(type='LoadImageFromFile'),
|
| 124 |
+
dict(type='Resize', scale=(2048, 512), keep_ratio=True),
|
| 125 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 126 |
+
dict(type='PackSegInputs')
|
| 127 |
+
]))
|
| 128 |
+
test_dataloader = dict(
|
| 129 |
+
batch_size=1,
|
| 130 |
+
num_workers=8,
|
| 131 |
+
persistent_workers=True,
|
| 132 |
+
sampler=dict(type='DefaultSampler', shuffle=False),
|
| 133 |
+
dataset=dict(
|
| 134 |
+
type='ADE20KDataset',
|
| 135 |
+
data_root=data_root,
|
| 136 |
+
data_prefix=dict(
|
| 137 |
+
img_path='images/validation',
|
| 138 |
+
seg_map_path='annotations/validation'),
|
| 139 |
+
pipeline=[
|
| 140 |
+
dict(type='LoadImageFromFile'),
|
| 141 |
+
dict(type='Resize', scale=(2048, 512), keep_ratio=True),
|
| 142 |
+
dict(type='LoadAnnotations', reduce_zero_label=True),
|
| 143 |
+
dict(type='PackSegInputs')
|
| 144 |
+
]))
|
| 145 |
+
val_evaluator = dict(type='IoUMetric', iou_metrics=['mIoU'])
|
| 146 |
+
test_evaluator = dict(type='IoUMetric', iou_metrics=['mIoU'])
|
| 147 |
+
custom_imports = dict(
|
| 148 |
+
imports=[
|
| 149 |
+
'mmdet.models', 'mmseg_custom.models.backbones.swin_as',
|
| 150 |
+
'mmseg_custom.models.layers.msdeformattn_pixel_decoder',
|
| 151 |
+
'mmseg_custom.models.decode_heads.mask2former_head_custom',
|
| 152 |
+
'mmseg_custom.models.segmentors.encoder_decoder_custom'
|
| 153 |
+
],
|
| 154 |
+
allow_failed_imports=False)
|
| 155 |
+
data_preprocessor = dict(
|
| 156 |
+
type='SegDataPreProcessor',
|
| 157 |
+
mean=[123.675, 116.28, 103.53],
|
| 158 |
+
std=[58.395, 57.12, 57.375],
|
| 159 |
+
bgr_to_rgb=True,
|
| 160 |
+
pad_val=0,
|
| 161 |
+
seg_pad_val=255,
|
| 162 |
+
size=(512, 512),
|
| 163 |
+
test_cfg=dict(size_divisor=32))
|
| 164 |
+
num_classes = 150
|
| 165 |
+
model = dict(
|
| 166 |
+
type='EncoderDecoderWithSaliencySamplerPixelRelation',
|
| 167 |
+
data_preprocessor=dict(
|
| 168 |
+
type='SegDataPreProcessor',
|
| 169 |
+
mean=[123.675, 116.28, 103.53],
|
| 170 |
+
std=[58.395, 57.12, 57.375],
|
| 171 |
+
bgr_to_rgb=True,
|
| 172 |
+
pad_val=0,
|
| 173 |
+
seg_pad_val=255,
|
| 174 |
+
size=(512, 512),
|
| 175 |
+
test_cfg=dict(size_divisor=32)),
|
| 176 |
+
backbone=dict(
|
| 177 |
+
type='SwinTransformerSaliencySampler',
|
| 178 |
+
use_checkpoint=False,
|
| 179 |
+
align_corners=False,
|
| 180 |
+
log_dir=None,
|
| 181 |
+
sampler_num=3,
|
| 182 |
+
sampler_strides=(1, 1, 1),
|
| 183 |
+
sampler_paddings=(5, 5, 5),
|
| 184 |
+
sampler_fwhm=(3, 3, 3),
|
| 185 |
+
sampler_mode=('avg_lhpf_psp', 'avg_lhpf_psp', 'avg_lhpf_psp'),
|
| 186 |
+
psp_ratio=16,
|
| 187 |
+
with_cp=False,
|
| 188 |
+
embed_dims=96,
|
| 189 |
+
depths=[2, 2, 6, 2],
|
| 190 |
+
num_heads=[3, 6, 12, 24],
|
| 191 |
+
window_size=7,
|
| 192 |
+
mlp_ratio=4,
|
| 193 |
+
qkv_bias=True,
|
| 194 |
+
qk_scale=None,
|
| 195 |
+
drop_rate=0.0,
|
| 196 |
+
attn_drop_rate=0.0,
|
| 197 |
+
drop_path_rate=0.3,
|
| 198 |
+
patch_norm=True,
|
| 199 |
+
out_indices=(0, 1, 2, 3),
|
| 200 |
+
frozen_stages=-1,
|
| 201 |
+
init_cfg=dict(
|
| 202 |
+
type='Pretrained',
|
| 203 |
+
checkpoint=
|
| 204 |
+
'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/swin/swin_tiny_patch4_window7_224_20220317-1cdeb081.pth'
|
| 205 |
+
)),
|
| 206 |
+
decode_head=dict(
|
| 207 |
+
type='Mask2FormerHeadNonUniformSFM',
|
| 208 |
+
in_channels=[96, 192, 384, 768],
|
| 209 |
+
strides=[4, 8, 16, 32],
|
| 210 |
+
feat_channels=256,
|
| 211 |
+
out_channels=256,
|
| 212 |
+
num_classes=150,
|
| 213 |
+
num_queries=100,
|
| 214 |
+
num_transformer_feat_level=3,
|
| 215 |
+
align_corners=False,
|
| 216 |
+
pixel_decoder=dict(
|
| 217 |
+
type='MSDeformAttnPixelDecoderSFM',
|
| 218 |
+
num_outs=3,
|
| 219 |
+
norm_cfg=dict(type='GN', num_groups=32),
|
| 220 |
+
act_cfg=dict(type='ReLU'),
|
| 221 |
+
encoder=dict(
|
| 222 |
+
num_layers=6,
|
| 223 |
+
layer_cfg=dict(
|
| 224 |
+
self_attn_cfg=dict(
|
| 225 |
+
embed_dims=256,
|
| 226 |
+
num_heads=8,
|
| 227 |
+
num_levels=3,
|
| 228 |
+
num_points=4,
|
| 229 |
+
im2col_step=64,
|
| 230 |
+
dropout=0.0,
|
| 231 |
+
batch_first=True,
|
| 232 |
+
norm_cfg=None,
|
| 233 |
+
init_cfg=None),
|
| 234 |
+
ffn_cfg=dict(
|
| 235 |
+
embed_dims=256,
|
| 236 |
+
feedforward_channels=1024,
|
| 237 |
+
num_fcs=2,
|
| 238 |
+
ffn_drop=0.0,
|
| 239 |
+
act_cfg=dict(type='ReLU', inplace=True))),
|
| 240 |
+
init_cfg=None),
|
| 241 |
+
positional_encoding=dict(num_feats=128, normalize=True),
|
| 242 |
+
init_cfg=None,
|
| 243 |
+
compress_ratio=16,
|
| 244 |
+
align_corners=False,
|
| 245 |
+
use_align=True,
|
| 246 |
+
use_last_align=True),
|
| 247 |
+
enforce_decoder_input_project=False,
|
| 248 |
+
positional_encoding=dict(num_feats=128, normalize=True),
|
| 249 |
+
transformer_decoder=dict(
|
| 250 |
+
return_intermediate=True,
|
| 251 |
+
num_layers=9,
|
| 252 |
+
layer_cfg=dict(
|
| 253 |
+
self_attn_cfg=dict(
|
| 254 |
+
embed_dims=256,
|
| 255 |
+
num_heads=8,
|
| 256 |
+
attn_drop=0.0,
|
| 257 |
+
proj_drop=0.0,
|
| 258 |
+
dropout_layer=None,
|
| 259 |
+
batch_first=True),
|
| 260 |
+
cross_attn_cfg=dict(
|
| 261 |
+
embed_dims=256,
|
| 262 |
+
num_heads=8,
|
| 263 |
+
attn_drop=0.0,
|
| 264 |
+
proj_drop=0.0,
|
| 265 |
+
dropout_layer=None,
|
| 266 |
+
batch_first=True),
|
| 267 |
+
ffn_cfg=dict(
|
| 268 |
+
embed_dims=256,
|
| 269 |
+
feedforward_channels=2048,
|
| 270 |
+
num_fcs=2,
|
| 271 |
+
act_cfg=dict(type='ReLU', inplace=True),
|
| 272 |
+
ffn_drop=0.0,
|
| 273 |
+
dropout_layer=None,
|
| 274 |
+
add_identity=True)),
|
| 275 |
+
init_cfg=None),
|
| 276 |
+
loss_cls=dict(
|
| 277 |
+
type='mmdet.CrossEntropyLoss',
|
| 278 |
+
use_sigmoid=False,
|
| 279 |
+
loss_weight=2.0,
|
| 280 |
+
reduction='mean',
|
| 281 |
+
class_weight=[
|
| 282 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 283 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 284 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 285 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 286 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 287 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 288 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 289 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 290 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 291 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 292 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 293 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
| 294 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.1
|
| 295 |
+
]),
|
| 296 |
+
loss_mask=dict(
|
| 297 |
+
type='mmdet.CrossEntropyLoss',
|
| 298 |
+
use_sigmoid=True,
|
| 299 |
+
reduction='mean',
|
| 300 |
+
loss_weight=5.0),
|
| 301 |
+
loss_dice=dict(
|
| 302 |
+
type='mmdet.DiceLoss',
|
| 303 |
+
use_sigmoid=True,
|
| 304 |
+
activate=True,
|
| 305 |
+
reduction='mean',
|
| 306 |
+
naive_dice=True,
|
| 307 |
+
eps=1.0,
|
| 308 |
+
loss_weight=5.0),
|
| 309 |
+
train_cfg=dict(
|
| 310 |
+
num_points=12544,
|
| 311 |
+
oversample_ratio=3.0,
|
| 312 |
+
importance_sample_ratio=0.75,
|
| 313 |
+
assigner=dict(
|
| 314 |
+
type='mmdet.HungarianAssigner',
|
| 315 |
+
match_costs=[
|
| 316 |
+
dict(type='mmdet.ClassificationCost', weight=2.0),
|
| 317 |
+
dict(
|
| 318 |
+
type='mmdet.CrossEntropyLossCost',
|
| 319 |
+
weight=5.0,
|
| 320 |
+
use_sigmoid=True),
|
| 321 |
+
dict(
|
| 322 |
+
type='mmdet.DiceCost',
|
| 323 |
+
weight=5.0,
|
| 324 |
+
pred_act=True,
|
| 325 |
+
eps=1.0)
|
| 326 |
+
]),
|
| 327 |
+
sampler=dict(type='mmdet.MaskPseudoSampler'))),
|
| 328 |
+
train_cfg=dict(),
|
| 329 |
+
test_cfg=dict(mode='whole'),
|
| 330 |
+
log_dir=None,
|
| 331 |
+
edge_loss_weight=100,
|
| 332 |
+
pixel_relation=[],
|
| 333 |
+
sampler_num=3)
|
| 334 |
+
embed_multi = dict(lr_mult=1.0, decay_mult=0.0)
|
| 335 |
+
optimizer = dict(
|
| 336 |
+
type='AdamW', lr=0.0001, weight_decay=0.05, eps=1e-08, betas=(0.9, 0.999))
|
| 337 |
+
optim_wrapper = dict(
|
| 338 |
+
type='OptimWrapper',
|
| 339 |
+
optimizer=dict(
|
| 340 |
+
type='AdamW',
|
| 341 |
+
lr=0.0001,
|
| 342 |
+
weight_decay=0.05,
|
| 343 |
+
eps=1e-08,
|
| 344 |
+
betas=(0.9, 0.999)),
|
| 345 |
+
clip_grad=dict(max_norm=0.01, norm_type=2),
|
| 346 |
+
paramwise_cfg=dict(
|
| 347 |
+
custom_keys=dict({
|
| 348 |
+
'backbone':
|
| 349 |
+
dict(lr_mult=0.1, decay_mult=1.0),
|
| 350 |
+
'query_embed':
|
| 351 |
+
dict(lr_mult=1.0, decay_mult=0.0),
|
| 352 |
+
'query_feat':
|
| 353 |
+
dict(lr_mult=1.0, decay_mult=0.0),
|
| 354 |
+
'level_embed':
|
| 355 |
+
dict(lr_mult=1.0, decay_mult=0.0),
|
| 356 |
+
'backbone.patch_embed.norm':
|
| 357 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 358 |
+
'backbone.norm':
|
| 359 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 360 |
+
'absolute_pos_embed':
|
| 361 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 362 |
+
'relative_position_bias_table':
|
| 363 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 364 |
+
'backbone.SS':
|
| 365 |
+
dict(lr_mult=1.0, decay_mult=1.0),
|
| 366 |
+
'backbone.stages.0.blocks.0.norm':
|
| 367 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 368 |
+
'backbone.stages.0.blocks.1.norm':
|
| 369 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 370 |
+
'backbone.stages.1.blocks.0.norm':
|
| 371 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 372 |
+
'backbone.stages.1.blocks.1.norm':
|
| 373 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 374 |
+
'backbone.stages.2.blocks.0.norm':
|
| 375 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 376 |
+
'backbone.stages.2.blocks.1.norm':
|
| 377 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 378 |
+
'backbone.stages.2.blocks.2.norm':
|
| 379 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 380 |
+
'backbone.stages.2.blocks.3.norm':
|
| 381 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 382 |
+
'backbone.stages.2.blocks.4.norm':
|
| 383 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 384 |
+
'backbone.stages.2.blocks.5.norm':
|
| 385 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 386 |
+
'backbone.stages.3.blocks.0.norm':
|
| 387 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 388 |
+
'backbone.stages.3.blocks.1.norm':
|
| 389 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 390 |
+
'backbone.stages.0.downsample.norm':
|
| 391 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 392 |
+
'backbone.stages.1.downsample.norm':
|
| 393 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 394 |
+
'backbone.stages.2.downsample.norm':
|
| 395 |
+
dict(lr_mult=0.1, decay_mult=0.0)
|
| 396 |
+
}),
|
| 397 |
+
norm_decay_mult=0.0))
|
| 398 |
+
param_scheduler = [
|
| 399 |
+
dict(
|
| 400 |
+
type='PolyLR',
|
| 401 |
+
eta_min=0,
|
| 402 |
+
power=0.9,
|
| 403 |
+
begin=0,
|
| 404 |
+
end=160000,
|
| 405 |
+
by_epoch=False)
|
| 406 |
+
]
|
| 407 |
+
train_cfg = dict(
|
| 408 |
+
type='IterBasedTrainLoop', max_iters=160000, val_interval=5000)
|
| 409 |
+
val_cfg = dict(type='ValLoop')
|
| 410 |
+
test_cfg = dict(type='TestLoop')
|
| 411 |
+
default_hooks = dict(
|
| 412 |
+
timer=dict(type='IterTimerHook'),
|
| 413 |
+
logger=dict(type='LoggerHook', interval=50, log_metric_by_epoch=False),
|
| 414 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
| 415 |
+
checkpoint=dict(
|
| 416 |
+
type='CheckpointHook',
|
| 417 |
+
by_epoch=False,
|
| 418 |
+
interval=5000,
|
| 419 |
+
max_keep_ckpts=2,
|
| 420 |
+
save_best='mIoU'),
|
| 421 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
| 422 |
+
visualization=dict(type='SegVisualizationHook'))
|
| 423 |
+
auto_scale_lr = dict(enable=False, base_batch_size=16)
|
| 424 |
+
pretrained = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/swin/swin_tiny_patch4_window7_224_20220317-1cdeb081.pth'
|
| 425 |
+
LOG_DIR = None
|
| 426 |
+
SAMPLER_NUM = 3
|
| 427 |
+
ALIGN_CORNERS = False
|
| 428 |
+
depths = [2, 2, 6, 2]
|
| 429 |
+
backbone_norm_multi = dict(lr_mult=0.1, decay_mult=0.0)
|
| 430 |
+
backbone_embed_multi = dict(lr_mult=0.1, decay_mult=0.0)
|
| 431 |
+
custom_keys = dict({
|
| 432 |
+
'backbone':
|
| 433 |
+
dict(lr_mult=0.1, decay_mult=1.0),
|
| 434 |
+
'backbone.patch_embed.norm':
|
| 435 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 436 |
+
'backbone.norm':
|
| 437 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 438 |
+
'absolute_pos_embed':
|
| 439 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 440 |
+
'relative_position_bias_table':
|
| 441 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 442 |
+
'query_embed':
|
| 443 |
+
dict(lr_mult=1.0, decay_mult=0.0),
|
| 444 |
+
'query_feat':
|
| 445 |
+
dict(lr_mult=1.0, decay_mult=0.0),
|
| 446 |
+
'level_embed':
|
| 447 |
+
dict(lr_mult=1.0, decay_mult=0.0),
|
| 448 |
+
'backbone.SS':
|
| 449 |
+
dict(lr_mult=1.0, decay_mult=1.0),
|
| 450 |
+
'backbone.stages.0.blocks.0.norm':
|
| 451 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 452 |
+
'backbone.stages.0.blocks.1.norm':
|
| 453 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 454 |
+
'backbone.stages.1.blocks.0.norm':
|
| 455 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 456 |
+
'backbone.stages.1.blocks.1.norm':
|
| 457 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 458 |
+
'backbone.stages.2.blocks.0.norm':
|
| 459 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 460 |
+
'backbone.stages.2.blocks.1.norm':
|
| 461 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 462 |
+
'backbone.stages.2.blocks.2.norm':
|
| 463 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 464 |
+
'backbone.stages.2.blocks.3.norm':
|
| 465 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 466 |
+
'backbone.stages.2.blocks.4.norm':
|
| 467 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 468 |
+
'backbone.stages.2.blocks.5.norm':
|
| 469 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 470 |
+
'backbone.stages.3.blocks.0.norm':
|
| 471 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 472 |
+
'backbone.stages.3.blocks.1.norm':
|
| 473 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 474 |
+
'backbone.stages.0.downsample.norm':
|
| 475 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 476 |
+
'backbone.stages.1.downsample.norm':
|
| 477 |
+
dict(lr_mult=0.1, decay_mult=0.0),
|
| 478 |
+
'backbone.stages.2.downsample.norm':
|
| 479 |
+
dict(lr_mult=0.1, decay_mult=0.0)
|
| 480 |
+
})
|
| 481 |
+
launcher = 'pytorch'
|
| 482 |
+
eval = 'mIoU'
|
| 483 |
+
work_dir = 'work_dirs/mask2former_swin-t_8xb2-160k_ade20k-512x512_SFMv2'
|