{
  "id": 335726,
  "title": "Image Classification Checklist",
  "url": "/competitions/mayo-clinic-strip-ai/discussion/335726",
  "author_name": "The Devastator",
  "post_date": "2022-07-07T14:55:46.014000",
  "votes": 107,
  "comment_count": 14,
  "views": 0,
  "content": "<h1>Image Classification Checklist</h1>\n<hr>\n<p>This is a checklist/ cheat-sheet to help you structure your image classification pipeline.<br>\nIt is mainly a collection of links to kaggle topics / notebooks and some academic papers that helped in the past to solve image classification problems.</p>\n<h3>Data</h3>\n<h3>Image pre-processing + EDA</h3>\n<p>Before we get to building our model, we should do some exploratory data analysis and pre-processing tasks.<br>\nTo do this, look at the dataset and determine what pre-processing can be applied in order to improve the model.</p>\n<p><strong>Things to do:</strong></p>\n<ul>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-\" target=\"_blank\">Visualisation</a></li>\n<li><a href=\"/blog/how-to-deal-with-imbalanced-classification-and-regression-data\" target=\"_blank\">Dealing with Class imbalance</a></li>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Fill missing values (labels, features and, etc.)</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Normalisation</a></li>\n<li><a href=\"https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&amp;-Ben's-Preprocessing\" target=\"_blank\">Pre-processing</a></li>\n</ul>\n<h3>Model</h3>\n<h5>Baseline</h5>\n<p>The first step is to define a baseline network, we can use a pretrained network to develop a baseline. <br>\nThen we can compare the baseline results with the newly developed network and iterate to improve the latter one.</p>\n<p><strong>Ideas to try to improve our baseline</strong></p>\n<ul>\n<li>Adding more layers</li>\n<li>Using the different backbone</li>\n<li>Different learning rate</li>\n<li>Dropout, Batchnorm, weight_decay</li>\n<li>etc.</li>\n</ul>\n<h5>Backbones</h5>\n<p><strong>Basic Architectures</strong></p>\n<ul>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Residual Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1605.07146\" target=\"_blank\">Wide Residual Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Inception</a></li>\n<li><a href=\"https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr\" target=\"_blank\">Residual Attention Network</a></li>\n</ul>\n<p><strong>Modern Powerful Architectures</strong></p>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/1905.11946.pdf\" target=\"_blank\">EfficientNet</a> | <a href=\"https://www.kaggle.com/code/nroman/melanoma-pytorch-starter-efficientnet\" target=\"_blank\">Notebook</a></li>\n<li><a href=\"https://arxiv.org/abs/2010.11929\" target=\"_blank\">Vision Transformer (ViT)</a> | <a href=\"https://www.kaggle.com/code/abhinand05/vision-transformer-vit-tutorial-baseline\" target=\"_blank\">Notebook</a></li>\n<li><a href=\"https://arxiv.org/abs/2103.14030v2\" target=\"_blank\">Swin Transformer</a> | <a href=\"https://www.kaggle.com/code/debarshichanda/pytorch-hybrid-swin-transformer-cnn\" target=\"_blank\">Notebook</a></li>\n</ul>\n<h5>Training Schemes</h5>\n<p>During the training process, we can try to apply different techniques to improve the model's performance or our pipeline speed.</p>\n<ul>\n<li><a href=\"https://arxiv.org/abs/1710.03740\" target=\"_blank\">Mixed-Precision Training</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Large Batch-Size Training</a></li>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Cross-Validation Set</a></li>\n<li><a href=\"https://towardsdatascience.com/weight-initialization-in-neural-networks-a-journey-from-the-basics-to-kaiming-954fb9b47c79\" target=\"_blank\">Weight Initialization</a></li>\n<li><a href=\"https://arxiv.org/pdf/1911.04252.pdf\" target=\"_blank\">Self-Supervised Training (Knowledge Distillation)</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Learning Rate Scheduler</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Learning Rate Warmup</a></li>\n<li><a href=\"https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020\" target=\"_blank\">Early Stopping</a></li>\n<li><a href=\"https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification\" target=\"_blank\">Differential Learning Rates</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Ensemble</a></li>\n<li><a href=\"https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification\" target=\"_blank\">Transfer Learning</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Fine-Tuning</a></li>\n</ul>\n<h5>Regularization</h5>\n<p>Some regularization tricks we can try:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Adding Dropout</a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Adding or changing the position of Batch Norm</a></li>\n<li><a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\" target=\"_blank\">Data augmentation</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.09412\" target=\"_blank\">Mixup</a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Weight regularization</a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Gradient clipping</a></li>\n</ul>\n<h3>Loss function</h3>\n<p>Some tricks and methods we can try to improve our loss functions are: </p>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/1906.02629.pdf\" target=\"_blank\">Label smoothing</a></li>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">Focal loss</a></li>\n<li><a href=\"https://arxiv.org/pdf/2009.13935.pdf\" target=\"_blank\">SparseMax loss and Weighted cross-entropy</a></li>\n<li><a href=\"https://gombru.github.io/2018/05/23/cross_entropy_loss/\" target=\"_blank\">BCE loss, BCE with logits loss and Categorical cross-entropy loss</a></li>\n<li><a href=\"https://arxiv.org/abs/1801.07698\" target=\"_blank\">Additive Angular Margin Loss for Deep Face Recognition</a></li>\n</ul>\n<h5>Training Time Augmentation</h5>\n<p>Data augmentation is more crucial in Image classification problems than any other task. It helps us to increase the network performance and overfitting.</p>\n<p><strong>Example of Basic DataAugmentation Techniques</strong></p>\n<ul>\n<li>Flip H/V</li>\n<li>Random Rotate</li>\n<li>Random Zoom</li>\n<li>Cropping Image</li>\n<li>Random Brightness</li>\n</ul>\n<p><strong>Simple More Baseline Augmentations:</strong></p>\n<ul>\n<li>Random Fog</li>\n<li>Random Brightness/Contrast or Both</li>\n<li>Random Crop</li>\n<li>Random Gamma</li>\n<li>RGBShift</li>\n<li>HorizontalFlip/VerticalFlip</li>\n<li>Random Contrast</li>\n<li>Blur and its varients</li>\n<li>Affine</li>\n<li>Channel Dropout</li>\n<li>Inverting Image</li>\n<li>Noise and its varients</li>\n<li>…</li>\n</ul>\n<p><strong>And Some Examples</strong></p>\n<ul>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Horizontal Flip</a></li>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">Random Rotate and Random Dihedral</a></li>\n<li><a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\" target=\"_blank\">Hue, Saturation, Contrast, Brightness, Crop</a></li>\n<li><a href=\"https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet\" target=\"_blank\">Colour jitter</a></li>\n</ul>\n<h5>Test Time Augmentation</h5>\n<p>We can also use augmentations while predicting. Not only when training.<br>\nThis makes our model's predictions more robust since each of our final predictions will now be composed of multiple predictions, each with its unique perturbation.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">Test Time Augmentation (TTA)</a></li>\n</ul>\n<blockquote>\n  <p>This is the closest you get to \"free score\". If you got the compute time/power to do this: This nearly always works.</p>\n</blockquote>\n<h3>Hyperparameter tuning</h3>\n<p>Once we have a solid pipeline we are happy with, we can optimize its hyperparameters so we can push its performance to be even better. Tuning hyperparameters is often a very time-consuming process and should be done in a step-by-step manner.</p>\n<blockquote>\n  <p>Full post on this coming soon. In the meantime, you can start with <a href=\"https://optuna.org/\" target=\"_blank\">optuna</a></p>\n</blockquote>\n<h3>Error Analysis</h3>\n<p>Now we got a pipeline. It is \"OK\"-ish.. Now what? <br>\nIn order to fix the cases where it is wrong, we should check what are the causes for errors. <br>\nWhich cases are causing our model to make mistakes. <br>\nThis technique is called <strong>error analysis</strong>. Here are some links to start from:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Tracking metrics and Confusion matrix</a></li>\n<li><a href=\"https://arxiv.org/pdf/1610.02391v1.pdf\" target=\"_blank\">Grad CAM</a></li>\n</ul>\n<h3>Some more references to check</h3>\n<h6>Main Resource:</h6>\n<p><strong>Credits:</strong> Many of the links &amp; Materials are from <a href=\"https://neptune.ai/blog/image-classification-tips-and-tricks-from-13-kaggle-competitions\" target=\"_blank\">here</a>.</p>\n<h6>Papers:</h6>\n<ul>\n<li><a href=\"https://arxiv.org/abs/1605.07146\" target=\"_blank\">Wide Residual Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.09412\" target=\"_blank\">mixup: BEYOND EMPIRICAL RISK MINIMIZATION</a></li>\n<li><a href=\"https://arxiv.org/abs/1801.07698\" target=\"_blank\">ArcFace: Additive Angular Margin Loss for Deep Face Recognition</a></li>\n<li><a href=\"https://arxiv.org/abs/1905.11946\" target=\"_blank\">EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.05941\" target=\"_blank\">Searching for Activation Functions</a></li>\n<li><a href=\"https://arxiv.org/abs/1704.06904\" target=\"_blank\">Residual Attention Network for Image Classification</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.03740\" target=\"_blank\">Mixed Precision Training</a></li>\n<li><a href=\"https://arxiv.org/pdf/1911.04252.pdf\" target=\"_blank\">Self-training with Noisy Student improves ImageNet classification</a></li>\n<li><a href=\"https://arxiv.org/abs/1906.02629\" target=\"_blank\">When Does Label Smoothing Help?</a></li>\n<li><a href=\"https://arxiv.org/abs/1801.07698\" target=\"_blank\">Additive Angular Margin Loss for Deep Face Recognition</a></li>\n<li><a href=\"https://arxiv.org/pdf/1610.02391v1.pdf\" target=\"_blank\">Grad-CAM: Why did you say that? Visual Explanations from Deep Networks…</a></li>\n<li><a href=\"https://arxiv.org/abs/2009.13935\" target=\"_blank\">A Comparative Study of Deep Learning Loss Functions for Multi-Label Remote Sensing Image Classification</a></li>\n</ul>\n<h6>Blogs:</h6>\n<ul>\n<li><a href=\"https://medium.com/@prince.canuma/wide-residual-nets-why-deeper-isnt-always-better-f2a02947dca3\" target=\"_blank\">Wide Residual Nets: “Why deeper isn’t always better…”</a></li>\n<li><a href=\"https://machinelearningmastery.com/hyperparameters-for-classification-machine-learning-algorithms/\" target=\"_blank\">Tune Hyperparameters for Classification Machine Learning Algorithms</a></li>\n<li><a href=\"https://towardsdatascience.com/image-pre-processing-c1aec0be3edf\" target=\"_blank\">Image Pre-Processing</a></li>\n<li><a href=\"https://gombru.github.io/2018/05/23/cross_entropy_loss/\" target=\"_blank\">Understanding Categorical Cross-Entropy Loss, Binary Cross-Entropy Loss…</a></li>\n<li><a href=\"https://paperswithcode.com/method/noisy-student\" target=\"_blank\">Noisy student</a></li>\n<li><a href=\"https://machinelearningmastery.com/overfitting-and-underfitting-with-machine-learning-algorithms/\" target=\"_blank\">Overfitting and Underfitting With Machine Learning Algorithms</a></li>\n<li><a href=\"https://medium.com/datadriveninvestor/developing-ai-projects-under-pressure-202cbab7428f\" target=\"_blank\">Developing AI projects under pressure</a></li>\n<li><a href=\"https://towardsdatascience.com/understanding-neural-networks-19020b758230\" target=\"_blank\">Understanding Neural Networks</a></li>\n<li><a href=\"https://www.kaggle.com/docs/competitions\" target=\"_blank\">Kaggle competitions</a></li>\n</ul>\n<h6>Books:</h6>\n<ul>\n<li><a href=\"https://www.manning.com/books/deep-learning-with-python\" target=\"_blank\">Deep Learning with Python by F.chollet</a></li>\n<li><a href=\"https://www.packtpub.com/product/deep-learning-with-pytorch/9781788624336\" target=\"_blank\">Deep Learning with Pytorch by V.Subramanian</a></li>\n<li><a href=\"https://www.oreilly.com/library/view/evaluating-machine-learning/9781492048756/\" target=\"_blank\">Evaluating Machine Learning Models</a></li>\n<li><a href=\"https://github.com/fastai/fastbook\" target=\"_blank\">Fastbook</a></li>\n</ul>\n<h6>Kaggle Competitions:</h6>\n<ul>\n<li><a href=\"https://www.kaggle.com/puneet6060/intel-image-classification\" target=\"_blank\">Intel Image Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/recursion-cellular-image-classification\" target=\"_blank\">Recursion Cellular Image Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification\" target=\"_blank\">SIIM-ISIC Melanoma Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/notebooks\" target=\"_blank\">APTOS 2019 Blindness Detection</a></li>\n<li><a href=\"https://www.kaggle.com/c/diabetic-retinopathy-detection\" target=\"_blank\">Diabetic Retinopathy Detection</a></li>\n<li><a href=\"https://www.kaggle.com/c/image-classification-fashion-mnist/notebooks\" target=\"_blank\">ML Project — Image Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/cdiscount-image-classification-challenge/notebooks\" target=\"_blank\">Cdiscount’s Image Classification Challenge</a></li>\n<li><a href=\"https://www.kaggle.com/c/plant-seedlings-classification/notebooks\" target=\"_blank\">Plant seedlings classifications</a></li>\n<li><a href=\"https://www.kaggle.com/c/aesthetic-visual-analysis/notebooks\" target=\"_blank\">Aesthetic Visual Analysis</a></li>\n<li><a href=\"https://www.kaggle.com/c/data-science-bowl-2017\" target=\"_blank\">Data Science Bowl 2017</a></li>\n<li><a href=\"https://www.kaggle.com/c/plant-pathology-2020-fgvc7\" target=\"_blank\">Plant Pathology 2020 – FGVC7</a></li>\n<li><a href=\"https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/notebooks\" target=\"_blank\">Lyft Motion Prediction for Autonomous Vehicles</a></li>\n<li><a href=\"https://www.kaggle.com/c/humpback-whale-identification\" target=\"_blank\">Humpback Whale Identification</a></li>\n<li><a href=\"https://www.kaggle.com/blazeka/multi-gpu-tensorflow-convnet-0-65\" target=\"_blank\">Distributed Training</a></li>\n<li><a href=\"https://www.kaggle.com/sentdex/first-pass-through-data-w-3d-convnet\" target=\"_blank\">3D Image classification</a></li>\n</ul>\n<h6>Notebooks:</h6>\n<ul>\n<li><a href=\"https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020\" target=\"_blank\">Ultimate Image Classification Guide 2020 <img src=\"https://s.w.org/images/core/emoji/14.0.0/svg/1f525.svg\" alt=\"🔥\"></a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-\" target=\"_blank\">Protein Atlas – Exploration and Baseline</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Intel Image Classification (CNN – Keras)</a></li>\n<li><a href=\"https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&amp;-Ben's-Preprocessing\" target=\"_blank\">APTOS : Eye Preprocessing in Diabetic Retinopathy</a></li>\n<li><a href=\"https://www.kaggle.com/kool777/lyft-level5-eda-training-inference\" target=\"_blank\">Lyft Level5: EDA + Training + Inference</a></li>\n<li><a href=\"https://www.kaggle.com/uzairrj/beg-tut-intel-image-classification-93-76-accur\" target=\"_blank\">[BEG][TUT]Intel Image Classification[93.76% Accur]</a></li>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">pretrained ResNet34 with RGBY (0.460 public LB)</a></li>\n<li><a href=\"https://www.kaggle.com/hmendonca/fold1h4r3-arcenetb4-2-256px-rcic-lb-0-9759/code\" target=\"_blank\">Fold1h4r3 ArcENetB4/2 256px RCIC</a></li>\n<li><a href=\"https://www.kaggle.com/jesucristo/quick-visualization-eda\" target=\"_blank\">Quick Visualization + EDA</a></li>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Analysis of Melanoma Metadata and EffNet Ensemble</a></li>\n<li><a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\" target=\"_blank\">Triple Stratified KFold with TFRecords</a></li>\n<li><a href=\"https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet\" target=\"_blank\">Melanoma. Pytorch starter. EfficientNet</a></li>\n<li><a href=\"https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr\" target=\"_blank\">InceptionV3 for Retinopathy (GPU-HR)</a></li>\n<li><a href=\"https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification\" target=\"_blank\">Fastai tutorial for image classification</a></li>\n<li><a href=\"https://www.kaggle.com/fatimaafifi/google-image-classification-v4\" target=\"_blank\">Google image classification v4</a></li>\n<li><a href=\"https://www.kaggle.com/curiousprogrammer/chest-x-ray-image-classification-tf-hub-resnet50\" target=\"_blank\">Chest X-Ray Image Classification – TF Hub ResNet50</a></li>\n</ul>",
  "messages": [
    {
      "id": 1847019,
      "postDate": "2022-07-07T14:55:46.013Z",
      "content": "<h1>Image Classification Checklist</h1>\n<hr>\n<p>This is a checklist/ cheat-sheet to help you structure your image classification pipeline.<br>\nIt is mainly a collection of links to kaggle topics / notebooks and some academic papers that helped in the past to solve image classification problems.</p>\n<h3>Data</h3>\n<h3>Image pre-processing + EDA</h3>\n<p>Before we get to building our model, we should do some exploratory data analysis and pre-processing tasks.<br>\nTo do this, look at the dataset and determine what pre-processing can be applied in order to improve the model.</p>\n<p><strong>Things to do:</strong></p>\n<ul>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-\" target=\"_blank\">Visualisation</a></li>\n<li><a href=\"/blog/how-to-deal-with-imbalanced-classification-and-regression-data\" target=\"_blank\">Dealing with Class imbalance</a></li>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Fill missing values (labels, features and, etc.)</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Normalisation</a></li>\n<li><a href=\"https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&amp;-Ben's-Preprocessing\" target=\"_blank\">Pre-processing</a></li>\n</ul>\n<h3>Model</h3>\n<h5>Baseline</h5>\n<p>The first step is to define a baseline network, we can use a pretrained network to develop a baseline. <br>\nThen we can compare the baseline results with the newly developed network and iterate to improve the latter one.</p>\n<p><strong>Ideas to try to improve our baseline</strong></p>\n<ul>\n<li>Adding more layers</li>\n<li>Using the different backbone</li>\n<li>Different learning rate</li>\n<li>Dropout, Batchnorm, weight_decay</li>\n<li>etc.</li>\n</ul>\n<h5>Backbones</h5>\n<p><strong>Basic Architectures</strong></p>\n<ul>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Residual Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1605.07146\" target=\"_blank\">Wide Residual Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Inception</a></li>\n<li><a href=\"https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr\" target=\"_blank\">Residual Attention Network</a></li>\n</ul>\n<p><strong>Modern Powerful Architectures</strong></p>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/1905.11946.pdf\" target=\"_blank\">EfficientNet</a> | <a href=\"https://www.kaggle.com/code/nroman/melanoma-pytorch-starter-efficientnet\" target=\"_blank\">Notebook</a></li>\n<li><a href=\"https://arxiv.org/abs/2010.11929\" target=\"_blank\">Vision Transformer (ViT)</a> | <a href=\"https://www.kaggle.com/code/abhinand05/vision-transformer-vit-tutorial-baseline\" target=\"_blank\">Notebook</a></li>\n<li><a href=\"https://arxiv.org/abs/2103.14030v2\" target=\"_blank\">Swin Transformer</a> | <a href=\"https://www.kaggle.com/code/debarshichanda/pytorch-hybrid-swin-transformer-cnn\" target=\"_blank\">Notebook</a></li>\n</ul>\n<h5>Training Schemes</h5>\n<p>During the training process, we can try to apply different techniques to improve the model's performance or our pipeline speed.</p>\n<ul>\n<li><a href=\"https://arxiv.org/abs/1710.03740\" target=\"_blank\">Mixed-Precision Training</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Large Batch-Size Training</a></li>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Cross-Validation Set</a></li>\n<li><a href=\"https://towardsdatascience.com/weight-initialization-in-neural-networks-a-journey-from-the-basics-to-kaiming-954fb9b47c79\" target=\"_blank\">Weight Initialization</a></li>\n<li><a href=\"https://arxiv.org/pdf/1911.04252.pdf\" target=\"_blank\">Self-Supervised Training (Knowledge Distillation)</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Learning Rate Scheduler</a></li>\n<li><a href=\"https://arxiv.org/abs/1812.01187\" target=\"_blank\">Learning Rate Warmup</a></li>\n<li><a href=\"https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020\" target=\"_blank\">Early Stopping</a></li>\n<li><a href=\"https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification\" target=\"_blank\">Differential Learning Rates</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Ensemble</a></li>\n<li><a href=\"https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification\" target=\"_blank\">Transfer Learning</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Fine-Tuning</a></li>\n</ul>\n<h5>Regularization</h5>\n<p>Some regularization tricks we can try:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Adding Dropout</a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Adding or changing the position of Batch Norm</a></li>\n<li><a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\" target=\"_blank\">Data augmentation</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.09412\" target=\"_blank\">Mixup</a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Weight regularization</a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline\" target=\"_blank\">Gradient clipping</a></li>\n</ul>\n<h3>Loss function</h3>\n<p>Some tricks and methods we can try to improve our loss functions are: </p>\n<ul>\n<li><a href=\"https://arxiv.org/pdf/1906.02629.pdf\" target=\"_blank\">Label smoothing</a></li>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">Focal loss</a></li>\n<li><a href=\"https://arxiv.org/pdf/2009.13935.pdf\" target=\"_blank\">SparseMax loss and Weighted cross-entropy</a></li>\n<li><a href=\"https://gombru.github.io/2018/05/23/cross_entropy_loss/\" target=\"_blank\">BCE loss, BCE with logits loss and Categorical cross-entropy loss</a></li>\n<li><a href=\"https://arxiv.org/abs/1801.07698\" target=\"_blank\">Additive Angular Margin Loss for Deep Face Recognition</a></li>\n</ul>\n<h5>Training Time Augmentation</h5>\n<p>Data augmentation is more crucial in Image classification problems than any other task. It helps us to increase the network performance and overfitting.</p>\n<p><strong>Example of Basic DataAugmentation Techniques</strong></p>\n<ul>\n<li>Flip H/V</li>\n<li>Random Rotate</li>\n<li>Random Zoom</li>\n<li>Cropping Image</li>\n<li>Random Brightness</li>\n</ul>\n<p><strong>Simple More Baseline Augmentations:</strong></p>\n<ul>\n<li>Random Fog</li>\n<li>Random Brightness/Contrast or Both</li>\n<li>Random Crop</li>\n<li>Random Gamma</li>\n<li>RGBShift</li>\n<li>HorizontalFlip/VerticalFlip</li>\n<li>Random Contrast</li>\n<li>Blur and its varients</li>\n<li>Affine</li>\n<li>Channel Dropout</li>\n<li>Inverting Image</li>\n<li>Noise and its varients</li>\n<li>…</li>\n</ul>\n<p><strong>And Some Examples</strong></p>\n<ul>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Horizontal Flip</a></li>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">Random Rotate and Random Dihedral</a></li>\n<li><a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\" target=\"_blank\">Hue, Saturation, Contrast, Brightness, Crop</a></li>\n<li><a href=\"https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet\" target=\"_blank\">Colour jitter</a></li>\n</ul>\n<h5>Test Time Augmentation</h5>\n<p>We can also use augmentations while predicting. Not only when training.<br>\nThis makes our model's predictions more robust since each of our final predictions will now be composed of multiple predictions, each with its unique perturbation.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">Test Time Augmentation (TTA)</a></li>\n</ul>\n<blockquote>\n  <p>This is the closest you get to \"free score\". If you got the compute time/power to do this: This nearly always works.</p>\n</blockquote>\n<h3>Hyperparameter tuning</h3>\n<p>Once we have a solid pipeline we are happy with, we can optimize its hyperparameters so we can push its performance to be even better. Tuning hyperparameters is often a very time-consuming process and should be done in a step-by-step manner.</p>\n<blockquote>\n  <p>Full post on this coming soon. In the meantime, you can start with <a href=\"https://optuna.org/\" target=\"_blank\">optuna</a></p>\n</blockquote>\n<h3>Error Analysis</h3>\n<p>Now we got a pipeline. It is \"OK\"-ish.. Now what? <br>\nIn order to fix the cases where it is wrong, we should check what are the causes for errors. <br>\nWhich cases are causing our model to make mistakes. <br>\nThis technique is called <strong>error analysis</strong>. Here are some links to start from:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Tracking metrics and Confusion matrix</a></li>\n<li><a href=\"https://arxiv.org/pdf/1610.02391v1.pdf\" target=\"_blank\">Grad CAM</a></li>\n</ul>\n<h3>Some more references to check</h3>\n<h6>Main Resource:</h6>\n<p><strong>Credits:</strong> Many of the links &amp; Materials are from <a href=\"https://neptune.ai/blog/image-classification-tips-and-tricks-from-13-kaggle-competitions\" target=\"_blank\">here</a>.</p>\n<h6>Papers:</h6>\n<ul>\n<li><a href=\"https://arxiv.org/abs/1605.07146\" target=\"_blank\">Wide Residual Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.09412\" target=\"_blank\">mixup: BEYOND EMPIRICAL RISK MINIMIZATION</a></li>\n<li><a href=\"https://arxiv.org/abs/1801.07698\" target=\"_blank\">ArcFace: Additive Angular Margin Loss for Deep Face Recognition</a></li>\n<li><a href=\"https://arxiv.org/abs/1905.11946\" target=\"_blank\">EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.05941\" target=\"_blank\">Searching for Activation Functions</a></li>\n<li><a href=\"https://arxiv.org/abs/1704.06904\" target=\"_blank\">Residual Attention Network for Image Classification</a></li>\n<li><a href=\"https://arxiv.org/abs/1710.03740\" target=\"_blank\">Mixed Precision Training</a></li>\n<li><a href=\"https://arxiv.org/pdf/1911.04252.pdf\" target=\"_blank\">Self-training with Noisy Student improves ImageNet classification</a></li>\n<li><a href=\"https://arxiv.org/abs/1906.02629\" target=\"_blank\">When Does Label Smoothing Help?</a></li>\n<li><a href=\"https://arxiv.org/abs/1801.07698\" target=\"_blank\">Additive Angular Margin Loss for Deep Face Recognition</a></li>\n<li><a href=\"https://arxiv.org/pdf/1610.02391v1.pdf\" target=\"_blank\">Grad-CAM: Why did you say that? Visual Explanations from Deep Networks…</a></li>\n<li><a href=\"https://arxiv.org/abs/2009.13935\" target=\"_blank\">A Comparative Study of Deep Learning Loss Functions for Multi-Label Remote Sensing Image Classification</a></li>\n</ul>\n<h6>Blogs:</h6>\n<ul>\n<li><a href=\"https://medium.com/@prince.canuma/wide-residual-nets-why-deeper-isnt-always-better-f2a02947dca3\" target=\"_blank\">Wide Residual Nets: “Why deeper isn’t always better…”</a></li>\n<li><a href=\"https://machinelearningmastery.com/hyperparameters-for-classification-machine-learning-algorithms/\" target=\"_blank\">Tune Hyperparameters for Classification Machine Learning Algorithms</a></li>\n<li><a href=\"https://towardsdatascience.com/image-pre-processing-c1aec0be3edf\" target=\"_blank\">Image Pre-Processing</a></li>\n<li><a href=\"https://gombru.github.io/2018/05/23/cross_entropy_loss/\" target=\"_blank\">Understanding Categorical Cross-Entropy Loss, Binary Cross-Entropy Loss…</a></li>\n<li><a href=\"https://paperswithcode.com/method/noisy-student\" target=\"_blank\">Noisy student</a></li>\n<li><a href=\"https://machinelearningmastery.com/overfitting-and-underfitting-with-machine-learning-algorithms/\" target=\"_blank\">Overfitting and Underfitting With Machine Learning Algorithms</a></li>\n<li><a href=\"https://medium.com/datadriveninvestor/developing-ai-projects-under-pressure-202cbab7428f\" target=\"_blank\">Developing AI projects under pressure</a></li>\n<li><a href=\"https://towardsdatascience.com/understanding-neural-networks-19020b758230\" target=\"_blank\">Understanding Neural Networks</a></li>\n<li><a href=\"https://www.kaggle.com/docs/competitions\" target=\"_blank\">Kaggle competitions</a></li>\n</ul>\n<h6>Books:</h6>\n<ul>\n<li><a href=\"https://www.manning.com/books/deep-learning-with-python\" target=\"_blank\">Deep Learning with Python by F.chollet</a></li>\n<li><a href=\"https://www.packtpub.com/product/deep-learning-with-pytorch/9781788624336\" target=\"_blank\">Deep Learning with Pytorch by V.Subramanian</a></li>\n<li><a href=\"https://www.oreilly.com/library/view/evaluating-machine-learning/9781492048756/\" target=\"_blank\">Evaluating Machine Learning Models</a></li>\n<li><a href=\"https://github.com/fastai/fastbook\" target=\"_blank\">Fastbook</a></li>\n</ul>\n<h6>Kaggle Competitions:</h6>\n<ul>\n<li><a href=\"https://www.kaggle.com/puneet6060/intel-image-classification\" target=\"_blank\">Intel Image Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/recursion-cellular-image-classification\" target=\"_blank\">Recursion Cellular Image Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification\" target=\"_blank\">SIIM-ISIC Melanoma Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/notebooks\" target=\"_blank\">APTOS 2019 Blindness Detection</a></li>\n<li><a href=\"https://www.kaggle.com/c/diabetic-retinopathy-detection\" target=\"_blank\">Diabetic Retinopathy Detection</a></li>\n<li><a href=\"https://www.kaggle.com/c/image-classification-fashion-mnist/notebooks\" target=\"_blank\">ML Project — Image Classification</a></li>\n<li><a href=\"https://www.kaggle.com/c/cdiscount-image-classification-challenge/notebooks\" target=\"_blank\">Cdiscount’s Image Classification Challenge</a></li>\n<li><a href=\"https://www.kaggle.com/c/plant-seedlings-classification/notebooks\" target=\"_blank\">Plant seedlings classifications</a></li>\n<li><a href=\"https://www.kaggle.com/c/aesthetic-visual-analysis/notebooks\" target=\"_blank\">Aesthetic Visual Analysis</a></li>\n<li><a href=\"https://www.kaggle.com/c/data-science-bowl-2017\" target=\"_blank\">Data Science Bowl 2017</a></li>\n<li><a href=\"https://www.kaggle.com/c/plant-pathology-2020-fgvc7\" target=\"_blank\">Plant Pathology 2020 – FGVC7</a></li>\n<li><a href=\"https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/notebooks\" target=\"_blank\">Lyft Motion Prediction for Autonomous Vehicles</a></li>\n<li><a href=\"https://www.kaggle.com/c/humpback-whale-identification\" target=\"_blank\">Humpback Whale Identification</a></li>\n<li><a href=\"https://www.kaggle.com/blazeka/multi-gpu-tensorflow-convnet-0-65\" target=\"_blank\">Distributed Training</a></li>\n<li><a href=\"https://www.kaggle.com/sentdex/first-pass-through-data-w-3d-convnet\" target=\"_blank\">3D Image classification</a></li>\n</ul>\n<h6>Notebooks:</h6>\n<ul>\n<li><a href=\"https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020\" target=\"_blank\">Ultimate Image Classification Guide 2020 <img src=\"https://s.w.org/images/core/emoji/14.0.0/svg/1f525.svg\" alt=\"🔥\"></a></li>\n<li><a href=\"https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-\" target=\"_blank\">Protein Atlas – Exploration and Baseline</a></li>\n<li><a href=\"https://www.kaggle.com/vincee/intel-image-classification-cnn-keras\" target=\"_blank\">Intel Image Classification (CNN – Keras)</a></li>\n<li><a href=\"https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&amp;-Ben's-Preprocessing\" target=\"_blank\">APTOS : Eye Preprocessing in Diabetic Retinopathy</a></li>\n<li><a href=\"https://www.kaggle.com/kool777/lyft-level5-eda-training-inference\" target=\"_blank\">Lyft Level5: EDA + Training + Inference</a></li>\n<li><a href=\"https://www.kaggle.com/uzairrj/beg-tut-intel-image-classification-93-76-accur\" target=\"_blank\">[BEG][TUT]Intel Image Classification[93.76% Accur]</a></li>\n<li><a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">pretrained ResNet34 with RGBY (0.460 public LB)</a></li>\n<li><a href=\"https://www.kaggle.com/hmendonca/fold1h4r3-arcenetb4-2-256px-rcic-lb-0-9759/code\" target=\"_blank\">Fold1h4r3 ArcENetB4/2 256px RCIC</a></li>\n<li><a href=\"https://www.kaggle.com/jesucristo/quick-visualization-eda\" target=\"_blank\">Quick Visualization + EDA</a></li>\n<li><a href=\"https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble\" target=\"_blank\">Analysis of Melanoma Metadata and EffNet Ensemble</a></li>\n<li><a href=\"https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords\" target=\"_blank\">Triple Stratified KFold with TFRecords</a></li>\n<li><a href=\"https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet\" target=\"_blank\">Melanoma. Pytorch starter. EfficientNet</a></li>\n<li><a href=\"https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr\" target=\"_blank\">InceptionV3 for Retinopathy (GPU-HR)</a></li>\n<li><a href=\"https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification\" target=\"_blank\">Fastai tutorial for image classification</a></li>\n<li><a href=\"https://www.kaggle.com/fatimaafifi/google-image-classification-v4\" target=\"_blank\">Google image classification v4</a></li>\n<li><a href=\"https://www.kaggle.com/curiousprogrammer/chest-x-ray-image-classification-tf-hub-resnet50\" target=\"_blank\">Chest X-Ray Image Classification – TF Hub ResNet50</a></li>\n</ul>",
      "rawMarkdown": "# Image Classification Checklist\n_____\n\n\nThis is a checklist/ cheat-sheet to help you structure your image classification pipeline.\nIt is mainly a collection of links to kaggle topics / notebooks and some academic papers that helped in the past to solve image classification problems.\n\n\n### Data\n\n### Image pre-processing + EDA\n\nBefore we get to building our model, we should do some exploratory data analysis and pre-processing tasks.\nTo do this, look at the dataset and determine what pre-processing can be applied in order to improve the model.\n\n**Things to do:**\n\n* [Visualisation](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-)\n* [Dealing with Class imbalance](/blog/how-to-deal-with-imbalanced-classification-and-regression-data)\n* [Fill missing values (labels, features and, etc.)](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Normalisation](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [Pre-processing](https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&-Ben's-Preprocessing)\n\n### Model\n\n##### Baseline\n\nThe first step is to define a baseline network, we can use a pretrained network to develop a baseline. \nThen we can compare the baseline results with the newly developed network and iterate to improve the latter one.\n\n**Ideas to try to improve our baseline**\n- Adding more layers\n- Using the different backbone\n- Different learning rate\n- Dropout, Batchnorm, weight_decay\n- etc.\n\n##### Backbones\n\n**Basic Architectures**\n* [Residual Networks](https://arxiv.org/abs/1812.01187)\n* [Wide Residual Networks](https://arxiv.org/abs/1605.07146)\n* [Inception](https://arxiv.org/abs/1812.01187)\n* [Residual Attention Network](https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr)\n\n**Modern Powerful Architectures**\n* [EfficientNet](https://arxiv.org/pdf/1905.11946.pdf) | [Notebook](https://www.kaggle.com/code/nroman/melanoma-pytorch-starter-efficientnet)\n* [Vision Transformer (ViT)](https://arxiv.org/abs/2010.11929) | [Notebook](https://www.kaggle.com/code/abhinand05/vision-transformer-vit-tutorial-baseline)\n* [Swin Transformer](https://arxiv.org/abs/2103.14030v2) | [Notebook](https://www.kaggle.com/code/debarshichanda/pytorch-hybrid-swin-transformer-cnn)\n\n##### Training Schemes\n\nDuring the training process, we can try to apply different techniques to improve the model's performance or our pipeline speed.\n\n* [Mixed-Precision Training](https://arxiv.org/abs/1710.03740)\n* [Large Batch-Size Training](https://arxiv.org/abs/1812.01187)\n* [Cross-Validation Set](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Weight Initialization](https://towardsdatascience.com/weight-initialization-in-neural-networks-a-journey-from-the-basics-to-kaiming-954fb9b47c79)\n* [Self-Supervised Training (Knowledge Distillation)](https://arxiv.org/pdf/1911.04252.pdf)\n* [Learning Rate Scheduler](https://arxiv.org/abs/1812.01187)\n* [Learning Rate Warmup](https://arxiv.org/abs/1812.01187)\n* [Early Stopping](https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020)\n* [Differential Learning Rates](https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification)\n* [Ensemble](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [Transfer Learning](https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification)\n* [Fine-Tuning](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n\n##### Regularization\n\nSome regularization tricks we can try:\n\n* [Adding Dropout](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n* [Adding or changing the position of Batch Norm](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n* [Data augmentation](https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords)\n* [Mixup](https://arxiv.org/abs/1710.09412)\n* [Weight regularization](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n* [Gradient clipping](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n\n### Loss function\n\nSome tricks and methods we can try to improve our loss functions are: \n\n* [Label smoothing](https://arxiv.org/pdf/1906.02629.pdf)\n* [Focal loss](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n* [SparseMax loss and Weighted cross-entropy](https://arxiv.org/pdf/2009.13935.pdf)\n* [BCE loss, BCE with logits loss and Categorical cross-entropy loss](https://gombru.github.io/2018/05/23/cross_entropy_loss/)\n* [Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698)\n\n\n##### Training Time Augmentation\n\nData augmentation is more crucial in Image classification problems than any other task. It helps us to increase the network performance and overfitting.\n\n**Example of Basic DataAugmentation Techniques**\n\n- Flip H/V\n- Random Rotate\n- Random Zoom\n- Cropping Image\n- Random Brightness\n\n\n**Simple More Baseline Augmentations:**\n\n- Random Fog\n- Random Brightness/Contrast or Both\n- Random Crop\n- Random Gamma\n- RGBShift\n- HorizontalFlip/VerticalFlip\n- Random Contrast\n- Blur and its varients\n- Affine\n- Channel Dropout\n- Inverting Image\n- Noise and its varients\n- ...\n\n**And Some Examples**\n\n* [Horizontal Flip](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Random Rotate and Random Dihedral](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n* [Hue, Saturation, Contrast, Brightness, Crop](https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords)\n* [Colour jitter](https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet)\n\n\n##### Test Time Augmentation\n\nWe can also use augmentations while predicting. Not only when training.\nThis makes our model's predictions more robust since each of our final predictions will now be composed of multiple predictions, each with its unique perturbation.\n\n* [Test Time Augmentation (TTA)](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n\n> This is the closest you get to \"free score\". If you got the compute time/power to do this: This nearly always works.\n\n### Hyperparameter tuning\n\nOnce we have a solid pipeline we are happy with, we can optimize its hyperparameters so we can push its performance to be even better. Tuning hyperparameters is often a very time-consuming process and should be done in a step-by-step manner.\n\n> Full post on this coming soon. In the meantime, you can start with [optuna](https://optuna.org/)\n\n### Error Analysis\n\nNow we got a pipeline. It is \"OK\"-ish.. Now what? \nIn order to fix the cases where it is wrong, we should check what are the causes for errors. \nWhich cases are causing our model to make mistakes. \nThis technique is called **error analysis**. Here are some links to start from:\n\n* [Tracking metrics and Confusion matrix](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [Grad CAM](https://arxiv.org/pdf/1610.02391v1.pdf)\n\n### Some more references to check\n\n###### Main Resource:\n**Credits:** Many of the links & Materials are from [here](https://neptune.ai/blog/image-classification-tips-and-tricks-from-13-kaggle-competitions).\n\n###### Papers:\n\n* [Wide Residual Networks](https://arxiv.org/abs/1605.07146)\n* [mixup: BEYOND EMPIRICAL RISK MINIMIZATION](https://arxiv.org/abs/1710.09412)\n* [ArcFace: Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698)\n* [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946)\n* [Searching for Activation Functions](https://arxiv.org/abs/1710.05941)\n* [Residual Attention Network for Image Classification](https://arxiv.org/abs/1704.06904)\n* [Mixed Precision Training](https://arxiv.org/abs/1710.03740)\n* [Self-training with Noisy Student improves ImageNet classification](https://arxiv.org/pdf/1911.04252.pdf)\n* [When Does Label Smoothing Help?](https://arxiv.org/abs/1906.02629)\n* [Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698)\n* [Grad-CAM: Why did you say that? Visual Explanations from Deep Networks…](https://arxiv.org/pdf/1610.02391v1.pdf)\n* [A Comparative Study of Deep Learning Loss Functions for Multi-Label Remote Sensing Image Classification](https://arxiv.org/abs/2009.13935)\n\n###### Blogs:\n\n* [Wide Residual Nets: “Why deeper isn’t always better…”](https://medium.com/@prince.canuma/wide-residual-nets-why-deeper-isnt-always-better-f2a02947dca3)\n* [Tune Hyperparameters for Classification Machine Learning Algorithms](https://machinelearningmastery.com/hyperparameters-for-classification-machine-learning-algorithms/)\n* [Image Pre-Processing](https://towardsdatascience.com/image-pre-processing-c1aec0be3edf)\n* [Understanding Categorical Cross-Entropy Loss, Binary Cross-Entropy Loss…](https://gombru.github.io/2018/05/23/cross_entropy_loss/)\n* [Noisy student](https://paperswithcode.com/method/noisy-student)\n* [Overfitting and Underfitting With Machine Learning Algorithms](https://machinelearningmastery.com/overfitting-and-underfitting-with-machine-learning-algorithms/)\n* [Developing AI projects under pressure](https://medium.com/datadriveninvestor/developing-ai-projects-under-pressure-202cbab7428f)\n* [Understanding Neural Networks](https://towardsdatascience.com/understanding-neural-networks-19020b758230)\n* [Kaggle competitions](https://www.kaggle.com/docs/competitions)\n\n###### Books:\n \n* [Deep Learning with Python by F.chollet](https://www.manning.com/books/deep-learning-with-python)\n* [Deep Learning with Pytorch by V.Subramanian](https://www.packtpub.com/product/deep-learning-with-pytorch/9781788624336)\n* [Evaluating Machine Learning Models](https://www.oreilly.com/library/view/evaluating-machine-learning/9781492048756/)\n* [Fastbook](https://github.com/fastai/fastbook)\n\n###### Kaggle Competitions:\n \n* [Intel Image Classification](https://www.kaggle.com/puneet6060/intel-image-classification)\n* [Recursion Cellular Image Classification](https://www.kaggle.com/c/recursion-cellular-image-classification)\n* [SIIM-ISIC Melanoma Classification](https://www.kaggle.com/c/siim-isic-melanoma-classification)\n* [APTOS 2019 Blindness Detection](https://www.kaggle.com/c/aptos2019-blindness-detection/notebooks)\n* [Diabetic Retinopathy Detection](https://www.kaggle.com/c/diabetic-retinopathy-detection)\n* [ML Project — Image Classification](https://www.kaggle.com/c/image-classification-fashion-mnist/notebooks)\n* [Cdiscount’s Image Classification Challenge](https://www.kaggle.com/c/cdiscount-image-classification-challenge/notebooks)\n* [Plant seedlings classifications](https://www.kaggle.com/c/plant-seedlings-classification/notebooks)\n* [Aesthetic Visual Analysis](https://www.kaggle.com/c/aesthetic-visual-analysis/notebooks)\n* [Data Science Bowl 2017](https://www.kaggle.com/c/data-science-bowl-2017)\n* [Plant Pathology 2020 – FGVC7](https://www.kaggle.com/c/plant-pathology-2020-fgvc7)\n* [Lyft Motion Prediction for Autonomous Vehicles](https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/notebooks)\n* [Humpback Whale Identification](https://www.kaggle.com/c/humpback-whale-identification)\n* [Distributed Training](https://www.kaggle.com/blazeka/multi-gpu-tensorflow-convnet-0-65)\n* [3D Image classification](https://www.kaggle.com/sentdex/first-pass-through-data-w-3d-convnet)\n\n###### Notebooks:\n \n* [Ultimate Image Classification Guide 2020 ![🔥](https://s.w.org/images/core/emoji/14.0.0/svg/1f525.svg)](https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020)\n* [Protein Atlas – Exploration and Baseline](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-)\n* [Intel Image Classification (CNN – Keras)](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [APTOS : Eye Preprocessing in Diabetic Retinopathy](https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&-Ben's-Preprocessing)\n* [Lyft Level5: EDA + Training + Inference](https://www.kaggle.com/kool777/lyft-level5-eda-training-inference)\n* [[BEG][TUT]Intel Image Classification[93.76% Accur]](https://www.kaggle.com/uzairrj/beg-tut-intel-image-classification-93-76-accur)\n* [pretrained ResNet34 with RGBY (0.460 public LB)](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n* [Fold1h4r3 ArcENetB4/2 256px RCIC](https://www.kaggle.com/hmendonca/fold1h4r3-arcenetb4-2-256px-rcic-lb-0-9759/code)\n* [Quick Visualization + EDA](https://www.kaggle.com/jesucristo/quick-visualization-eda)\n* [Analysis of Melanoma Metadata and EffNet Ensemble](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Triple Stratified KFold with TFRecords](https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords)\n* [Melanoma. Pytorch starter. EfficientNet](https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet)\n* [InceptionV3 for Retinopathy (GPU-HR)](https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr)\n* [Fastai tutorial for image classification](https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification)\n* [Google image classification v4](https://www.kaggle.com/fatimaafifi/google-image-classification-v4)\n* [Chest X-Ray Image Classification – TF Hub ResNet50](https://www.kaggle.com/curiousprogrammer/chest-x-ray-image-classification-tf-hub-resnet50)\n",
      "votes": 107
    },
    {
      "id": 1857889,
      "postDate": "2022-07-16T13:26:33.010Z",
      "content": "<p>amazing collection. very helpful.</p>",
      "rawMarkdown": "amazing collection. very helpful.",
      "votes": 1
    },
    {
      "id": 2153507,
      "postDate": "2023-02-21T13:12:22.940Z",
      "content": "<p>This helps me a lot!</p>",
      "rawMarkdown": "This helps me a lot!"
    },
    {
      "id": 2029893,
      "postDate": "2022-11-15T02:49:56.720Z",
      "content": "<p>This is really helpful, I really appreciate it!!!!!</p>",
      "rawMarkdown": "This is really helpful, I really appreciate it!!!!!"
    },
    {
      "id": 2004874,
      "postDate": "2022-10-26T15:15:02.023Z",
      "content": "<p>Great job putting this piece together, I find this information very resourceful,  Thanks for sharing.</p>",
      "rawMarkdown": "Great job putting this piece together, I find this information very resourceful,  Thanks for sharing."
    },
    {
      "id": 1960777,
      "postDate": "2022-09-28T18:56:49.137Z",
      "content": "<p>thank you for the time you took to share this amazing sources with us!</p>",
      "rawMarkdown": "thank you for the time you took to share this amazing sources with us!"
    },
    {
      "id": 1886232,
      "postDate": "2022-08-05T16:33:48.610Z",
      "content": "<p>Great checklist, thanks so much! Bookmarked. </p>",
      "rawMarkdown": "Great checklist, thanks so much! Bookmarked. "
    },
    {
      "id": 1881941,
      "postDate": "2022-08-03T00:30:06.707Z",
      "content": "<p>Great Discussion! Awesome!</p>",
      "rawMarkdown": "Great Discussion! Awesome!"
    },
    {
      "id": 1859664,
      "postDate": "2022-07-17T20:34:59.210Z",
      "content": "<p>Thanks for putting these information together, very systematic. Looking forward to see the next revision, e.g. Hyperparameter tuning.</p>",
      "rawMarkdown": "Thanks for putting these information together, very systematic. Looking forward to see the next revision, e.g. Hyperparameter tuning."
    },
    {
      "id": 1848509,
      "postDate": "2022-07-08T17:15:38.950Z",
      "content": "<p>I made some simple image cropping to reduce huge empty backgrounds,<br>\npls check <a href=\"https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images</a></p>",
      "rawMarkdown": "I made some simple image cropping to reduce huge empty backgrounds,\npls check https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images"
    },
    {
      "id": 1885980,
      "postDate": "2022-08-05T13:28:59.383Z",
      "content": "<p>Great resources! Thanks for sharing!</p>",
      "rawMarkdown": "Great resources! Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 1847681,
      "postDate": "2022-07-08T04:41:49.390Z",
      "content": "<p>Thanks for putting this together.</p>",
      "rawMarkdown": "Thanks for putting this together.",
      "votes": 2
    },
    {
      "id": 2812313,
      "postDate": "2024-05-14T07:24:28.227Z",
      "content": "<p>Thanks for sharing! Very helpful!</p>",
      "rawMarkdown": "Thanks for sharing! Very helpful!"
    },
    {
      "id": 2057826,
      "postDate": "2022-12-07T11:17:53.223Z",
      "content": "<p>Thanks a lot for the resources!</p>",
      "rawMarkdown": "Thanks a lot for the resources!"
    },
    {
      "id": 1916519,
      "postDate": "2022-08-28T00:31:58.983Z",
      "content": "<p>Thanks for sharing.. Awesome!</p>",
      "rawMarkdown": "Thanks for sharing.. Awesome!"
    }
  ],
  "comments": [
    {
      "id": 1857889,
      "author_name": "oneSaviour",
      "author_url": "",
      "post_date": "2022-07-16T13:26:33.010000",
      "content": "<p>amazing collection. very helpful.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2153507,
      "author_name": "fumi",
      "author_url": "",
      "post_date": "2023-02-21T13:12:22.940000",
      "content": "<p>This helps me a lot!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2029893,
      "author_name": "SOYOUNG PARK",
      "author_url": "",
      "post_date": "2022-11-15T02:49:56.720000",
      "content": "<p>This is really helpful, I really appreciate it!!!!!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2004874,
      "author_name": "Okafor Sylvester Chukwuka",
      "author_url": "",
      "post_date": "2022-10-26T15:15:02.023000",
      "content": "<p>Great job putting this piece together, I find this information very resourceful,  Thanks for sharing.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1960777,
      "author_name": "Saul dos Anjos",
      "author_url": "",
      "post_date": "2022-09-28T18:56:49.137000",
      "content": "<p>thank you for the time you took to share this amazing sources with us!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1886232,
      "author_name": "Bella Pisani",
      "author_url": "",
      "post_date": "2022-08-05T16:33:48.610000",
      "content": "<p>Great checklist, thanks so much! Bookmarked. </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1881941,
      "author_name": "yusei",
      "author_url": "",
      "post_date": "2022-08-03T00:30:06.707000",
      "content": "<p>Great Discussion! Awesome!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1859664,
      "author_name": "Henry (Shang-Rou) Hsieh",
      "author_url": "",
      "post_date": "2022-07-17T20:34:59.210000",
      "content": "<p>Thanks for putting these information together, very systematic. Looking forward to see the next revision, e.g. Hyperparameter tuning.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1848509,
      "author_name": "Jirka",
      "author_url": "",
      "post_date": "2022-07-08T17:15:38.950000",
      "content": "<p>I made some simple image cropping to reduce huge empty backgrounds,<br>\npls check <a href=\"https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1885980,
      "author_name": "Xiang Zhang",
      "author_url": "",
      "post_date": "2022-08-05T13:28:59.383000",
      "content": "<p>Great resources! Thanks for sharing!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1847681,
      "author_name": "Darien Schettler",
      "author_url": "",
      "post_date": "2022-07-08T04:41:49.390000",
      "content": "<p>Thanks for putting this together.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2812313,
      "author_name": "Đoàn Bùi",
      "author_url": "",
      "post_date": "2024-05-14T07:24:28.227000",
      "content": "<p>Thanks for sharing! Very helpful!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2057826,
      "author_name": "Ashvanth s",
      "author_url": "",
      "post_date": "2022-12-07T11:17:53.223000",
      "content": "<p>Thanks a lot for the resources!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1916519,
      "author_name": "Choerul Afifanto",
      "author_url": "",
      "post_date": "2022-08-28T00:31:58.983000",
      "content": "<p>Thanks for sharing.. Awesome!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1847019": "# Image Classification Checklist\n_____\n\n\nThis is a checklist/ cheat-sheet to help you structure your image classification pipeline.\nIt is mainly a collection of links to kaggle topics / notebooks and some academic papers that helped in the past to solve image classification problems.\n\n\n### Data\n\n### Image pre-processing + EDA\n\nBefore we get to building our model, we should do some exploratory data analysis and pre-processing tasks.\nTo do this, look at the dataset and determine what pre-processing can be applied in order to improve the model.\n\n**Things to do:**\n\n* [Visualisation](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-)\n* [Dealing with Class imbalance](/blog/how-to-deal-with-imbalanced-classification-and-regression-data)\n* [Fill missing values (labels, features and, etc.)](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Normalisation](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [Pre-processing](https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&-Ben's-Preprocessing)\n\n### Model\n\n##### Baseline\n\nThe first step is to define a baseline network, we can use a pretrained network to develop a baseline. \nThen we can compare the baseline results with the newly developed network and iterate to improve the latter one.\n\n**Ideas to try to improve our baseline**\n- Adding more layers\n- Using the different backbone\n- Different learning rate\n- Dropout, Batchnorm, weight_decay\n- etc.\n\n##### Backbones\n\n**Basic Architectures**\n* [Residual Networks](https://arxiv.org/abs/1812.01187)\n* [Wide Residual Networks](https://arxiv.org/abs/1605.07146)\n* [Inception](https://arxiv.org/abs/1812.01187)\n* [Residual Attention Network](https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr)\n\n**Modern Powerful Architectures**\n* [EfficientNet](https://arxiv.org/pdf/1905.11946.pdf) | [Notebook](https://www.kaggle.com/code/nroman/melanoma-pytorch-starter-efficientnet)\n* [Vision Transformer (ViT)](https://arxiv.org/abs/2010.11929) | [Notebook](https://www.kaggle.com/code/abhinand05/vision-transformer-vit-tutorial-baseline)\n* [Swin Transformer](https://arxiv.org/abs/2103.14030v2) | [Notebook](https://www.kaggle.com/code/debarshichanda/pytorch-hybrid-swin-transformer-cnn)\n\n##### Training Schemes\n\nDuring the training process, we can try to apply different techniques to improve the model's performance or our pipeline speed.\n\n* [Mixed-Precision Training](https://arxiv.org/abs/1710.03740)\n* [Large Batch-Size Training](https://arxiv.org/abs/1812.01187)\n* [Cross-Validation Set](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Weight Initialization](https://towardsdatascience.com/weight-initialization-in-neural-networks-a-journey-from-the-basics-to-kaiming-954fb9b47c79)\n* [Self-Supervised Training (Knowledge Distillation)](https://arxiv.org/pdf/1911.04252.pdf)\n* [Learning Rate Scheduler](https://arxiv.org/abs/1812.01187)\n* [Learning Rate Warmup](https://arxiv.org/abs/1812.01187)\n* [Early Stopping](https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020)\n* [Differential Learning Rates](https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification)\n* [Ensemble](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [Transfer Learning](https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification)\n* [Fine-Tuning](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n\n##### Regularization\n\nSome regularization tricks we can try:\n\n* [Adding Dropout](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n* [Adding or changing the position of Batch Norm](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n* [Data augmentation](https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords)\n* [Mixup](https://arxiv.org/abs/1710.09412)\n* [Weight regularization](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n* [Gradient clipping](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline)\n\n### Loss function\n\nSome tricks and methods we can try to improve our loss functions are: \n\n* [Label smoothing](https://arxiv.org/pdf/1906.02629.pdf)\n* [Focal loss](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n* [SparseMax loss and Weighted cross-entropy](https://arxiv.org/pdf/2009.13935.pdf)\n* [BCE loss, BCE with logits loss and Categorical cross-entropy loss](https://gombru.github.io/2018/05/23/cross_entropy_loss/)\n* [Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698)\n\n\n##### Training Time Augmentation\n\nData augmentation is more crucial in Image classification problems than any other task. It helps us to increase the network performance and overfitting.\n\n**Example of Basic DataAugmentation Techniques**\n\n- Flip H/V\n- Random Rotate\n- Random Zoom\n- Cropping Image\n- Random Brightness\n\n\n**Simple More Baseline Augmentations:**\n\n- Random Fog\n- Random Brightness/Contrast or Both\n- Random Crop\n- Random Gamma\n- RGBShift\n- HorizontalFlip/VerticalFlip\n- Random Contrast\n- Blur and its varients\n- Affine\n- Channel Dropout\n- Inverting Image\n- Noise and its varients\n- ...\n\n**And Some Examples**\n\n* [Horizontal Flip](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Random Rotate and Random Dihedral](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n* [Hue, Saturation, Contrast, Brightness, Crop](https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords)\n* [Colour jitter](https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet)\n\n\n##### Test Time Augmentation\n\nWe can also use augmentations while predicting. Not only when training.\nThis makes our model's predictions more robust since each of our final predictions will now be composed of multiple predictions, each with its unique perturbation.\n\n* [Test Time Augmentation (TTA)](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n\n> This is the closest you get to \"free score\". If you got the compute time/power to do this: This nearly always works.\n\n### Hyperparameter tuning\n\nOnce we have a solid pipeline we are happy with, we can optimize its hyperparameters so we can push its performance to be even better. Tuning hyperparameters is often a very time-consuming process and should be done in a step-by-step manner.\n\n> Full post on this coming soon. In the meantime, you can start with [optuna](https://optuna.org/)\n\n### Error Analysis\n\nNow we got a pipeline. It is \"OK\"-ish.. Now what? \nIn order to fix the cases where it is wrong, we should check what are the causes for errors. \nWhich cases are causing our model to make mistakes. \nThis technique is called **error analysis**. Here are some links to start from:\n\n* [Tracking metrics and Confusion matrix](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [Grad CAM](https://arxiv.org/pdf/1610.02391v1.pdf)\n\n### Some more references to check\n\n###### Main Resource:\n**Credits:** Many of the links & Materials are from [here](https://neptune.ai/blog/image-classification-tips-and-tricks-from-13-kaggle-competitions).\n\n###### Papers:\n\n* [Wide Residual Networks](https://arxiv.org/abs/1605.07146)\n* [mixup: BEYOND EMPIRICAL RISK MINIMIZATION](https://arxiv.org/abs/1710.09412)\n* [ArcFace: Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698)\n* [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946)\n* [Searching for Activation Functions](https://arxiv.org/abs/1710.05941)\n* [Residual Attention Network for Image Classification](https://arxiv.org/abs/1704.06904)\n* [Mixed Precision Training](https://arxiv.org/abs/1710.03740)\n* [Self-training with Noisy Student improves ImageNet classification](https://arxiv.org/pdf/1911.04252.pdf)\n* [When Does Label Smoothing Help?](https://arxiv.org/abs/1906.02629)\n* [Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698)\n* [Grad-CAM: Why did you say that? Visual Explanations from Deep Networks…](https://arxiv.org/pdf/1610.02391v1.pdf)\n* [A Comparative Study of Deep Learning Loss Functions for Multi-Label Remote Sensing Image Classification](https://arxiv.org/abs/2009.13935)\n\n###### Blogs:\n\n* [Wide Residual Nets: “Why deeper isn’t always better…”](https://medium.com/@prince.canuma/wide-residual-nets-why-deeper-isnt-always-better-f2a02947dca3)\n* [Tune Hyperparameters for Classification Machine Learning Algorithms](https://machinelearningmastery.com/hyperparameters-for-classification-machine-learning-algorithms/)\n* [Image Pre-Processing](https://towardsdatascience.com/image-pre-processing-c1aec0be3edf)\n* [Understanding Categorical Cross-Entropy Loss, Binary Cross-Entropy Loss…](https://gombru.github.io/2018/05/23/cross_entropy_loss/)\n* [Noisy student](https://paperswithcode.com/method/noisy-student)\n* [Overfitting and Underfitting With Machine Learning Algorithms](https://machinelearningmastery.com/overfitting-and-underfitting-with-machine-learning-algorithms/)\n* [Developing AI projects under pressure](https://medium.com/datadriveninvestor/developing-ai-projects-under-pressure-202cbab7428f)\n* [Understanding Neural Networks](https://towardsdatascience.com/understanding-neural-networks-19020b758230)\n* [Kaggle competitions](https://www.kaggle.com/docs/competitions)\n\n###### Books:\n \n* [Deep Learning with Python by F.chollet](https://www.manning.com/books/deep-learning-with-python)\n* [Deep Learning with Pytorch by V.Subramanian](https://www.packtpub.com/product/deep-learning-with-pytorch/9781788624336)\n* [Evaluating Machine Learning Models](https://www.oreilly.com/library/view/evaluating-machine-learning/9781492048756/)\n* [Fastbook](https://github.com/fastai/fastbook)\n\n###### Kaggle Competitions:\n \n* [Intel Image Classification](https://www.kaggle.com/puneet6060/intel-image-classification)\n* [Recursion Cellular Image Classification](https://www.kaggle.com/c/recursion-cellular-image-classification)\n* [SIIM-ISIC Melanoma Classification](https://www.kaggle.com/c/siim-isic-melanoma-classification)\n* [APTOS 2019 Blindness Detection](https://www.kaggle.com/c/aptos2019-blindness-detection/notebooks)\n* [Diabetic Retinopathy Detection](https://www.kaggle.com/c/diabetic-retinopathy-detection)\n* [ML Project — Image Classification](https://www.kaggle.com/c/image-classification-fashion-mnist/notebooks)\n* [Cdiscount’s Image Classification Challenge](https://www.kaggle.com/c/cdiscount-image-classification-challenge/notebooks)\n* [Plant seedlings classifications](https://www.kaggle.com/c/plant-seedlings-classification/notebooks)\n* [Aesthetic Visual Analysis](https://www.kaggle.com/c/aesthetic-visual-analysis/notebooks)\n* [Data Science Bowl 2017](https://www.kaggle.com/c/data-science-bowl-2017)\n* [Plant Pathology 2020 – FGVC7](https://www.kaggle.com/c/plant-pathology-2020-fgvc7)\n* [Lyft Motion Prediction for Autonomous Vehicles](https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/notebooks)\n* [Humpback Whale Identification](https://www.kaggle.com/c/humpback-whale-identification)\n* [Distributed Training](https://www.kaggle.com/blazeka/multi-gpu-tensorflow-convnet-0-65)\n* [3D Image classification](https://www.kaggle.com/sentdex/first-pass-through-data-w-3d-convnet)\n\n###### Notebooks:\n \n* [Ultimate Image Classification Guide 2020 ![🔥](https://s.w.org/images/core/emoji/14.0.0/svg/1f525.svg)](https://www.kaggle.com/rohandeysarkar/ultimate-image-classification-guide-2020)\n* [Protein Atlas – Exploration and Baseline](https://www.kaggle.com/allunia/protein-atlas-exploration-and-baseline#Building-a-baseline-model-)\n* [Intel Image Classification (CNN – Keras)](https://www.kaggle.com/vincee/intel-image-classification-cnn-keras)\n* [APTOS : Eye Preprocessing in Diabetic Retinopathy](https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy#3.A-Important-Update-on-Color-Version-of-Cropping-&-Ben's-Preprocessing)\n* [Lyft Level5: EDA + Training + Inference](https://www.kaggle.com/kool777/lyft-level5-eda-training-inference)\n* [[BEG][TUT]Intel Image Classification[93.76% Accur]](https://www.kaggle.com/uzairrj/beg-tut-intel-image-classification-93-76-accur)\n* [pretrained ResNet34 with RGBY (0.460 public LB)](https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb)\n* [Fold1h4r3 ArcENetB4/2 256px RCIC](https://www.kaggle.com/hmendonca/fold1h4r3-arcenetb4-2-256px-rcic-lb-0-9759/code)\n* [Quick Visualization + EDA](https://www.kaggle.com/jesucristo/quick-visualization-eda)\n* [Analysis of Melanoma Metadata and EffNet Ensemble](https://www.kaggle.com/datafan07/analysis-of-melanoma-metadata-and-effnet-ensemble)\n* [Triple Stratified KFold with TFRecords](https://www.kaggle.com/cdeotte/triple-stratified-kfold-with-tfrecords)\n* [Melanoma. Pytorch starter. EfficientNet](https://www.kaggle.com/nroman/melanoma-pytorch-starter-efficientnet)\n* [InceptionV3 for Retinopathy (GPU-HR)](https://www.kaggle.com/kmader/inceptionv3-for-retinopathy-gpu-hr)\n* [Fastai tutorial for image classification](https://www.kaggle.com/dataraj/fastai-tutorial-for-image-classification)\n* [Google image classification v4](https://www.kaggle.com/fatimaafifi/google-image-classification-v4)\n* [Chest X-Ray Image Classification – TF Hub ResNet50](https://www.kaggle.com/curiousprogrammer/chest-x-ray-image-classification-tf-hub-resnet50)\n",
    "1857889": "amazing collection. very helpful.",
    "2153507": "This helps me a lot!",
    "2029893": "This is really helpful, I really appreciate it!!!!!",
    "2004874": "Great job putting this piece together, I find this information very resourceful,  Thanks for sharing.",
    "1960777": "thank you for the time you took to share this amazing sources with us!",
    "1886232": "Great checklist, thanks so much! Bookmarked. ",
    "1881941": "Great Discussion! Awesome!",
    "1859664": "Thanks for putting these information together, very systematic. Looking forward to see the next revision, e.g. Hyperparameter tuning.",
    "1848509": "I made some simple image cropping to reduce huge empty backgrounds,\npls check https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images",
    "1885980": "Great resources! Thanks for sharing!",
    "1847681": "Thanks for putting this together.",
    "2812313": "Thanks for sharing! Very helpful!",
    "2057826": "Thanks a lot for the resources!",
    "1916519": "Thanks for sharing.. Awesome!"
  }
}