{
  "id": 202946,
  "title": "Getting LB score of 0.048 even after using everything to the best of my knowledge.",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/202946",
  "author_name": "",
  "post_date": "2020-12-12T20:36:30.662190900Z",
  "votes": null,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hello All,</p>\n<p>I am unable to understand why I getting such a low score on LB of 0.048 even after using these:</p>\n<p>--&gt; using image size of 256 * 256<br>\n--&gt; following train and validation augmentations with FMix</p>\n<pre><code>if self.is_valid == 1: # transforms for validation images\n            self.aug = albumentations.Compose([\n            albumentations.CenterCrop(256, 256, p=1.),\n            albumentations.Resize(256, 256),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            )], p=1.)\n\n        else:       # transfoms for training images \n            self.aug = albumentations.Compose([\n            albumentations.RandomResizedCrop(256, 256),\n            albumentations.Transpose(p=0.5),\n            albumentations.HorizontalFlip(p=0.5),\n            albumentations.VerticalFlip(p=0.5),\n            albumentations.ShiftScaleRotate(p=0.5),\n            albumentations.HueSaturationValue(\n                hue_shift_limit=0.2, \n                sat_shift_limit=0.2, \n                val_shift_limit=0.2, \n                p=0.5\n            ),\n            albumentations.RandomBrightnessContrast(\n                brightness_limit=(-0.1,0.1), \n                contrast_limit=(-0.1, 0.1), \n                p=0.5\n            ),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            ),\n            albumentations.CoarseDropout(p=0.5),\n            albumentations.Cutout(p=0.5)], p=1.)\n</code></pre>\n<p>--&gt; EfficientNet-b4 with addition of one more extra layer of adaptive average pooling<br>\n--&gt; Learning rate of 1e-3 * 0.95<br>\n--&gt; Loss function as Cross Entropy Loss<br>\n--&gt; Scheduler as ReduceLROnPlateau<br>\n--&gt; Stochastic Weight averaging<br>\n--&gt; Finally Test Time Augmentation while doing inference </p>\n<p>IN PyTorch getting a score of 82% max on the given dataset<br>\n<a href=\"https://www.kaggle.com/soumochatterjee/cassava-gpu-fmix-efficientnet-b4\" target=\"_blank\">My kernel Link </a></p>\n<p>Can anyone please help me out in telling where I am doing wrong?<br>\nI will be highly thankful</p>",
  "messages": [
    {
      "id": "1110529",
      "postDate": "12/12/2020 20:36:30",
      "content": "<p>Hello All,</p>\n<p>I am unable to understand why I getting such a low score on LB of 0.048 even after using these:</p>\n<p>--&gt; using image size of 256 * 256<br>\n--&gt; following train and validation augmentations with FMix</p>\n<pre><code>if self.is_valid == 1: # transforms for validation images\n            self.aug = albumentations.Compose([\n            albumentations.CenterCrop(256, 256, p=1.),\n            albumentations.Resize(256, 256),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            )], p=1.)\n\n        else:       # transfoms for training images \n            self.aug = albumentations.Compose([\n            albumentations.RandomResizedCrop(256, 256),\n            albumentations.Transpose(p=0.5),\n            albumentations.HorizontalFlip(p=0.5),\n            albumentations.VerticalFlip(p=0.5),\n            albumentations.ShiftScaleRotate(p=0.5),\n            albumentations.HueSaturationValue(\n                hue_shift_limit=0.2, \n                sat_shift_limit=0.2, \n                val_shift_limit=0.2, \n                p=0.5\n            ),\n            albumentations.RandomBrightnessContrast(\n                brightness_limit=(-0.1,0.1), \n                contrast_limit=(-0.1, 0.1), \n                p=0.5\n            ),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            ),\n            albumentations.CoarseDropout(p=0.5),\n            albumentations.Cutout(p=0.5)], p=1.)\n</code></pre>\n<p>--&gt; EfficientNet-b4 with addition of one more extra layer of adaptive average pooling<br>\n--&gt; Learning rate of 1e-3 * 0.95<br>\n--&gt; Loss function as Cross Entropy Loss<br>\n--&gt; Scheduler as ReduceLROnPlateau<br>\n--&gt; Stochastic Weight averaging<br>\n--&gt; Finally Test Time Augmentation while doing inference </p>\n<p>IN PyTorch getting a score of 82% max on the given dataset<br>\n<a href=\"https://www.kaggle.com/soumochatterjee/cassava-gpu-fmix-efficientnet-b4\" target=\"_blank\">My kernel Link </a></p>\n<p>Can anyone please help me out in telling where I am doing wrong?<br>\nI will be highly thankful</p>",
      "rawMarkdown": "Hello All,\n\nI am unable to understand why I getting such a low score on LB of 0.048 even after using these:\n\n--> using image size of 256 * 256\n--> following train and validation augmentations with FMix\n```\nif self.is_valid == 1: # transforms for validation images\n            self.aug = albumentations.Compose([\n            albumentations.CenterCrop(256, 256, p=1.),\n            albumentations.Resize(256, 256),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            )], p=1.)\n\n        else:       # transfoms for training images \n            self.aug = albumentations.Compose([\n            albumentations.RandomResizedCrop(256, 256),\n            albumentations.Transpose(p=0.5),\n            albumentations.HorizontalFlip(p=0.5),\n            albumentations.VerticalFlip(p=0.5),\n            albumentations.ShiftScaleRotate(p=0.5),\n            albumentations.HueSaturationValue(\n                hue_shift_limit=0.2, \n                sat_shift_limit=0.2, \n                val_shift_limit=0.2, \n                p=0.5\n            ),\n            albumentations.RandomBrightnessContrast(\n                brightness_limit=(-0.1,0.1), \n                contrast_limit=(-0.1, 0.1), \n                p=0.5\n            ),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            ),\n            albumentations.CoarseDropout(p=0.5),\n            albumentations.Cutout(p=0.5)], p=1.)\n```\n--> EfficientNet-b4 with addition of one more extra layer of adaptive average pooling\n--> Learning rate of 1e-3 * 0.95\n--> Loss function as Cross Entropy Loss\n--> Scheduler as ReduceLROnPlateau\n--> Stochastic Weight averaging\n--> Finally Test Time Augmentation while doing inference \n\nIN PyTorch getting a score of 82% max on the given dataset\n[My kernel Link ](https://www.kaggle.com/soumochatterjee/cassava-gpu-fmix-efficientnet-b4)\n\nCan anyone please help me out in telling where I am doing wrong?\nI will be highly thankful",
      "votes": null
    },
    {
      "id": "1110700",
      "postDate": "12/13/2020 01:13:59",
      "content": "<p>Hello!<br>\nIs 256 * 256 better than 512 * 512 ?</p>",
      "rawMarkdown": "Hello!\nIs 256 * 256 better than 512 * 512 ?",
      "votes": null
    },
    {
      "id": "1110925",
      "postDate": "12/13/2020 07:52:13",
      "content": "<p>Do check your images after doing all this augmentations and see if it is not giving completely unrecognisable image;<br>\nalso change your  Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) its different in this dataset</p>",
      "rawMarkdown": "Do check your images after doing all this augmentations and see if it is not giving completely unrecognisable image;\nalso change your  Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) its different in this dataset",
      "votes": null
    },
    {
      "id": "1110929",
      "postDate": "12/13/2020 08:01:41",
      "content": "<p><a href=\"https://www.kaggle.com/mrinath\" target=\"_blank\">@mrinath</a> I have posted my kernel here, please have a look to it . I did check my images after setting the custom dataset and what value of mean and standard deviation should I use? Can u please mention it !</p>",
      "rawMarkdown": "mrinath I have posted my kernel here, please have a look to it . I did check my images after setting the custom dataset and what value of mean and standard deviation should I use? Can u please mention it !",
      "votes": null
    },
    {
      "id": "1111078",
      "postDate": "12/13/2020 11:45:10",
      "content": "<p><a href=\"https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/199980\" target=\"_blank\">https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/199980</a><br>\nrefer to this</p>",
      "rawMarkdown": "https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/199980\nrefer to this",
      "votes": null
    },
    {
      "id": "1111149",
      "postDate": "12/13/2020 13:11:24",
      "content": "<p>Only in so far as you can process the smaller size faster (and perhaps can make do with a less deep model), beyond that if computational resources is not the issue, bigger is better. The <a href=\"https://arxiv.org/abs/1905.11946\" target=\"_blank\">efficientnet paper</a> discusses the trade off and ideas for ideal scaling (also for other architectures such as resent).</p>",
      "rawMarkdown": "Only in so far as you can process the smaller size faster (and perhaps can make do with a less deep model), beyond that if computational resources is not the issue, bigger is better. The [efficientnet paper](https://arxiv.org/abs/1905.11946) discusses the trade off and ideas for ideal scaling (also for other architectures such as resent).",
      "votes": null
    },
    {
      "id": "1111302",
      "postDate": "12/13/2020 16:06:06",
      "content": "<p>Your inference is putting all prediction as 0.  There is a bug in your inference (prediction) logic.  Check below thread for the testing dataset profile:<br>\n <a href=\"https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/202943\" target=\"_blank\">https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/202943</a></p>",
      "rawMarkdown": "Your inference is putting all prediction as 0.  There is a bug in your inference (prediction) logic.  Check below thread for the testing dataset profile:\n https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/202943",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1110700,
      "author_name": "zekunn",
      "author_url": "",
      "post_date": "12/13/2020 01:13:59",
      "content": "<p>Hello!<br>\nIs 256 * 256 better than 512 * 512 ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1111149,
          "author_name": "bjoernholzhauer",
          "author_url": "",
          "post_date": "12/13/2020 13:11:24",
          "content": "<p>Only in so far as you can process the smaller size faster (and perhaps can make do with a less deep model), beyond that if computational resources is not the issue, bigger is better. The <a href=\"https://arxiv.org/abs/1905.11946\" target=\"_blank\">efficientnet paper</a> discusses the trade off and ideas for ideal scaling (also for other architectures such as resent).</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1110925,
      "author_name": "mrinath",
      "author_url": "",
      "post_date": "12/13/2020 07:52:13",
      "content": "<p>Do check your images after doing all this augmentations and see if it is not giving completely unrecognisable image;<br>\nalso change your  Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) its different in this dataset</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1110929,
      "author_name": "soumochatterjee",
      "author_url": "",
      "post_date": "12/13/2020 08:01:41",
      "content": "<p><a href=\"https://www.kaggle.com/mrinath\" target=\"_blank\">@mrinath</a> I have posted my kernel here, please have a look to it . I did check my images after setting the custom dataset and what value of mean and standard deviation should I use? Can u please mention it !</p>",
      "votes": null,
      "replies": [
        {
          "id": 1111078,
          "author_name": "mrinath",
          "author_url": "",
          "post_date": "12/13/2020 11:45:10",
          "content": "<p><a href=\"https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/199980\" target=\"_blank\">https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/199980</a><br>\nrefer to this</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1111302,
      "author_name": "luqing2",
      "author_url": "",
      "post_date": "12/13/2020 16:06:06",
      "content": "<p>Your inference is putting all prediction as 0.  There is a bug in your inference (prediction) logic.  Check below thread for the testing dataset profile:<br>\n <a href=\"https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/202943\" target=\"_blank\">https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/202943</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1110529": "Hello All,\n\nI am unable to understand why I getting such a low score on LB of 0.048 even after using these:\n\n--> using image size of 256 * 256\n--> following train and validation augmentations with FMix\n```\nif self.is_valid == 1: # transforms for validation images\n            self.aug = albumentations.Compose([\n            albumentations.CenterCrop(256, 256, p=1.),\n            albumentations.Resize(256, 256),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            )], p=1.)\n\n        else:       # transfoms for training images \n            self.aug = albumentations.Compose([\n            albumentations.RandomResizedCrop(256, 256),\n            albumentations.Transpose(p=0.5),\n            albumentations.HorizontalFlip(p=0.5),\n            albumentations.VerticalFlip(p=0.5),\n            albumentations.ShiftScaleRotate(p=0.5),\n            albumentations.HueSaturationValue(\n                hue_shift_limit=0.2, \n                sat_shift_limit=0.2, \n                val_shift_limit=0.2, \n                p=0.5\n            ),\n            albumentations.RandomBrightnessContrast(\n                brightness_limit=(-0.1,0.1), \n                contrast_limit=(-0.1, 0.1), \n                p=0.5\n            ),\n            albumentations.Normalize(\n                mean=[0.485, 0.456, 0.406], \n                std=[0.229, 0.224, 0.225], \n                max_pixel_value=255.0, \n                p=1.0\n            ),\n            albumentations.CoarseDropout(p=0.5),\n            albumentations.Cutout(p=0.5)], p=1.)\n```\n--> EfficientNet-b4 with addition of one more extra layer of adaptive average pooling\n--> Learning rate of 1e-3 * 0.95\n--> Loss function as Cross Entropy Loss\n--> Scheduler as ReduceLROnPlateau\n--> Stochastic Weight averaging\n--> Finally Test Time Augmentation while doing inference \n\nIN PyTorch getting a score of 82% max on the given dataset\n[My kernel Link ](https://www.kaggle.com/soumochatterjee/cassava-gpu-fmix-efficientnet-b4)\n\nCan anyone please help me out in telling where I am doing wrong?\nI will be highly thankful",
    "1110700": "Hello!\nIs 256 * 256 better than 512 * 512 ?",
    "1110925": "Do check your images after doing all this augmentations and see if it is not giving completely unrecognisable image;\nalso change your  Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) its different in this dataset",
    "1110929": "mrinath I have posted my kernel here, please have a look to it . I did check my images after setting the custom dataset and what value of mean and standard deviation should I use? Can u please mention it !",
    "1111078": "https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/199980\nrefer to this",
    "1111149": "Only in so far as you can process the smaller size faster (and perhaps can make do with a less deep model), beyond that if computational resources is not the issue, bigger is better. The [efficientnet paper](https://arxiv.org/abs/1905.11946) discusses the trade off and ideas for ideal scaling (also for other architectures such as resent).",
    "1111302": "Your inference is putting all prediction as 0.  There is a bug in your inference (prediction) logic.  Check below thread for the testing dataset profile:\n https://www.kaggle.com/c/cassava-leaf-disease-classification/discussion/202943"
  },
  "source": "meta"
}