humpback-whale-identification

Kaggle Humpback whale identification: 2xGPU Data augmentation + FP16 mixed precision training

Stars
13

Humpback whale identification

The challenge if you choose to accept it, within Happywhale database of 25000 images of whale flukes, identify the 3000+ whales that appear 1, 2 or 3 times.

For example here are 2 different images with the same whale

And here is a sample of 10 whale's flukes we had to work with

What you will find here

Disclaimer, the code is a baseline setup code with a low mAP@5 score of 0.30.

This is an example of how to use Nvidia DALI for pure GPU data augmentation and Nvidia APEx for multi-precision training (FP16+FP32) on a 2x2080Ti setup with PyTorch DataParallel. (Note: Nvidia deprecated the APEx API I was using, replacement is straightforward)

Versions (version.release.commithash):

  • PyTorch - v1.0rc0.r2098.gded4ff87af
  • Nvidia DALI - v0.7.0.dev.r64.gd2bcc4a8
  • Nvidia APEx - r226.3c7a0e4

For Archlinux users, PKGBUILDs of my data science environment are available in my Data Science repo.

This setup avoids being bottlenecked on CPU data augmentation in many cases when using "simple" networks like ResNet50.

Furthermore, you will find an pure PyTorch to FastAI and Leslie Smith super-convergence and learning rate finder. FastAI is a tremendous effort to make deep learning best practice at your fingertips, however you lose some flexibility on models, logging and other utilities that would be useful in a competitive or production setup.

Lastly but not least, you will find several papers on identification tasks (commonly called Re-Id) which goes into deep details into various techniques for similarity learning like Siamese networks, Triplet Loss, re-identification networks, figure-of-merit learning.

Bonus: I'm pretty confident I've implemented the fastest mAP@5 function in Python + Deep Learning library.

Papers

Neural Network Architectures

Loss function and optimizing directly for mAP

Learning rate and super-convergence

Related Projects