# [2nd Public/90th Private] Solution for the SenNet + HOA - Hacking the Human Vasculature in 3D

After being heartbroken for 48 hours, I finally recovered. I decided to share my method, which might help solve some of  friends' doubts.
First of all, I want to thank my good brother, who spent more than 1,000 rmb calling a sexy beauty to give me a massage and relax, which made me realize that there are still such wonderful things in this world besides competition.
At the same time, I would like to thank
[@yoyobar](https://www.kaggle.com/yoyobar)
for providing the training and inference notebooks. All my experiments are based on these two notebooks.
I also want to thank
[@hengck23](https://www.kaggle.com/hengck23)
,
[@lihaoweicvch](https://www.kaggle.com/lihaoweicvch)
and others who provided such detailed experimental details early in the competition, which reduced many difficulties I had in the initial stage of the experiments
Training Strategy:
High probability strong data augmentation - mixup  pre-training for over 300 epochs, using kidney1 and kidney3 both dense and sparse datasets.
Low probability data augmentation - mixup - EMA fine-tuning on kidney1 and kidney3 in dense datasets, with kidney2 dataset for validation.
Validation metric uses average dice score from thresholds in (0.1, 0.2 … 0.9) range.
Loss function is simple dice loss.
Training resolution is 1024x1024.
Silde-window inference with 5 TTA + 50um resolution inference for public test, 5 TTA + 50um and 60um resolution inference for private test, using F.interpolate(…, scale=0.8)
Threshold selection: 1. Based on fixed value, 2. Based on percentile, 3. Based on Otsu adaptive thresholding.
Model Choices:
Model
Public Score
Private Score
Thresholding Strategy
Notes
se-resnext50-unet
0.891
0.546
Percentile
Local receptive field
se-resnext50-unet
0.363
0.553
Otsu
-
gcnet50-unet
0.881
0.458
Percentile
Global receptive field
gcnet50-unet
0.857
0.435
Otsu
-
2.5d-hrnet-w32-unet
0.868
0.546
Percentile
Excellent detail recovery ability
effiecientnet-b3-unet
0.878
0.517
Percentile
Excellent inference speed
se-resnext50-unet+gcnet50-unet
0.857
0.576
0.16
-
se-resnext50-unet+gcnet50-unet
0.895
0.542
Percentile
-
se-resnext50-unet+gcnet50-unet
0.883
0.518
Otsu
-
se-resnext50-unet+gcnet50-unet+effiecientnet-b3-unet
0.886
0.544
Percentile
-
se-resnext50-unet+gcnet50-unet+effiecientnet-b3-unet-2scale
-
0.589
0.1
-
se-resnext50-unet+gcnet50-unet+effiecientnet-b3-unet-2scale
-
0.452
Percentile
-
All the experiments, the results in private are not very ideal, perhaps due to the thresholds, or it could be due to other reasons
Additionally, since I cannot confirm whether private is the result of downsampling an entire kidney or a subset of a kidney, I did not spend too much time on it in the 2.5d method.
At the same time, in the 2-scale inference, some weights were fine-tuned at a 60um resolution, but there was actually no significant improvement.
Reasons for Failure:
Threshold selection:
In my models, lower thresholds achieved better private scores, which contradicted my early idea that "higher thresholds could better reduce false positives and improve the private results". Additionally, the threshold selection method based on proportion carries too much risk. Choosing a fixed threshold is a more stable approach.
Validation metric:
Since kidney2 was sparsely annotated, I chose average dice as the validation metric. And I found that at different thresholds, a higher dice with smaller dice variance usually did not result in a poor public score, but this is not a positive correlation, which may have introduced a potential risk of overfitting.
Data augmentation:
I gradually added many data augmentations, assuming that if the validation metric did not decrease after adding augmentations, the model's generalization ability would be improved to some extent. The final result told me that one or more augmentation methods, such as mixup, might have affected the private score.
Nevertheless, this competition has ended. Congratulations to all the winners who have achieved such great results, and also to all the friends who have given their best in this competition but did not achieve good scores whose algorithm skills must have improved significantly.
Here are some notebooks I used for inference (ugly code, no time to clean it up for now due to the Chinese New Year is coming). The related code and weights have been set to public. If anyone is interested, feel free to refer to them.
[https://www.kaggle.com/code/tanxxx/inference-se-tugc](url)
[https://www.kaggle.com/code/tanxxx/2d-tu-gcresnext50ts-inference](url)
[https://www.kaggle.com/code/tanxxx/se-resnext-inference-1024](url)
[https://www.kaggle.com/code/tanxxx/tu-hrnet-w30-and-effb3-inference](url)