Giter Site home page Giter Site logo

melanoma_classification_2020's Introduction

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.

melanoma_classification_2020's People

Contributors

tahsin314 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.