{
  "id": 76678,
  "title": "Can not get ResNet working in the right way",
  "url": "/competitions/human-protein-atlas-image-classification/discussion/76678",
  "author_name": "",
  "post_date": "2019-01-05T14:24:07.376066400Z",
  "votes": 4,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hi, everyone, I have tried ResNet18, ResNet34, ResNet50 with HPA external data.\nResNet50 performs best but it can only get 0.52 LB(without TTA/ensemble, leak). It has quite a big gap with the results in discussion threads, like results in <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75640\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75640</a></p>\n\n<p>Here is what I do:\n1. 512*512 + focal loss (I have also tried bce loss, but gives almost same result)\n2. oversample (from @brian)\n3. external data: download 4 channel jpg and process them by using methods in  <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75691#446302\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75691#446302</a>. i.e. straight copy of the corresponding channels, adding R+G for yellow\n4. read image by using opencv (BGR)\n5. use optimal threshold search on validation set\n6. data augmentation</p>\n\n<p>Hope someone can give me some hints about what I have been missing? How can I better train my model? Thanks.</p>",
  "messages": [
    {
      "id": "450684",
      "postDate": "01/05/2019 14:24:07",
      "content": "<p>Hi, everyone, I have tried ResNet18, ResNet34, ResNet50 with HPA external data.\nResNet50 performs best but it can only get 0.52 LB(without TTA/ensemble, leak). It has quite a big gap with the results in discussion threads, like results in <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75640\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75640</a></p>\n\n<p>Here is what I do:\n1. 512*512 + focal loss (I have also tried bce loss, but gives almost same result)\n2. oversample (from @brian)\n3. external data: download 4 channel jpg and process them by using methods in  <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75691#446302\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75691#446302</a>. i.e. straight copy of the corresponding channels, adding R+G for yellow\n4. read image by using opencv (BGR)\n5. use optimal threshold search on validation set\n6. data augmentation</p>\n\n<p>Hope someone can give me some hints about what I have been missing? How can I better train my model? Thanks.</p>",
      "rawMarkdown": "Hi, everyone, I have tried ResNet18, ResNet34, ResNet50 with HPA external data.\nResNet50 performs best but it can only get 0.52 LB(without TTA/ensemble, leak). It has quite a big gap with the results in discussion threads, like results in https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75640\n\nHere is what I do:\n1. 512*512 + focal loss (I have also tried bce loss, but gives almost same result)\n2. oversample (from @brian)\n3. external data: download 4 channel jpg and process them by using methods in  https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75691#446302. i.e. straight copy of the corresponding channels, adding R+G for yellow\n4. read image by using opencv (BGR)\n5. use optimal threshold search on validation set\n6. data augmentation\n\nHope someone can give me some hints about what I have been missing? How can I better train my model? Thanks.",
      "votes": null
    },
    {
      "id": "450846",
      "postDate": "01/05/2019 23:17:01",
      "content": "<p>Did you try to threshold at 0.3? Because I was getting similar scores using thresholds from the validation and got a 0.02 boost using 0.3.</p>\n\n<p>Not sure if it's a good idea to go with a threshold that performs better on LB instead of CV though</p>",
      "rawMarkdown": "Did you try to threshold at 0.3? Because I was getting similar scores using thresholds from the validation and got a 0.02 boost using 0.3.\n\nNot sure if it's a good idea to go with a threshold that performs better on LB instead of CV though",
      "votes": null
    },
    {
      "id": "450877",
      "postDate": "01/06/2019 01:43:06",
      "content": "<p>thanks for your reply. \nI have tried different flat threshold, but it decrease performance. I think that I must have missed something important.</p>",
      "rawMarkdown": "thanks for your reply. \nI have tried different flat threshold, but it decrease performance. I think that I must have missed something important.",
      "votes": null
    },
    {
      "id": "450902",
      "postDate": "01/06/2019 03:21:41",
      "content": "<p>Be careful about combining color channels, they are not really \"colors\" per se. \nSee these comments by Tilii, I found them very helpful</p>\n\n<p><a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/72895\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/72895</a></p>",
      "rawMarkdown": "Be careful about combining color channels, they are not really \"colors\" per se. \nSee these comments by Tilii, I found them very helpful\n\nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/72895",
      "votes": null
    },
    {
      "id": "450937",
      "postDate": "01/06/2019 05:21:41",
      "content": "<p>why adding R+G for yellow since we have yellow channel?</p>",
      "rawMarkdown": "why adding R+G for yellow since we have yellow channel?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 450846,
      "author_name": "dr1t10",
      "author_url": "",
      "post_date": "01/05/2019 23:17:01",
      "content": "<p>Did you try to threshold at 0.3? Because I was getting similar scores using thresholds from the validation and got a 0.02 boost using 0.3.</p>\n\n<p>Not sure if it's a good idea to go with a threshold that performs better on LB instead of CV though</p>",
      "votes": null,
      "replies": [
        {
          "id": 450877,
          "author_name": "yiwei2016",
          "author_url": "",
          "post_date": "01/06/2019 01:43:06",
          "content": "<p>thanks for your reply. \nI have tried different flat threshold, but it decrease performance. I think that I must have missed something important.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 450902,
      "author_name": "bkosar1640",
      "author_url": "",
      "post_date": "01/06/2019 03:21:41",
      "content": "<p>Be careful about combining color channels, they are not really \"colors\" per se. \nSee these comments by Tilii, I found them very helpful</p>\n\n<p><a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/72895\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/72895</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 450937,
      "author_name": "zhangmiao",
      "author_url": "",
      "post_date": "01/06/2019 05:21:41",
      "content": "<p>why adding R+G for yellow since we have yellow channel?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "450684": "Hi, everyone, I have tried ResNet18, ResNet34, ResNet50 with HPA external data.\nResNet50 performs best but it can only get 0.52 LB(without TTA/ensemble, leak). It has quite a big gap with the results in discussion threads, like results in https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75640\n\nHere is what I do:\n1. 512*512 + focal loss (I have also tried bce loss, but gives almost same result)\n2. oversample (from @brian)\n3. external data: download 4 channel jpg and process them by using methods in  https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/75691#446302. i.e. straight copy of the corresponding channels, adding R+G for yellow\n4. read image by using opencv (BGR)\n5. use optimal threshold search on validation set\n6. data augmentation\n\nHope someone can give me some hints about what I have been missing? How can I better train my model? Thanks.",
    "450846": "Did you try to threshold at 0.3? Because I was getting similar scores using thresholds from the validation and got a 0.02 boost using 0.3.\n\nNot sure if it's a good idea to go with a threshold that performs better on LB instead of CV though",
    "450877": "thanks for your reply. \nI have tried different flat threshold, but it decrease performance. I think that I must have missed something important.",
    "450902": "Be careful about combining color channels, they are not really \"colors\" per se. \nSee these comments by Tilii, I found them very helpful\n\nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/72895",
    "450937": "why adding R+G for yellow since we have yellow channel?"
  },
  "source": "meta"
}