Hi, I am trying to reproduce the results using the default settings, but the performance is too low.
Are there any special hyper-parameters to reproduce the results on the MoNuSeg dataset?
Also, I would like to know if there is any plan to release any pretrained model.
Thanks.
======>>>True, 0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir
================================= seed = 2022 =================================
2022-04-15 07:57 ***** Training starts *****
2022-04-15 07:57 save directory: ./experiments/MoNuSeg_oridata/0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir
2022-04-15 07:57
------------------------- Options -------------------------
dataset: MoNuSeg_oridata
isTrain: True
all_img_test: 1
momentum: 0.95
*************** model ***************
multi_class: True
in_c: 3
out_c: 3
direction: 1
n_layers: 6
growth_rate: 24
drop_rate: 0.1
compress_ratio: 0.5
is_hybrid: True
layer_type: basic
mean_std: mean_std
add_weightMap: 1
dice: 1
boundary_loss: 0
mseloss: 1
modelName: UNet2RevA1_vgg16
backbone: None
pretrained: 1
LossName: CE1_Dice1
exp_filename: 0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir
direction_classes: 9
*************** train ***************
branch: 5
num_epochs: 300
input_size: 256
batch_size: 8
val_overlap: 40
seed: 2022
early_stop: 0
scheduler: None
step: 5
lr: 0.001
lr_decay: 0.995
weight_decay: 0.0001
log_interval: 15
workers: 8
gpu: [0]
alpha: 0.0
optimizer: adam
validation: 0
checkpoint_freq: 100
start_epoch: 0
checkpoint:
trans_train: _noRRe_isRCo_isHF_noRA_isRE_noRRo_isRCr_isCAu_isLE_noNorm
data_dir: ./data/MoNuSeg_oridata
save_dir: ./experiments/MoNuSeg_oridata/0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir
weight_map_dir: ./data/MoNuSeg_oridata/weight_maps
img_dir: ./data/MoNuSeg_oridata/images
label_dir: ./data/MoNuSeg_oridata/labels
transform_string: _noRRe_isRCo_isHF_noRA_isRE_noRRo_isRCr_isCAu_isLE_noNorm
transform_str: _noRRe_isRCo_isHF_noRA_isRE_noRRo_isRCr_isCAu_isLE_noNorm
*************** transform ***************
train:
random_color: 1
horizontal_flip: True
vertical_flip: True
random_elastic: [6, 15]
random_chooseAug: 1
random_crop: 256
label_encoding: [3, 2, 1]
to_tensor: 1
val:
label_encoding: [3, 2, 1]
to_tensor: 1
-------------------------- End --------------------------
CrossEntropyLoss()
opt.train[trans_train] = _noRRe_isRCo_isHF_noRA_isRE_noRRo_isRCr_isCAu_isLE_noNorm
upsample_blocks[0] in: 512 out: 256
upsample_blocks[1] in: 256 out: 128
upsample_blocks[2] in: 128 out: 64
upsample_blocks[3] in: 64 out: 32
upsample_blocks[4] in: 32 out: 16
Scheduler None not available
====== Compose(_random_color_horizontal_flip_vertical_flip_random_elastic_random_chooseAug_random_crop_label_encoding_to_tensor), ====== each epoch work time is [0.0000 min].
====== Compose(_label_encoding_to_tensor), ====== each epoch work time is [0.0000 min].
dir_list = ['./data/MoNuSeg_oridata/images/train_300', './data/MoNuSeg_oridata/weight_maps/train_300', './data/MoNuSeg_oridata/labels/train_300']
post_fix = ['weight.png', 'label.png']
2022-04-15 07:58 =======================No validation=======================
2022-04-15 07:58 Epoch: [1/300]
2022-04-15 07:58 Iteration: [0/24] Loss 8.5217 loss_direction_CE 2.7267 loss_direction_dice 1.0622 loss_mse 0.8598 Loss_CE 1.6661 Loss_var -1.0000 Pixel_Accu 0.8939
pixel_IoU 0.0159 pixel_Recall 0.0587 pixel_Precision 0.0228 pixel_F1 0.0310
2022-04-15 07:58 Iteration: [15/24] Loss 6.3783 loss_direction_CE 1.7026 loss_direction_dice 1.0091 loss_mse 0.6421 Loss_CE 1.1705 Loss_var -1.0000 Pixel_Accu 0.9321
pixel_IoU 0.0132 pixel_Recall 0.0461 pixel_Precision 0.0403 pixel_F1 0.0252
2022-04-15 07:58 => Train Avg: Loss 5.9872 loss_direction_CE 1.5172 loss_direction_dice 1.0017 loss_mse 0.6094 Loss_CE 1.0626 Loss_var -1.0000 Pixel_Accu 0.9472
pixel_IoU 0.0096 pixel_Recall 0.0316 pixel_Precision 0.0530 pixel_F1 0.0184
======= train() ======== each epoch work time is [18.0887 s].
======= validate() ======== each epoch work time is [0.0001 s].
.
.
.
2022-04-15 09:30 Epoch: [300/300]
2022-04-15 09:30 Iteration: [0/24] Loss 3.6795 loss_direction_CE 0.7567 loss_direction_dice 0.9106 loss_mse 0.3836 Loss_CE 0.7377 Loss_var -1.0000 Pixel_Accu 0.9829
pixel_IoU 0.3683 pixel_Recall 0.4962 pixel_Precision 0.5779 pixel_F1 0.5307
2022-04-15 09:30 Iteration: [15/24] Loss 3.5008 loss_direction_CE 0.7322 loss_direction_dice 0.8279 loss_mse 0.3279 Loss_CE 0.6730 Loss_var -1.0000 Pixel_Accu 0.9788
pixel_IoU 0.3732 pixel_Recall 0.5125 pixel_Precision 0.5754 pixel_F1 0.5371
2022-04-15 09:30 => Train Avg: Loss 3.5091 loss_direction_CE 0.7307 loss_direction_dice 0.8309 loss_mse 0.3267 Loss_CE 0.6702 Loss_var -1.0000 Pixel_Accu 0.9788
pixel_IoU 0.3695 pixel_Recall 0.5104 pixel_Precision 0.5715 pixel_F1 0.5328
epoch = 299, cp_flag = 1
2022-04-15 09:30 This model is: [UNet2RevA1_vgg16]. add_weightMap = 1. The time spent is [92.482 min].
------------------------- Options -------------------------
dataset: MoNuSeg_oridata
isTrain: False
all_img_test: 1
momentum: 0.95
*************** model ***************
multi_class: True
in_c: 3
out_c: 3
direction: 1
n_layers: 6
growth_rate: 24
drop_rate: 0.1
compress_ratio: 0.5
is_hybrid: True
layer_type: basic
mean_std: mean_std
add_weightMap: 1
dice: 1
boundary_loss: 0
mseloss: 1
modelName: UNet2RevA1_vgg16
backbone: None
pretrained: 1
LossName: CE1_Dice1
exp_filename: 0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir
direction_classes: 9
transform_string: ['random_color', 'random_chooseAug', 'horizontal_flip', 'random_elastic', 'random_crop', 'label_encoding', 'to_tensor']
transform_str: _noRRe_isRCo_isHF_noRA_isRE_noRRo_isRCr_isCAu_isLE_noNorm
*************** transform ***************
test:
to_tensor: 1
normalize: [[0.68861804 0.46102882 0.61138992],
[0.19204499 0.20979484 0.1658672 ]]
*************** post ***************
postproc: 0
min_area: 20
radius: 2
*************** test ***************
filename: test1
epoch: best
gpu: [0]
branch: 5
groundtruth: 0
img_dir: ./data/MoNuSeg_oridata/images/test1
label_dir: ./data/MoNuSeg_oridata/labels/test1
annotation_dir: ./data/MoNuSeg_oridata/Annotations
weight_map_dir: ./data/MoNuSeg_oridata/weight_maps
tta: True
save_flag: True
patch_size: 256
overlap: 40
savefilename: br5_test1_gt0_post0_best_minarea20_ra2
save_dir: ./experiments/MoNuSeg_oridata/0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir/br5_test1_gt0_AIT1_post0_best_minarea20_ra2
model_path: ./experiments/MoNuSeg_oridata/0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir/checkpoints/checkpoint_best.pth.tar
model_branch_path: ./experiments/MoNuSeg_oridata/0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir/checkpoints/checkpointBranch_best.pth.tar
model_branch_path2: ./experiments/MoNuSeg_oridata/0_UNet2RevA1_vgg16[None][adam]_sche[None]_3c_input256over40bs8_e300_MSE_addDir/checkpoints/checkpointBranch2_best.pth.tar
save_testfilename: br5_test1_gt0_AIT1_post0_best_minarea20_ra2
-------------------------- End --------------------------
====== Compose(_to_tensor_normalize), ====== each epoch work time is [0.0000 min].
MoNuSeg_oridata_logExl.csv have been exist.
upsample_blocks[0] in: 512 out: 256
upsample_blocks[1] in: 256 out: 128
upsample_blocks[2] in: 128 out: 64
upsample_blocks[3] in: 64 out: 32
upsample_blocks[4] in: 32 out: 16
=> loading trained model
=> loaded model at epoch 245
=> Test begins:
img_names changes => : ['TCGA-21-5784-01Z-00-DX1.png', 'TCGA-21-5786-01Z-00-DX1.png', 'TCGA-B0-5698-01Z-00-DX1.png', 'TCGA-B0-5710-01Z-00-DX1.png', 'TCGA-CH-5767-01Z-00-DX1.png', 'TCGA-E2-A14V-01Z-00-DX1.png', 'TCGA-E2-A1B5-01Z-00-DX1.png', 'TCGA-G9-6362-01Z-00-DX1.png']
=> Processing image TCGA-21-5784-01Z-00-DX1.png
label_img_instance.len = 399
Computing output probability maps...
===> Processed all 0 images, ===> The every test time spent is [2.00 s]
Computing metrics...
Ns == 22, Ng == 398
Count = 14.0
[ana_FP = 0.0001, ana_FN = 0.0388, ana_less = 0.9553, ana_more = 0.0058]
image TCGA-21-5784-01Z-00-DX1.png, the pixel_iou = 0.0096, pixel_recall = 0.0097, pixel_precision = 0.6215, pixel_F1 = 0.0191
(0.035175879396976084, 0.6363636363607439, 0.06666666666665079, 0.42350635464529324, 0.294697861901088, 15.708433531593744, 0.00964156489459278), result_AJI = 0.00964156489459278, result_Dice = 0.01909898567933733, result_Dice2 = 0, dq_value = 0.009523809523809525, sq_value = 0.6711873476907836, pq_value = 0.006392260454197939
Saving image results...
pred_labeled color number = 23
=> Processing image TCGA-21-5786-01Z-00-DX1.png
label_img_instance.len = 441
Computing output probability maps...
===> Processed all 1 images, ===> The every test time spent is [0.15 s]
Computing metrics...
Ns == 137, Ng == 440
Count = 104.0
[ana_FP = 0.0030, ana_FN = 0.2583, ana_less = 0.7284, ana_more = 0.0103]
image TCGA-21-5786-01Z-00-DX1.png, the pixel_iou = 0.0591, pixel_recall = 0.0592, pixel_precision = 0.9772, pixel_F1 = 0.1116
(0.23636363636358265, 0.7591240875906868, 0.3604852686307867, 0.29449895800721115, 0.18495710548718708, 20.72356024523777, 0.048276896763836584), result_AJI = 0.04956267347685077, result_Dice = 0.11157164366230242, result_Dice2 = 0, dq_value = 0.01386481802426343, sq_value = 0.618584259587985, pq_value = 0.008576558191861143
Saving image results...
pred_labeled color number = 138
=> Processing image TCGA-B0-5698-01Z-00-DX1.png
label_img_instance.len = 358
Computing output probability maps...
===> Processed all 2 images, ===> The every test time spent is [0.15 s]
Computing metrics...
Ns == 7, Ng == 357
Count = 4.0
[ana_FP = 0.0007, ana_FN = 0.0126, ana_less = 0.9852, ana_more = 0.0016]
image TCGA-B0-5698-01Z-00-DX1.png, the pixel_iou = 0.0016, pixel_recall = 0.0016, pixel_precision = 0.4144, pixel_F1 = 0.0032
(0.011204481792713949, 0.5714285714204081, 0.02197802197801594, 0.21051631359475842, 0.12370657595857719, 23.66638498771461, 0.001588895125016798), result_AJI = 0.001588895125016798, result_Dice = 0.0031727490844803636, result_Dice2 = 0, dq_value = 0.0, sq_value = 0.0, pq_value = 0.0
Saving image results...
pred_labeled color number = 8
=> Processing image TCGA-B0-5710-01Z-00-DX1.png
label_img_instance.len = 360
Computing output probability maps...
===> Processed all 3 images, ===> The every test time spent is [0.15 s]
Computing metrics...
Ns == 64, Ng == 359
Count = 46.0
[ana_FP = 0.0039, ana_FN = 0.0796, ana_less = 0.9014, ana_more = 0.0151]
image TCGA-B0-5710-01Z-00-DX1.png, the pixel_iou = 0.0428, pixel_recall = 0.0436, pixel_precision = 0.7100, pixel_F1 = 0.0821
(0.12813370473534036, 0.7187499999988769, 0.21749408983446394, 0.5330615112466484, 0.3909037328718037, 9.797606772605755, 0.0421813327620162), result_AJI = 0.04276215508078669, result_Dice = 0.08207090673329327, result_Dice2 = 0, dq_value = 0.05673758865248227, sq_value = 0.6768533029673144, pq_value = 0.03840302428183344
Saving image results...
pred_labeled color number = 65
=> Processing image TCGA-CH-5767-01Z-00-DX1.png
label_img_instance.len = 295
Computing output probability maps...
===> Processed all 4 images, ===> The every test time spent is [0.16 s]
Computing metrics...
Ns == 303, Ng == 295
Count = 192.0
[ana_FP = 0.0181, ana_FN = 0.5555, ana_less = 0.3515, ana_more = 0.0750]
image TCGA-CH-5767-01Z-00-DX1.png, the pixel_iou = 0.2439, pixel_recall = 0.2543, pixel_precision = 0.8565, pixel_F1 = 0.3922
(0.650847457626898, 0.6336633663364245, 0.6421404682273173, 0.4510931922447862, 0.3255492017367811, 14.887090364552593, 0.20432282594444756), result_AJI = 0.20663469037955884, result_Dice = 0.3922006220839813, result_Dice2 = 0, dq_value = 0.18394648829431437, sq_value = 0.630962549086058, pq_value = 0.11606334514960932
Saving image results...
pred_labeled color number = 304
=> Processing image TCGA-E2-A14V-01Z-00-DX1.png
label_img_instance.len = 379
Computing output probability maps...
===> Processed all 5 images, ===> The every test time spent is [0.14 s]
Computing metrics...
Ns == 320, Ng == 378
Count = 169.0
[ana_FP = 0.1326, ana_FN = 0.4191, ana_less = 0.3098, ana_more = 0.1384]
image TCGA-E2-A14V-01Z-00-DX1.png, the pixel_iou = 0.4439, pixel_recall = 0.4814, pixel_precision = 0.8507, pixel_F1 = 0.6149
(0.44708994708982885, 0.528124999999835, 0.4842406876790137, 0.6254490587294964, 0.49236794632726577, 13.625374921253902, 0.33986179928309423), result_AJI = 0.3461042482675505, result_Dice = 0.6149068322981367, result_Dice2 = 0, dq_value = 0.2521489971346705, sq_value = 0.6842801543181587, pq_value = 0.17254055467048127
Saving image results...
pred_labeled color number = 321
=> Processing image TCGA-E2-A1B5-01Z-00-DX1.png
label_img_instance.len = 330
Computing output probability maps...
===> Processed all 6 images, ===> The every test time spent is [0.15 s]
Computing metrics...
Ns == 353, Ng == 329
Count = 271.0
[ana_FP = 0.1934, ana_FN = 0.5260, ana_less = 0.0864, ana_more = 0.1942]
image TCGA-E2-A1B5-01Z-00-DX1.png, the pixel_iou = 0.5173, pixel_recall = 0.6078, pixel_precision = 0.7764, pixel_F1 = 0.6818
(0.8237082066866798, 0.7677053824360431, 0.7947214076245168, 0.6852851280441974, 0.5602336428794454, 8.406038574890323, 0.4476577529206426), result_AJI = 0.4649849842381133, result_Dice = 0.6818385827811073, result_Dice2 = 0, dq_value = 0.5219941348973607, sq_value = 0.7106749201016873, pq_value = 0.3709681401117312
Saving image results...
pred_labeled color number = 354
=> Processing image TCGA-G9-6362-01Z-00-DX1.png
label_img_instance.len = 473
Computing output probability maps...
===> Processed all 7 images, ===> The every test time spent is [0.16 s]
Computing metrics...
Ns == 481, Ng == 472
Count = 333.0
[ana_FP = 0.0343, ana_FN = 0.5654, ana_less = 0.3106, ana_more = 0.0898]
image TCGA-G9-6362-01Z-00-DX1.png, the pixel_iou = 0.3747, pixel_recall = 0.3960, pixel_precision = 0.8745, pixel_F1 = 0.5452
(0.7055084745761218, 0.6923076923075484, 0.6988457502622561, 0.6036795700795706, 0.46884170695346195, 11.052712051937652, 0.33817976219031626), result_AJI = 0.3402095310317029, result_Dice = 0.5451589031063631, result_Dice2 = 0, dq_value = 0.3378803777544596, sq_value = 0.666468963341415, pq_value = 0.22518678509542042
Saving image results...
pred_labeled color number = 482
scale_size_notmatch = []
===> Processed all 8 images, ===> The time spent is [2.01 min]
Average of all images:
pixel_accu: 0.8475 pixel_IoU 0.2116 pixel_Recall 0.2317 pixel_Precision 0.7602 pixel_F1 0.3063
recall: 0.3798 precision: 0.6634 F1: 0.4108 dice: 0.4784 iou: 0.3552 haus: 14.7334
AJI_sklearn: 0.1323
AJI: 0.1790 hover_AJI: 0.1827 hover_Dice: 0.3063
result_Dice2: 0.0000, dq_value: 0.1720, sq_value: 0.5824, pq_value: 0.1173 analysis_FP: 0.0482, analysis_FN: 0.3069, analysis_pred_less: 0.5786, analysis_pred_more: 0.0663