{
  "id": 215238,
  "title": "resized dataset(512x512, 768x768)",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/215238",
  "author_name": "phalanx",
  "post_date": "2021-01-29T07:28:12.143000",
  "votes": 44,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I created resized dataset(PNG) for this competition.<br>\nfile name is same as original dataset.<br>\nfile name: <code>{ID}_{red/green/blue/yellow}.png</code></p>\n<p>512x512 resized dataset: <a href=\"https://www.kaggle.com/phalanx/hpa-512512\" target=\"_blank\">https://www.kaggle.com/phalanx/hpa-512512</a><br>\n768x768 resized dataset: <a href=\"https://www.kaggle.com/phalanx/hpa-768768\" target=\"_blank\">https://www.kaggle.com/phalanx/hpa-768768</a></p>\n<p>code used to create dataset is as follows:</p>\n<pre><code>import os\nfrom tqdm import tqdm\n\nimport pandas as pd\nimport cv2\n\ndf = pd.read_csv('../input/train.csv')\nX = df['ID']\nX = [os.path.join('../input/train/', i) for i in X]\nimage_size = 512 # 768\n\nfor x in tqdm(X):\n    save_name = x.split('/')[-1]\n\n    red = cv2.imread(x+'_red.png')[..., 0]\n    red = cv2.resize(red, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_red.png', red)\n\n    green = cv2.imread(x+'_green.png')[..., 0]\n    green = cv2.resize(green, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_green.png', green)\n\n    blue = cv2.imread(x+'_blue.png')[..., 0]\n    blue = cv2.resize(blue, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_blue.png', blue)\n\n    yellow = cv2.imread(x+'_yellow.png')[..., 0]\n    yellow = cv2.resize(yellow, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_yellow.png', yellow)\n</code></pre>",
  "messages": [
    {
      "id": 1175464,
      "postDate": "2021-01-29T07:28:12.143Z",
      "content": "<p>I created resized dataset(PNG) for this competition.<br>\nfile name is same as original dataset.<br>\nfile name: <code>{ID}_{red/green/blue/yellow}.png</code></p>\n<p>512x512 resized dataset: <a href=\"https://www.kaggle.com/phalanx/hpa-512512\" target=\"_blank\">https://www.kaggle.com/phalanx/hpa-512512</a><br>\n768x768 resized dataset: <a href=\"https://www.kaggle.com/phalanx/hpa-768768\" target=\"_blank\">https://www.kaggle.com/phalanx/hpa-768768</a></p>\n<p>code used to create dataset is as follows:</p>\n<pre><code>import os\nfrom tqdm import tqdm\n\nimport pandas as pd\nimport cv2\n\ndf = pd.read_csv('../input/train.csv')\nX = df['ID']\nX = [os.path.join('../input/train/', i) for i in X]\nimage_size = 512 # 768\n\nfor x in tqdm(X):\n    save_name = x.split('/')[-1]\n\n    red = cv2.imread(x+'_red.png')[..., 0]\n    red = cv2.resize(red, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_red.png', red)\n\n    green = cv2.imread(x+'_green.png')[..., 0]\n    green = cv2.resize(green, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_green.png', green)\n\n    blue = cv2.imread(x+'_blue.png')[..., 0]\n    blue = cv2.resize(blue, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_blue.png', blue)\n\n    yellow = cv2.imread(x+'_yellow.png')[..., 0]\n    yellow = cv2.resize(yellow, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_yellow.png', yellow)\n</code></pre>",
      "rawMarkdown": "I created resized dataset(PNG) for this competition.\nfile name is same as original dataset.\nfile name: `{ID}_{red/green/blue/yellow}.png`\n\n512x512 resized dataset: [https://www.kaggle.com/phalanx/hpa-512512](https://www.kaggle.com/phalanx/hpa-512512)\n768x768 resized dataset: [https://www.kaggle.com/phalanx/hpa-768768](https://www.kaggle.com/phalanx/hpa-768768)\n\ncode used to create dataset is as follows:\n```\nimport os\nfrom tqdm import tqdm\n\nimport pandas as pd\nimport cv2\n\ndf = pd.read_csv('../input/train.csv')\nX = df['ID']\nX = [os.path.join('../input/train/', i) for i in X]\nimage_size = 512 # 768\n\nfor x in tqdm(X):\n    save_name = x.split('/')[-1]\n\n    red = cv2.imread(x+'_red.png')[..., 0]\n    red = cv2.resize(red, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_red.png', red)\n\n    green = cv2.imread(x+'_green.png')[..., 0]\n    green = cv2.resize(green, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_green.png', green)\n\n    blue = cv2.imread(x+'_blue.png')[..., 0]\n    blue = cv2.resize(blue, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_blue.png', blue)\n\n    yellow = cv2.imread(x+'_yellow.png')[..., 0]\n    yellow = cv2.resize(yellow, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_yellow.png', yellow)\n```",
      "votes": 43
    },
    {
      "id": 1176777,
      "postDate": "2021-01-29T19:26:37.460Z",
      "content": "<p>I just love seeing your work, inspirational with so many fantastic intriguing ideas. Thanks for sharing once again!</p>",
      "rawMarkdown": "I just love seeing your work, inspirational with so many fantastic intriguing ideas. Thanks for sharing once again!"
    },
    {
      "id": 1176215,
      "postDate": "2021-01-29T14:44:20.020Z",
      "content": "<p>Thanks !</p>\n<p>You spelled image_size as imaeg_size. Was this on purpose or just a typo when copied over to the discussion forum. </p>",
      "rawMarkdown": "Thanks !\n\nYou spelled image_size as imaeg_size. Was this on purpose or just a typo when copied over to the discussion forum. ",
      "replies": [
        {
          "id": 1176239,
          "postDate": "2021-01-29T14:50:02.373Z",
          "content": "<p>sorry, just typo.</p>",
          "rawMarkdown": "sorry, just typo.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1175591,
      "postDate": "2021-01-29T08:37:18.663Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1176777,
      "author_name": "Andy Jian Zhou",
      "author_url": "",
      "post_date": "2021-01-29T19:26:37.460000",
      "content": "<p>I just love seeing your work, inspirational with so many fantastic intriguing ideas. Thanks for sharing once again!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1176215,
      "author_name": "Darien Schettler",
      "author_url": "",
      "post_date": "2021-01-29T14:44:20.020000",
      "content": "<p>Thanks !</p>\n<p>You spelled image_size as imaeg_size. Was this on purpose or just a typo when copied over to the discussion forum. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1176239,
          "author_name": "phalanx",
          "author_url": "",
          "post_date": "2021-01-29T14:50:02.373000",
          "content": "<p>sorry, just typo.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1175591,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-01-29T08:37:18.663000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1175464": "I created resized dataset(PNG) for this competition.\nfile name is same as original dataset.\nfile name: `{ID}_{red/green/blue/yellow}.png`\n\n512x512 resized dataset: [https://www.kaggle.com/phalanx/hpa-512512](https://www.kaggle.com/phalanx/hpa-512512)\n768x768 resized dataset: [https://www.kaggle.com/phalanx/hpa-768768](https://www.kaggle.com/phalanx/hpa-768768)\n\ncode used to create dataset is as follows:\n```\nimport os\nfrom tqdm import tqdm\n\nimport pandas as pd\nimport cv2\n\ndf = pd.read_csv('../input/train.csv')\nX = df['ID']\nX = [os.path.join('../input/train/', i) for i in X]\nimage_size = 512 # 768\n\nfor x in tqdm(X):\n    save_name = x.split('/')[-1]\n\n    red = cv2.imread(x+'_red.png')[..., 0]\n    red = cv2.resize(red, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_red.png', red)\n\n    green = cv2.imread(x+'_green.png')[..., 0]\n    green = cv2.resize(green, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_green.png', green)\n\n    blue = cv2.imread(x+'_blue.png')[..., 0]\n    blue = cv2.resize(blue, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_blue.png', blue)\n\n    yellow = cv2.imread(x+'_yellow.png')[..., 0]\n    yellow = cv2.resize(yellow, (image_size, image_size))\n    cv2.imwrite(f'{save_name}_yellow.png', yellow)\n```",
    "1176777": "I just love seeing your work, inspirational with so many fantastic intriguing ideas. Thanks for sharing once again!",
    "1176215": "Thanks !\n\nYou spelled image_size as imaeg_size. Was this on purpose or just a typo when copied over to the discussion forum. ",
    "1175591": ""
  }
}