train baseline hovernet

train baseline hovernet  

  By: dzchallenge on Jan. 21, 2022, 5:31 p.m.

Hi, Im trying to train the hovernet model from scratch on lizard dataset, patches of size 256x256, as a baseline for the challenge, without changing any hyperparameter, the same environment and library versions, here is a screenshot of my training result (from 01 folder, phase 2, epoch 50):

[32mtrain-loss_tp_bce �[0m : 0.24518 [32mtrain-loss_tp_dice�[0m : 2.02948 [32mtrain-loss_np_bce �[0m : 0.14096 [32mtrain-loss_np_dice�[0m : 0.22427 [32mtrain-loss_hv_mse �[0m : 0.02250 [32mtrain-loss_hv_msge�[0m : 0.33003 [32mtrain-overall_loss�[0m : 2.99242 [32mtrain-lr-net �[0m : 0.00001

[32minfer-valid-np_acc �[0m : 0.95440 [32minfer-valid-np_dice �[0m : 0.84733 [32minfer-valid-tp_dice_0�[0m : 0.97061 [32minfer-valid-tp_dice_1�[0m : 0.31560 [32minfer-valid-tp_dice_2�[0m : 0.81184 [32minfer-valid-tp_dice_3�[0m : 0.77906 [32minfer-valid-tp_dice_4�[0m : 0.57733 [32minfer-valid-tp_dice_5�[0m : 0.42900 [32minfer-valid-tp_dice_6�[0m : 0.71767 [32minfer-valid-hv_mse �[0m : 0.03839

I tried to infer the model using inference script of the challenge repo, , which leads to this error : "RuntimeError: Error(s) in loading state_dict for HoVerNetConic: Missing key(s) in state_dict:"

I tried to set the "model.load_state_dict(pretrained, strict=False)", and I got all "zero" predictions,

and when using "" of hovernet repo, seems that the tile script doesn't work (can I use the tile mode to infer on 256x256 patches?) Im got the error "to check the usage of options and commands"

Im asking for any hints regarding inferencing the model.

Re: train baseline hovernet  

  By: simongraham73 on Jan. 22, 2022, 12:16 a.m.

I see that you made an issue on the original HoVer-Net repo [link]. Here, it looks like you trained the pytorch version using the master branch? If you plan to use the trained model in the baseline notebook, the. you need to use the conic branch - see here.

You can still use the original HoVer-Net repo if you wish, but we created the conic branch for convenience. If using the master branch, then you will process the patches in the same way as instructed in the original repo and you will have to separately calculate the stats. Note, in the original repo, the output size is smaller than the input size due to valid convolution being used in the decoder. In the conic branch we use padded convolution so that the output size is the same as the input size (256x256).

 Last edited by: simongraham73 on Aug. 15, 2023, 12:55 p.m., edited 4 times in total.

Re: train baseline hovernet  

  By: dangvuquoc1993 on Jan. 22, 2022, 12:53 p.m.

I am closing this topic so that we do not spread our messages everywhere and make it easier to track. I have answered your problems on the github issue. From your reply here, It is cleart that the weights were not retrieved and loaded correctly. Please copy your OP message over to the github thread.

 Last edited by: dangvuquoc1993 on Aug. 15, 2023, 12:55 p.m., edited 1 time in total.