{
  "id": 166198,
  "title": "cv 0.89+ but lb 0.76",
  "url": "/competitions/prostate-cancer-grade-assessment/discussion/166198",
  "author_name": "rivers",
  "post_date": "2020-07-12T06:16:01.758000",
  "votes": 2,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I am trying to reproduce Ha's notebook, the only differences are follows:\n1. I set batchsize to 7 because of memory;\n2. I create a dataset for training using:\n    tiff_file = os.path.join(image_folder, f'{img_id}.tiff')\n    image = skimage.io.MultiImage(tiff_file)[1]\n    cv2.imwrite(save_dir + img_id + '.png', image)\nI don't know what's wrong</p>",
  "messages": [
    {
      "id": 935401,
      "postDate": "2020-07-19T11:06:31.590Z",
      "content": "<p>After struggling for a few days, I did an experiment:\n+ Firstly, during the inference process, I used Ha's public model checkpoint but created and used a png format dataset, I got a 0.62 LB\n+ Secondly, I used my locally trained model checkpoint, and created a png format dataset  and used it during the inference process, I got a 0.87 LB\n😑 </p>",
      "rawMarkdown": "After struggling for a few days, I did an experiment:\n+ Firstly, during the inference process, I used Ha's public model checkpoint but created and used a png format dataset, I got a 0.62 LB\n+ Secondly, I used my locally trained model checkpoint, and created a png format dataset  and used it during the inference process, I got a 0.87 LB\n😑 ",
      "votes": 1
    },
    {
      "id": 927973,
      "postDate": "2020-07-13T17:02:44.353Z",
      "content": "<p>Possible reasons:\n* Leakage between training set and CV\n* Bug at inference (model in training mode, different preprocess etc.)</p>",
      "rawMarkdown": "Possible reasons:\n* Leakage between training set and CV\n* Bug at inference (model in training mode, different preprocess etc.)",
      "votes": 1,
      "replies": [
        {
          "id": 928519,
          "postDate": "2020-07-14T04:02:54.397Z",
          "content": "<p>thank you, I will check it</p>",
          "rawMarkdown": "thank you, I will check it"
        }
      ]
    },
    {
      "id": 925511,
      "postDate": "2020-07-12T06:16:01.757Z",
      "content": "<p>I am trying to reproduce Ha's notebook, the only differences are follows:\n1. I set batchsize to 7 because of memory;\n2. I create a dataset for training using:\n    tiff_file = os.path.join(image_folder, f'{img_id}.tiff')\n    image = skimage.io.MultiImage(tiff_file)[1]\n    cv2.imwrite(save_dir + img_id + '.png', image)\nI don't know what's wrong</p>",
      "rawMarkdown": "I am trying to reproduce Ha's notebook, the only differences are follows:\n1. I set batchsize to 7 because of memory;\n2. I create a dataset for training using:\n    tiff_file = os.path.join(image_folder, f'{img_id}.tiff')\n    image = skimage.io.MultiImage(tiff_file)[1]\n    cv2.imwrite(save_dir + img_id + '.png', image)\nI don't know what's wrong",
      "votes": 2
    },
    {
      "id": 1163913,
      "postDate": "2021-01-22T03:51:56.933Z",
      "content": "<p>I made a mistake because of not familiar with OpenCV, the key point is \"skimage.io.imread loads image as RGB (or RGBA), but OpenCV assumes the image to be BGR or BGRA (BGR is the default OpenCV colour format).\"<br>\nsee <a href=\"url\" target=\"_blank\">https://stackoverflow.com/questions/42406338/why-cv2-imwrite-changes-the-color-of-pics/42406781</a></p>",
      "rawMarkdown": "I made a mistake because of not familiar with OpenCV, the key point is \"skimage.io.imread loads image as RGB (or RGBA), but OpenCV assumes the image to be BGR or BGRA (BGR is the default OpenCV colour format).\"\nsee [https://stackoverflow.com/questions/42406338/why-cv2-imwrite-changes-the-color-of-pics/42406781](url)"
    },
    {
      "id": 927834,
      "postDate": "2020-07-13T15:47:07.670Z",
      "content": "<p>At the end of the day CV only matters</p>",
      "rawMarkdown": "At the end of the day CV only matters",
      "replies": [
        {
          "id": 928518,
          "postDate": "2020-07-14T04:02:23.907Z",
          "content": "<p>thank you</p>",
          "rawMarkdown": "thank you"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 935401,
      "author_name": "rivers",
      "author_url": "",
      "post_date": "2020-07-19T11:06:31.590000",
      "content": "<p>After struggling for a few days, I did an experiment:\n+ Firstly, during the inference process, I used Ha's public model checkpoint but created and used a png format dataset, I got a 0.62 LB\n+ Secondly, I used my locally trained model checkpoint, and created a png format dataset  and used it during the inference process, I got a 0.87 LB\n😑 </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 927973,
      "author_name": "Arnaud Roussel",
      "author_url": "",
      "post_date": "2020-07-13T17:02:44.353000",
      "content": "<p>Possible reasons:\n* Leakage between training set and CV\n* Bug at inference (model in training mode, different preprocess etc.)</p>",
      "votes": 1,
      "replies": [
        {
          "id": 928519,
          "author_name": "rivers",
          "author_url": "",
          "post_date": "2020-07-14T04:02:54.397000",
          "content": "<p>thank you, I will check it</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1163913,
      "author_name": "rivers",
      "author_url": "",
      "post_date": "2021-01-22T03:51:56.933000",
      "content": "<p>I made a mistake because of not familiar with OpenCV, the key point is \"skimage.io.imread loads image as RGB (or RGBA), but OpenCV assumes the image to be BGR or BGRA (BGR is the default OpenCV colour format).\"<br>\nsee <a href=\"url\" target=\"_blank\">https://stackoverflow.com/questions/42406338/why-cv2-imwrite-changes-the-color-of-pics/42406781</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 927834,
      "author_name": "Kurian Benoy",
      "author_url": "",
      "post_date": "2020-07-13T15:47:07.670000",
      "content": "<p>At the end of the day CV only matters</p>",
      "votes": 0,
      "replies": [
        {
          "id": 928518,
          "author_name": "rivers",
          "author_url": "",
          "post_date": "2020-07-14T04:02:23.907000",
          "content": "<p>thank you</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "935401": "After struggling for a few days, I did an experiment:\n+ Firstly, during the inference process, I used Ha's public model checkpoint but created and used a png format dataset, I got a 0.62 LB\n+ Secondly, I used my locally trained model checkpoint, and created a png format dataset  and used it during the inference process, I got a 0.87 LB\n😑 ",
    "927973": "Possible reasons:\n* Leakage between training set and CV\n* Bug at inference (model in training mode, different preprocess etc.)",
    "925511": "I am trying to reproduce Ha's notebook, the only differences are follows:\n1. I set batchsize to 7 because of memory;\n2. I create a dataset for training using:\n    tiff_file = os.path.join(image_folder, f'{img_id}.tiff')\n    image = skimage.io.MultiImage(tiff_file)[1]\n    cv2.imwrite(save_dir + img_id + '.png', image)\nI don't know what's wrong",
    "1163913": "I made a mistake because of not familiar with OpenCV, the key point is \"skimage.io.imread loads image as RGB (or RGBA), but OpenCV assumes the image to be BGR or BGRA (BGR is the default OpenCV colour format).\"\nsee [https://stackoverflow.com/questions/42406338/why-cv2-imwrite-changes-the-color-of-pics/42406781](url)",
    "927834": "At the end of the day CV only matters"
  }
}