Skip to content

tahsin314/Melanoma_Classification_2020

Repository files navigation

SIIM-ISIC Melanoma Classification 2020

My scripts for the SIIM-ISIC Melanoma Classification challenge 2020. We achieved 259th position on the leaderboard and a bronze medal. Thanks a lot to Mohammad Innat and Uday Kamal for their contributions. Please check out Innat's elaborate well-written solution here.

Papers

Features

  • ☑ Meta Features

  • ☑ Balanced Sampler

  • ☑ Mixed Precision

  • ☑ Gradient Accumulation

  • ☑ Model freeze-unfreeze

  • ☑ Optimum Learning Rate Finder

  • ☑ ArcFace Loss

  • ☑ TTA

Resources

Can be useful

How to run

  • Run git clone https://github.com/tahsin314/Melanoma_Classification_2020
  • Download this dataset and extract the zip file.
  • In the config.py file change the data_dir variable to your data directory name.
  • Run conda env create -f environment.yml
  • Activate the newly created conda environment.
  • Download Hair Images from here and put it into the augmentations/images/ directory.
  • Run train.py. Change parameters according to your preferences from the config.py file before training.

One important thing about EfficientNet

EfficientNet's are designed to take in to account input image dimensions.

So if you want to squeeze every last droplet from your model make sure to use same image resolutions as described below:

Efficientnet-B0 : 224
Efficientnet-B1 : 240
Efficientnet-B2 : 260
Efficientnet-B3 : 300
Efficientnet-B4 : 380
Efficientnet-B5 : 456
Efficientnet-B6 : 528
Efficientnet-B7 : 600

What worked for me:

  • Focal loss
  • Meta Data (I removed it in the final version to avoid overfitting)
  • Hair Augmentation
  • EfficientNet
  • Resnest (Converges faster than EfficientNet)
  • Higher Image Dimensions
  • Progressive Resizing (It might have improved my score but I'm not so sure.)
  • Class Balanced Training
  • Visual Attention
  • TTA (ShiftScaleRotate, RandomSizedCrop, HueSaturationValue, HorizontalFlip, VerticalFlip)

What did not work for me:

  • Metric Loss (Converges Faster but unstable)
  • Microscope Augmentation
  • EfficientNet with Arcface
  • Freeze-Unfreeze Technique
  • Cutmix and Mixup (Does not improve score but helps prevent overfitting)

My Final Model

My final model was a combination of Fast Resnest embedded with visual attention combined with Efficientnet-B4.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages