-
Notifications
You must be signed in to change notification settings - Fork 17
Description
How many epochs should the PH2 dataset be trained for? According to your split ratio, after training for 15,000 epochs, I did not achieve results consistent with the paper. Overall, the performance was much lower, especially for SE.I hope you can answer.Below is my YAML content: run:
device: 'cuda'
save_imgs: "saved_imgs"
writer_dir: "./runs/ph2" # tensorboard runs
continue_training: false # whether to continue the training from the last epoch it was saved
model:
save_dir: './checkpoints/ph2'
name: 'dsd_p01' # the model will save and load with this config associated with this name.
class: 'DermoSegDiff' # do not change this line unless you implement a new model inside models folder
params: # the class arguments defined above
dim_x: 128
dim_g: 64
channels_x: 1 # mask
channels_g: 3 # rgb-image
# init_dim: null
out_dim: 1
# dim_mults: [1, 2, 3, 4, 5, 6]
dim_x_mults: [1, 2, 3, 4, 5, 6]
dim_g_mults: [1, 2, 4, 8, 16, 32]
resnet_block_groups: 8
diffusion:
schedule:
timesteps: 250
mode: "linear" # options: [linear, quadratic, cosine, sigmoid]
beta_start: 0.0004
beta_end: 0.08
dataset:
input_size: 128
name: "ph2"
class_name: "PH2DatasetFast" # do not change it unless you implement a new. this class loads all files into ram at once to speed up data loading.
data_dir: "/root/autodl-tmp/DermoSegDiff-main/DermoSegDiff-main/data/PH2" # inside of this folder must exist and folders. Inside of this folder the required numpy files will create inside of folder.
number_classes: 2
img_channels: 3
msk_channels: 1
data_scale: "full"
data_loader:
train:
batch_size: 32
shuffle: true
# num_workers: 16
pin_memory: true
validation:
batch_size: 32
shuffle: false
# num_workers: 16
pin_memory: true
test:
batch_size: 32
shuffle: false
# num_workers: 16
pin_memory: false
training:
epochs: 15000
intial_weights:
use: false
file_path: "path/to/file"
loss: # you must use at least one of the following losses or you can also enable some of them to use a hybrid loss
# l1:
# cofficient: 0.0
# huber:
# cofficient: 0.0
l2:
cofficient: 1.0
boundary:
cofficient: 0.25
params:
gamma: 0.25
root: "l2" # the root is one of above losses name to calculate weighted boundary loss respectively
optimizer:
name: 'Adam' # options: ["Adam", "SGD", "AdamW"]
params:
lr: 0.0001
betas: [0.7, 0.99]
weight_decay: 0.0
scheduler: # lr_scheduler.ReduceLROnPlateau
factor: 0.5
patience: 10
# verbose: true
ema: # https://github.com/lucidrains/ema-pytorch
use: true
params:
beta: 0.9999
update_after_step: 500
update_every: 1
inv_gamma: 1.0 # inv_gamma (float): Inverse multiplicative factor of EMA warmup. Default: 1.
power: 0.9 # power (float): Exponential factor of EMA warmup. Default: 1.
testing:
ensemble: 9
model_weigths:
overload: true # change to if you want to test with the below checkpoint weights
file_path: "/root/autodl-tmp/DermoSegDiff-main/DermoSegDiff-main/checkpoints/ph2/n-dsd_p01_s-128_b-32_t-250_sc-linear_best.pth"
result_imgs:
save: true # whether to save the test images generated by model for post-processing
dir: "./saved_imgs/ph2/dsd_p01"
augmentation:
p: 0.5
levels:
pixel:
p: 1.0
transforms:
# FDA:
# reference_images: img_path_list # DO NOT CHANGE THIS LINE
# p: 0.05
CLAHE:
clip_limit: 4
tile_grid_size: [3,3]
p: 0.05
Emboss:
p: 0.05
GaussNoise:
var_limit: [10, 200]
p: 0.05
HueSaturationValue:
hue_shift_limit: 7
sat_shift_limit: 30
val_shift_limit: 20
p: 0.05
MultiplicativeNoise:
multiplier: [0.8, 1.25]
elementwise: true
p: 0.05
RGBShift:
p: 0.05
RandomBrightnessContrast:
p: 0.05
RandomGamma:
gamma_limit: [70, 130]
p: 0.05
RandomToneCurve:
scale: 0.15
p: 0.05
Sharpen:
p: 0.05
Spatter:
mean: 0
std: 60
gauss_sigma: 2
cutout_threshold: 5
intensity: -3
p: 0.05
UnsharpMask:
p: 0.05
spacial:
p: 1
transforms:
Affine:
p: 0.05
CoarseDropout:
min_holes: 1
max_holes: 5
min_height: 4
max_height: 16
min_width: 4
max_width: 16
fill_value: [10, 20, 60]
p: 0.05
ElasticTransform:
alpha: 0.5
sigma: 1.3
alpha_affine: 20
border_mode: 2
p: 0.05
HorizontalFlip:
p: 0.05
VerticalFlip:
p: 0.05
Flip:
p: 0.05
GridDistortion:
border_mode: 4
p: 0.05
PiecewiseAffine:
p: 0.05
PixelDropout:
p: 0.05
RandomRotate90:
p: 0.05
Rotate:
border_mode: 4
p: 0.05