Add files via upload
This commit is contained in:
parent
3045ba4383
commit
74351fd02d
11
config/lr_scheduler.yaml
Normal file
11
config/lr_scheduler.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
scheduler_type: LINEAR_WARMUP_THEN_POLY_SCHEDULER
|
||||
|
||||
# total_iters=epochs * 训练的图像数量
|
||||
kwargs: |
|
||||
{
|
||||
"warmup_iters": 62,
|
||||
"total_iters": 620,
|
||||
"warmup_ratio": 0.000001,
|
||||
"min_lr": 0.,
|
||||
"power": 1.
|
||||
}
|
43
config/model.yaml
Normal file
43
config/model.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
# 网络模型的配置文件
|
||||
|
||||
embed_dims:
|
||||
- 3 # 输入图像的通道
|
||||
- 32
|
||||
- 64
|
||||
- 160
|
||||
- 256
|
||||
depths:
|
||||
- 3
|
||||
- 3
|
||||
- 5
|
||||
- 2
|
||||
drop_prob_of_encoder: 0.1
|
||||
expand_rations:
|
||||
- 8
|
||||
- 8
|
||||
- 4
|
||||
- 4
|
||||
|
||||
|
||||
|
||||
drop_path_prob: 0.1
|
||||
drop_prob_of_decoder: 0.1
|
||||
# hidden_channels, output_channels
|
||||
channels_of_hamburger: 256
|
||||
nmf2d_config:
|
||||
SPATIAL: 1
|
||||
MD_S: 1
|
||||
MD_D: 512
|
||||
MD_R: 16
|
||||
TRAIN_STEPS: 6
|
||||
EVAL_STEPS: 7
|
||||
INV_T: 1
|
||||
ETA: 0.9
|
||||
RAND_INIT: true
|
||||
return_bases: false
|
||||
device: cuda
|
||||
|
||||
# 类别
|
||||
classes:
|
||||
- background # 必须要
|
||||
- leaf
|
32
config/optimizer.yaml
Normal file
32
config/optimizer.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
# 优化器的配置文件
|
||||
base_config:
|
||||
optim_type: AdamW
|
||||
kwargs: |
|
||||
{
|
||||
"lr": 0.00006,
|
||||
"weight_decay": 0.01,
|
||||
"betas": (0.9, 0.999)
|
||||
}
|
||||
|
||||
|
||||
|
||||
parameters:
|
||||
# key(block, block, norm)自定义
|
||||
# default: decay_mult=1, lr_mult=1
|
||||
# left必须位于第一位,表示剩余的参数,可以更改内部属性中decay_mult和lr_mult, regex_expr不起作用
|
||||
- left:
|
||||
regex_expr: none
|
||||
decay_mult: 0
|
||||
lr_mult: 1
|
||||
- block:
|
||||
regex_expr: ^encoder\.stages\.[0-9]\.blocks.*$
|
||||
decay_mult: 0
|
||||
lr_mult: 1
|
||||
- norm:
|
||||
regex_expr: ^encoder\.stages\.[0-9]\.norm.*$
|
||||
decay_mult: 0
|
||||
lr_mult: 1
|
||||
- head:
|
||||
regex_expr: ^decoder.*$
|
||||
decay_mult: 1
|
||||
lr_mult: 10
|
12
config/predict.yaml
Normal file
12
config/predict.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
device: "cuda"
|
||||
|
||||
# -1表示从不加载任何权重就进行预测
|
||||
# 0表示使用官方提供的权重进行预测
|
||||
# 1表示使用自己的权重进行预测
|
||||
mode: 0
|
||||
checkpoint:
|
||||
- pretrained # 目录
|
||||
- segnext_tiny_512x512_ade_160k.pth # 文件名
|
||||
# 利用正则表达式将官方model中的权重加载到模型, mode != 0时失效
|
||||
regex_expr:
|
||||
- ^(?!decoder\.cls_seg.*)$ # ?!表示对()内的内容取反,详请见于model_utils.init_model
|
39
config/train.yaml
Normal file
39
config/train.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
device: cuda
|
||||
batch_size: 2
|
||||
image_height: 512
|
||||
image_width: 512
|
||||
workers: 0
|
||||
epochs: 10
|
||||
|
||||
# 每一类的占比权重,如果要让每一类的占比权重相同,为1.0即可
|
||||
weight:
|
||||
- 1.0
|
||||
|
||||
# 数据集存放位置
|
||||
root:
|
||||
- dataset
|
||||
train_dir_name:
|
||||
- train
|
||||
val_dir_name:
|
||||
- val
|
||||
images_dir_name: images
|
||||
labels_dir_name: labels
|
||||
|
||||
# 每训练多少个epoch就进行验证
|
||||
eval_every_n_epoch: 10
|
||||
|
||||
# 权重保存位置
|
||||
save_path:
|
||||
- pretrained # 目录
|
||||
- SegNeXt # 文件名
|
||||
|
||||
# -1表示从零开始训练网络,即不加载任何权重
|
||||
# 0表示使用官方提供的权重
|
||||
# 1表示使用自己的权重
|
||||
mode: 0
|
||||
checkpoint:
|
||||
- pretrained # 目录
|
||||
- segnext_tiny_512x512_ade_160k.pth # 文件名
|
||||
# 利用正则表达式将官方model中的权重加载到模型, mode != 0时失效
|
||||
regex_expr:
|
||||
- ^(?!decoder\.cls_seg.*)$ # ?!表示对()内的内容取反, 详请见于model_utils.init_model
|
Loading…
x
Reference in New Issue
Block a user