first commit
This commit is contained in:
46
Seg_All_In_One_MMSeg/configs/ddrnet/README.md
Normal file
46
Seg_All_In_One_MMSeg/configs/ddrnet/README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# DDRNet
|
||||
|
||||
> [Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes](http://arxiv.org/abs/2101.06085)
|
||||
|
||||
## Introduction
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<a href="https://github.com/ydhongHIT/DDRNet">Official Repo</a>
|
||||
|
||||
## Abstract
|
||||
|
||||
<!-- [ABSTRACT] -->
|
||||
|
||||
Semantic segmentation is a key technology for autonomous vehicles to understand the surrounding scenes. The appealing performances of contemporary models usually come at the expense of heavy computations and lengthy inference time, which is intolerable for self-driving. Using light-weight architectures (encoder-decoder or two-pathway) or reasoning on low-resolution images, recent methods realize very fast scene parsing, even running at more than 100 FPS on a single 1080Ti GPU. However, there is still a significant gap in performance between these real-time methods and the models based on dilation backbones. To tackle this problem, we proposed a family of efficient backbones specially designed for real-time semantic segmentation. The proposed deep dual-resolution networks (DDRNets) are composed of two deep branches between which multiple bilateral fusions are performed. Additionally, we design a new contextual information extractor named Deep Aggregation Pyramid Pooling Module (DAPPM) to enlarge effective receptive fields and fuse multi-scale context based on low-resolution feature maps. Our method achieves a new state-of-the-art trade-off between accuracy and speed on both Cityscapes and CamVid dataset. In particular, on a single 2080Ti GPU, DDRNet-23-slim yields 77.4% mIoU at 102 FPS on Cityscapes test set and 74.7% mIoU at 230 FPS on CamVid test set. With widely used test augmentation, our method is superior to most state-of-the-art models and requires much less computation. Codes and trained models are available online.
|
||||
|
||||
<!-- [IMAGE] -->
|
||||
|
||||
<div align=center>
|
||||
<img src="https://raw.githubusercontent.com/ydhongHIT/DDRNet/main/figs/DDRNet_seg.png" width="80%"/>
|
||||
</div>
|
||||
|
||||
## Results and models
|
||||
|
||||
### Cityscapes
|
||||
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | Device | mIoU | mIoU(ms+flip) | config | download |
|
||||
| ------ | ------------- | --------- | ------- | -------- | -------------- | ------ | ----- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| DDRNet | DDRNet23-slim | 1024x1024 | 120000 | 1.70 | 85.85 | A100 | 77.84 | 80.15 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/ddrnet/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230426_145312-6a5e5174.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230426_145312.json) |
|
||||
| DDRNet | DDRNet23 | 1024x1024 | 120000 | 7.26 | 33.41 | A100 | 79.99 | 81.71 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/ddrnet/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230425_162633-81601db0.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230425_162633.json) |
|
||||
|
||||
## Notes
|
||||
|
||||
The pretrained weights in config files are converted from [the official repo](https://github.com/ydhongHIT/DDRNet#pretrained-models).
|
||||
|
||||
## Citation
|
||||
|
||||
```bibtex
|
||||
@article{pan2022deep,
|
||||
title={Deep Dual-Resolution Networks for Real-Time and Accurate Semantic Segmentation of Traffic Scenes},
|
||||
author={Pan, Huihui and Hong, Yuanduo and Sun, Weichao and Jia, Yisong},
|
||||
journal={IEEE Transactions on Intelligent Transportation Systems},
|
||||
year={2022},
|
||||
publisher={IEEE}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,93 @@
|
||||
_base_ = [
|
||||
'../_base_/datasets/cityscapes_1024x1024.py',
|
||||
'../_base_/default_runtime.py',
|
||||
]
|
||||
|
||||
# The class_weight is borrowed from https://github.com/openseg-group/OCNet.pytorch/issues/14 # noqa
|
||||
# Licensed under the MIT License
|
||||
class_weight = [
|
||||
0.8373, 0.918, 0.866, 1.0345, 1.0166, 0.9969, 0.9754, 1.0489, 0.8786,
|
||||
1.0023, 0.9539, 0.9843, 1.1116, 0.9037, 1.0865, 1.0955, 1.0865, 1.1529,
|
||||
1.0507
|
||||
]
|
||||
checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/pretrain/ddrnet23s-in1kpre_3rdparty-1ccac5b1.pth' # noqa
|
||||
crop_size = (1024, 1024)
|
||||
data_preprocessor = dict(
|
||||
type='SegDataPreProcessor',
|
||||
size=crop_size,
|
||||
mean=[123.675, 116.28, 103.53],
|
||||
std=[58.395, 57.12, 57.375],
|
||||
bgr_to_rgb=True,
|
||||
pad_val=0,
|
||||
seg_pad_val=255)
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='DDRNet',
|
||||
in_channels=3,
|
||||
channels=32,
|
||||
ppm_channels=128,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
init_cfg=dict(type='Pretrained', checkpoint=checkpoint)),
|
||||
decode_head=dict(
|
||||
type='DDRHead',
|
||||
in_channels=32 * 4,
|
||||
channels=64,
|
||||
dropout_ratio=0.,
|
||||
num_classes=19,
|
||||
align_corners=False,
|
||||
norm_cfg=norm_cfg,
|
||||
loss_decode=[
|
||||
dict(
|
||||
type='OhemCrossEntropy',
|
||||
thres=0.9,
|
||||
min_kept=131072,
|
||||
class_weight=class_weight,
|
||||
loss_weight=1.0),
|
||||
dict(
|
||||
type='OhemCrossEntropy',
|
||||
thres=0.9,
|
||||
min_kept=131072,
|
||||
class_weight=class_weight,
|
||||
loss_weight=0.4),
|
||||
]),
|
||||
|
||||
# model training and testing settings
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(mode='whole'))
|
||||
|
||||
train_dataloader = dict(batch_size=6, num_workers=4)
|
||||
|
||||
iters = 120000
|
||||
# optimizer
|
||||
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
|
||||
optim_wrapper = dict(type='OptimWrapper', optimizer=optimizer, clip_grad=None)
|
||||
# learning policy
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='PolyLR',
|
||||
eta_min=0,
|
||||
power=0.9,
|
||||
begin=0,
|
||||
end=iters,
|
||||
by_epoch=False)
|
||||
]
|
||||
|
||||
# training schedule for 120k
|
||||
train_cfg = dict(
|
||||
type='IterBasedTrainLoop', max_iters=iters, val_interval=iters // 10)
|
||||
val_cfg = dict(type='ValLoop')
|
||||
test_cfg = dict(type='TestLoop')
|
||||
default_hooks = dict(
|
||||
timer=dict(type='IterTimerHook'),
|
||||
logger=dict(type='LoggerHook', interval=50, log_metric_by_epoch=False),
|
||||
param_scheduler=dict(type='ParamSchedulerHook'),
|
||||
checkpoint=dict(
|
||||
type='CheckpointHook', by_epoch=False, interval=iters // 10),
|
||||
sampler_seed=dict(type='DistSamplerSeedHook'),
|
||||
visualization=dict(type='SegVisualizationHook'))
|
||||
|
||||
randomness = dict(seed=304)
|
||||
@@ -0,0 +1,93 @@
|
||||
_base_ = [
|
||||
'../_base_/datasets/cityscapes_1024x1024.py',
|
||||
'../_base_/default_runtime.py',
|
||||
]
|
||||
|
||||
# The class_weight is borrowed from https://github.com/openseg-group/OCNet.pytorch/issues/14 # noqa
|
||||
# Licensed under the MIT License
|
||||
class_weight = [
|
||||
0.8373, 0.918, 0.866, 1.0345, 1.0166, 0.9969, 0.9754, 1.0489, 0.8786,
|
||||
1.0023, 0.9539, 0.9843, 1.1116, 0.9037, 1.0865, 1.0955, 1.0865, 1.1529,
|
||||
1.0507
|
||||
]
|
||||
checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/pretrain/ddrnet23-in1kpre_3rdparty-9ca29f62.pth' # noqa
|
||||
crop_size = (1024, 1024)
|
||||
data_preprocessor = dict(
|
||||
type='SegDataPreProcessor',
|
||||
size=crop_size,
|
||||
mean=[123.675, 116.28, 103.53],
|
||||
std=[58.395, 57.12, 57.375],
|
||||
bgr_to_rgb=True,
|
||||
pad_val=0,
|
||||
seg_pad_val=255)
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
data_preprocessor=data_preprocessor,
|
||||
backbone=dict(
|
||||
type='DDRNet',
|
||||
in_channels=3,
|
||||
channels=64,
|
||||
ppm_channels=128,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
init_cfg=dict(type='Pretrained', checkpoint=checkpoint)),
|
||||
decode_head=dict(
|
||||
type='DDRHead',
|
||||
in_channels=64 * 4,
|
||||
channels=128,
|
||||
dropout_ratio=0.,
|
||||
num_classes=19,
|
||||
align_corners=False,
|
||||
norm_cfg=norm_cfg,
|
||||
loss_decode=[
|
||||
dict(
|
||||
type='OhemCrossEntropy',
|
||||
thres=0.9,
|
||||
min_kept=131072,
|
||||
class_weight=class_weight,
|
||||
loss_weight=1.0),
|
||||
dict(
|
||||
type='OhemCrossEntropy',
|
||||
thres=0.9,
|
||||
min_kept=131072,
|
||||
class_weight=class_weight,
|
||||
loss_weight=0.4),
|
||||
]),
|
||||
|
||||
# model training and testing settings
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(mode='whole'))
|
||||
|
||||
train_dataloader = dict(batch_size=6, num_workers=4)
|
||||
|
||||
iters = 120000
|
||||
# optimizer
|
||||
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
|
||||
optim_wrapper = dict(type='OptimWrapper', optimizer=optimizer, clip_grad=None)
|
||||
# learning policy
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='PolyLR',
|
||||
eta_min=0,
|
||||
power=0.9,
|
||||
begin=0,
|
||||
end=iters,
|
||||
by_epoch=False)
|
||||
]
|
||||
|
||||
# training schedule for 120k
|
||||
train_cfg = dict(
|
||||
type='IterBasedTrainLoop', max_iters=iters, val_interval=iters // 10)
|
||||
val_cfg = dict(type='ValLoop')
|
||||
test_cfg = dict(type='TestLoop')
|
||||
default_hooks = dict(
|
||||
timer=dict(type='IterTimerHook'),
|
||||
logger=dict(type='LoggerHook', interval=50, log_metric_by_epoch=False),
|
||||
param_scheduler=dict(type='ParamSchedulerHook'),
|
||||
checkpoint=dict(
|
||||
type='CheckpointHook', by_epoch=False, interval=iters // 10),
|
||||
sampler_seed=dict(type='DistSamplerSeedHook'),
|
||||
visualization=dict(type='SegVisualizationHook'))
|
||||
|
||||
randomness = dict(seed=304)
|
||||
64
Seg_All_In_One_MMSeg/configs/ddrnet/metafile.yaml
Normal file
64
Seg_All_In_One_MMSeg/configs/ddrnet/metafile.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
Collections:
|
||||
- Name: DDRNet
|
||||
License: Apache License 2.0
|
||||
Metadata:
|
||||
Training Data:
|
||||
- Cityscapes
|
||||
Paper:
|
||||
Title: Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation
|
||||
of Road Scenes
|
||||
URL: http://arxiv.org/abs/2101.06085
|
||||
README: configs/ddrnet/README.md
|
||||
Frameworks:
|
||||
- PyTorch
|
||||
Models:
|
||||
- Name: ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024
|
||||
In Collection: DDRNet
|
||||
Results:
|
||||
Task: Semantic Segmentation
|
||||
Dataset: Cityscapes
|
||||
Metrics:
|
||||
mIoU: 77.84
|
||||
mIoU(ms+flip): 80.15
|
||||
Config: configs/ddrnet/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024.py
|
||||
Metadata:
|
||||
Training Data: Cityscapes
|
||||
Batch Size: 12
|
||||
Architecture:
|
||||
- DDRNet23-slim
|
||||
- DDRNet
|
||||
Training Resources: 2x A100 GPUS
|
||||
Memory (GB): 1.7
|
||||
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230426_145312-6a5e5174.pth
|
||||
Training log: https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23-slim_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230426_145312.json
|
||||
Paper:
|
||||
Title: Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation
|
||||
of Road Scenes
|
||||
URL: http://arxiv.org/abs/2101.06085
|
||||
Code: ''
|
||||
Framework: PyTorch
|
||||
- Name: ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024
|
||||
In Collection: DDRNet
|
||||
Results:
|
||||
Task: Semantic Segmentation
|
||||
Dataset: Cityscapes
|
||||
Metrics:
|
||||
mIoU: 79.99
|
||||
mIoU(ms+flip): 81.71
|
||||
Config: configs/ddrnet/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024.py
|
||||
Metadata:
|
||||
Training Data: Cityscapes
|
||||
Batch Size: 12
|
||||
Architecture:
|
||||
- DDRNet23
|
||||
- DDRNet
|
||||
Training Resources: 2x A100 GPUS
|
||||
Memory (GB): 7.26
|
||||
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230425_162633-81601db0.pth
|
||||
Training log: https://download.openmmlab.com/mmsegmentation/v0.5/ddrnet/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024/ddrnet_23_in1k-pre_2xb6-120k_cityscapes-1024x1024_20230425_162633.json
|
||||
Paper:
|
||||
Title: Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation
|
||||
of Road Scenes
|
||||
URL: http://arxiv.org/abs/2101.06085
|
||||
Code: ''
|
||||
Framework: PyTorch
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_autolaparo.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
123.62464353460942,
|
||||
85.34836259209033,
|
||||
82.31539425671558,
|
||||
],
|
||||
std=[
|
||||
47.172211618459315,
|
||||
47.08256715323592,
|
||||
48.135121265163605,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
123.62464353460942,
|
||||
85.34836259209033,
|
||||
82.31539425671558,
|
||||
],
|
||||
std=[
|
||||
47.172211618459315,
|
||||
47.08256715323592,
|
||||
48.135121265163605,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=64,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=256,
|
||||
channels=128,
|
||||
num_classes=10,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_cholecseg8k.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
85.65740418979115,
|
||||
53.99282220050495,
|
||||
46.074045888534535,
|
||||
],
|
||||
std=[
|
||||
72.24589167201978,
|
||||
56.76979155397199,
|
||||
49.056637115061775,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
85.65740418979115,
|
||||
53.99282220050495,
|
||||
46.074045888534535,
|
||||
],
|
||||
std=[
|
||||
72.24589167201978,
|
||||
56.76979155397199,
|
||||
49.056637115061775,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=64,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=256,
|
||||
channels=128,
|
||||
num_classes=13,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_dresden.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
103.172638338208,
|
||||
61.44762740851152,
|
||||
51.407770213021976,
|
||||
],
|
||||
std=[
|
||||
75.77031253622098,
|
||||
54.63616729031377,
|
||||
49.45572239497569,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
103.172638338208,
|
||||
61.44762740851152,
|
||||
51.407770213021976,
|
||||
],
|
||||
std=[
|
||||
75.77031253622098,
|
||||
54.63616729031377,
|
||||
49.45572239497569,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=64,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=256,
|
||||
channels=128,
|
||||
num_classes=11,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_endovis_2017.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=64,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=256,
|
||||
channels=128,
|
||||
num_classes=8,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_endovis_2018.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=64,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=256,
|
||||
channels=128,
|
||||
num_classes=8,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_autolaparo.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
123.62464353460942,
|
||||
85.34836259209033,
|
||||
82.31539425671558,
|
||||
],
|
||||
std=[
|
||||
47.172211618459315,
|
||||
47.08256715323592,
|
||||
48.135121265163605,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
123.62464353460942,
|
||||
85.34836259209033,
|
||||
82.31539425671558,
|
||||
],
|
||||
std=[
|
||||
47.172211618459315,
|
||||
47.08256715323592,
|
||||
48.135121265163605,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=32,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23-s.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=128,
|
||||
channels=64,
|
||||
num_classes=10,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_cholecseg8k.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
85.65740418979115,
|
||||
53.99282220050495,
|
||||
46.074045888534535,
|
||||
],
|
||||
std=[
|
||||
72.24589167201978,
|
||||
56.76979155397199,
|
||||
49.056637115061775,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
85.65740418979115,
|
||||
53.99282220050495,
|
||||
46.074045888534535,
|
||||
],
|
||||
std=[
|
||||
72.24589167201978,
|
||||
56.76979155397199,
|
||||
49.056637115061775,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=32,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23-s.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=128,
|
||||
channels=64,
|
||||
num_classes=13,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_dresden.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
103.172638338208,
|
||||
61.44762740851152,
|
||||
51.407770213021976,
|
||||
],
|
||||
std=[
|
||||
75.77031253622098,
|
||||
54.63616729031377,
|
||||
49.45572239497569,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
103.172638338208,
|
||||
61.44762740851152,
|
||||
51.407770213021976,
|
||||
],
|
||||
std=[
|
||||
75.77031253622098,
|
||||
54.63616729031377,
|
||||
49.45572239497569,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=32,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23-s.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=128,
|
||||
channels=64,
|
||||
num_classes=11,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_endovis_2017.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=32,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23-s.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=128,
|
||||
channels=64,
|
||||
num_classes=8,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ddrnet.py',
|
||||
'../_base_/datasets/publicdataset_endovis_2018.py',
|
||||
'../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_300e_val1_check10.py',
|
||||
]
|
||||
|
||||
norm_cfg = dict(
|
||||
type='BN',
|
||||
)
|
||||
|
||||
crop_size = (512, 512)
|
||||
|
||||
data_preprocessor = dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
)
|
||||
|
||||
model = dict(
|
||||
data_preprocessor=dict(
|
||||
size=(512, 512),
|
||||
mean=[
|
||||
122.21429912990676,
|
||||
77.0821859677977,
|
||||
87.03836664626716,
|
||||
],
|
||||
std=[
|
||||
50.53335800365262,
|
||||
42.895340354037465,
|
||||
47.739426483390446,
|
||||
],
|
||||
bgr_to_rgb=False,
|
||||
),
|
||||
backbone=dict(
|
||||
channels=32,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='./My_Local_Model/open_mmlab/ddrnet23-s.pth',
|
||||
),
|
||||
),
|
||||
decode_head=dict(
|
||||
in_channels=128,
|
||||
channels=64,
|
||||
num_classes=8,
|
||||
),
|
||||
)
|
||||
|
||||
optim_wrapper = dict(
|
||||
type='OptimWrapper',
|
||||
_delete_=True,
|
||||
optimizer=dict(
|
||||
type='AdamW',
|
||||
lr=0.0001,
|
||||
weight_decay=0.0005,
|
||||
),
|
||||
clip_grad=dict(
|
||||
max_norm=1,
|
||||
norm_type=2,
|
||||
),
|
||||
)
|
||||
|
||||
param_scheduler = [
|
||||
dict(
|
||||
type='LinearLR',
|
||||
start_factor=1e-06,
|
||||
by_epoch=True,
|
||||
begin=0,
|
||||
end=10,
|
||||
),
|
||||
dict(
|
||||
type='PolyLR',
|
||||
power=0.9,
|
||||
begin=10,
|
||||
end=300,
|
||||
eta_min=1e-05,
|
||||
by_epoch=True,
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user