{
  "id": 343083,
  "title": "Simply Resize may lead to an irreversible mistake ! -- About data size and actual observations (see attached picture)   ",
  "url": "/competitions/mayo-clinic-strip-ai/discussion/343083",
  "author_name": "Leon",
  "post_date": "2022-08-10T00:53:25.958000",
  "votes": 11,
  "comment_count": 9,
  "views": 0,
  "content": "<table>\n<thead>\n<tr>\n<th>These are the two images I downloaded that are very different in size</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>- I used CV2 reading and cropped the same size area using slicing (3000x3000 I remember)</td>\n</tr>\n<tr>\n<td>- What I want to emphasize here is the attention to detail area. From a biomedical perspective, we pay attention to detail;</td>\n</tr>\n<tr>\n<td>- I intentionally visualized the same size cropped images at the same scale; I found that the size of the nucleus and other relevant information in the visual field was almost the same; In other words, in different medical images, although the overall size of the image itself is very different, the number of pixels that constitute each element of the original image is fixed</td>\n</tr>\n<tr>\n<td>- What I want to show here is that direct size renormalization will lead to large changes in the size of the nucleus and other influencing factors in different pictures, which will directly affect the rationality of the input data;</td>\n</tr>\n<tr>\n<td>- From the perspective of medical images, under the premise of resource satisfaction, medical images of different sizes should be directly fed into the neural network with the original size retained; However, it puts forward great demands on computing resources and multi-scale performance of network</td>\n</tr>\n</tbody>\n</table>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F9468132%2F07d3562d8824d0256e82b28ab4b26dcd%2FPV8EIISXKXPT7(MJCN.png?generation=1660092991439758&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 1892225,
      "postDate": "2022-08-10T00:53:25.960Z",
      "content": "<table>\n<thead>\n<tr>\n<th>These are the two images I downloaded that are very different in size</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>- I used CV2 reading and cropped the same size area using slicing (3000x3000 I remember)</td>\n</tr>\n<tr>\n<td>- What I want to emphasize here is the attention to detail area. From a biomedical perspective, we pay attention to detail;</td>\n</tr>\n<tr>\n<td>- I intentionally visualized the same size cropped images at the same scale; I found that the size of the nucleus and other relevant information in the visual field was almost the same; In other words, in different medical images, although the overall size of the image itself is very different, the number of pixels that constitute each element of the original image is fixed</td>\n</tr>\n<tr>\n<td>- What I want to show here is that direct size renormalization will lead to large changes in the size of the nucleus and other influencing factors in different pictures, which will directly affect the rationality of the input data;</td>\n</tr>\n<tr>\n<td>- From the perspective of medical images, under the premise of resource satisfaction, medical images of different sizes should be directly fed into the neural network with the original size retained; However, it puts forward great demands on computing resources and multi-scale performance of network</td>\n</tr>\n</tbody>\n</table>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F9468132%2F07d3562d8824d0256e82b28ab4b26dcd%2FPV8EIISXKXPT7(MJCN.png?generation=1660092991439758&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "| These are the two images I downloaded that are very different in size |\n| ------------------------------------------------------------ |\n| - I used CV2 reading and cropped the same size area using slicing (3000x3000 I remember) |\n| - What I want to emphasize here is the attention to detail area. From a biomedical perspective, we pay attention to detail; |\n| - I intentionally visualized the same size cropped images at the same scale; I found that the size of the nucleus and other relevant information in the visual field was almost the same; In other words, in different medical images, although the overall size of the image itself is very different, the number of pixels that constitute each element of the original image is fixed |\n| - What I want to show here is that direct size renormalization will lead to large changes in the size of the nucleus and other influencing factors in different pictures, which will directly affect the rationality of the input data; |\n| - From the perspective of medical images, under the premise of resource satisfaction, medical images of different sizes should be directly fed into the neural network with the original size retained; However, it puts forward great demands on computing resources and multi-scale performance of network |\n\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F9468132%2F07d3562d8824d0256e82b28ab4b26dcd%2FPV8EIISXKXPT7(MJCN.png?generation=1660092991439758&alt=media)\n\n",
      "votes": 10
    },
    {
      "id": 1953936,
      "postDate": "2022-09-24T21:41:45.737Z",
      "content": "<p>I arrived late, however  slides are acquired with scanners that recognize where there is tissue on a glass slide and scan only the relevant area. So, while the potential area is always the same (about 20x45mm), the scanned area depends on the tissue section(s) position and size. Dimensions will be always different, but of course, resolution remains the same (the dataset paper does not mention it, but with the scanner they used, it is 0.25 or 0.50 micron/pixel, likely 0.25). Definitely, if you resize, it should be in the same way for each slide. </p>",
      "rawMarkdown": "I arrived late, however  slides are acquired with scanners that recognize where there is tissue on a glass slide and scan only the relevant area. So, while the potential area is always the same (about 20x45mm), the scanned area depends on the tissue section(s) position and size. Dimensions will be always different, but of course, resolution remains the same (the dataset paper does not mention it, but with the scanner they used, it is 0.25 or 0.50 micron/pixel, likely 0.25). Definitely, if you resize, it should be in the same way for each slide. ",
      "votes": 1
    },
    {
      "id": 1893528,
      "postDate": "2022-08-10T22:22:58.113Z",
      "content": "<p>If the classification happens based on <strong>details</strong>, normal attention mechanism won't work well since it more focuses on global aspects (I feel like it is almost similar to see a dull image of tissues).  Also, if we only care about details, I guess that slicing the gigantic image into a smaller patches may be a nice idea to try. My concerns are that \"patchifying\" will destroy a global features of each original image. Furthermore, we still have limited amount of resource to fit all these patches. And we cannot assure whether we feed <strong>meaningful</strong> patches from the original image into a network to classify CE or LAA. In this sense, background on each image is definitely hard to deal with. Anyway, I agree that we should focus on the balance between image detail and image size.</p>",
      "rawMarkdown": "If the classification happens based on **details**, normal attention mechanism won't work well since it more focuses on global aspects (I feel like it is almost similar to see a dull image of tissues).  Also, if we only care about details, I guess that slicing the gigantic image into a smaller patches may be a nice idea to try. My concerns are that \"patchifying\" will destroy a global features of each original image. Furthermore, we still have limited amount of resource to fit all these patches. And we cannot assure whether we feed **meaningful** patches from the original image into a network to classify CE or LAA. In this sense, background on each image is definitely hard to deal with. Anyway, I agree that we should focus on the balance between image detail and image size.",
      "votes": 2,
      "replies": [
        {
          "id": 1893642,
          "postDate": "2022-08-11T00:28:22.110Z",
          "content": "<table>\n<thead>\n<tr>\n<th>In fact, I personally think we should start from the details to complete this competition, for the following reasons</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>- In fact, the data image of this time has no obvious correlation in shape due to the different angles in the actual framing, so we cannot solve the problem from the shape</td>\n</tr>\n<tr>\n<td>- In fact, due to the different reagents used in the shape of the data image this time, there is no obvious correlation in the color, so we cannot solve the problem from the color</td>\n</tr>\n<tr>\n<td>- So the key element I think is texture; In other words, we should start with the details</td>\n</tr>\n</tbody>\n</table>",
          "rawMarkdown": "| In fact, I personally think we should start from the details to complete this competition, for the following reasons |\n| ------------------------------------------------------------ |\n| \\- In fact, the data image of this time has no obvious correlation in shape due to the different angles in the actual framing, so we cannot solve the problem from the shape |\n| \\- In fact, due to the different reagents used in the shape of the data image this time, there is no obvious correlation in the color, so we cannot solve the problem from the color |\n| - So the key element I think is texture; In other words, we should start with the details |"
        }
      ]
    },
    {
      "id": 1903601,
      "postDate": "2022-08-17T14:16:29.493Z",
      "content": "<p>good looking out.  The resizing is a compounding factor.  And it's confusing that the images aren't symmetric - I've never had to deal with that before.</p>",
      "rawMarkdown": "good looking out.  The resizing is a compounding factor.  And it's confusing that the images aren't symmetric - I've never had to deal with that before.",
      "replies": [
        {
          "id": 1903726,
          "postDate": "2022-08-17T15:50:28.197Z",
          "content": "<p>You mean the size of each sample is different, right？</p>",
          "rawMarkdown": "You mean the size of each sample is different, right？"
        }
      ]
    },
    {
      "id": 1892652,
      "postDate": "2022-08-10T08:25:42.993Z",
      "content": "<p>Interesting and helpful post. Thanks for sharing!</p>",
      "rawMarkdown": "Interesting and helpful post. Thanks for sharing!",
      "replies": [
        {
          "id": 1892658,
          "postDate": "2022-08-10T08:29:13.927Z",
          "content": "<p>Also hope that our thoughts and findings can be shared here; Make Kaggle more and more transparent and meaningful, and build an information analysis and capacity improvement platform for data scientists.</p>",
          "rawMarkdown": "Also hope that our thoughts and findings can be shared here; Make Kaggle more and more transparent and meaningful, and build an information analysis and capacity improvement platform for data scientists."
        }
      ]
    },
    {
      "id": 1892300,
      "postDate": "2022-08-10T02:52:25.570Z",
      "content": "<p>Thank you for sharing your findings. Currently I'm also exploring the distribution of background in the images and I found similar results when it comes to the sizes. But about the normalization though, do you have any suggestions in this part?</p>",
      "rawMarkdown": "Thank you for sharing your findings. Currently I'm also exploring the distribution of background in the images and I found similar results when it comes to the sizes. But about the normalization though, do you have any suggestions in this part?",
      "replies": [
        {
          "id": 1892302,
          "postDate": "2022-08-10T02:57:32.257Z",
          "content": "<ul>\n<li><p>For normalization, I feel that the image may be affected by the staining solution during the actual sampling process, which may lead to color differences. This point may be considered in the normalization idea</p></li>\n<li><p>However, I feel that in this competition, the actual outcome of the project may be more effectively affected by focusing on the balance between image detail, image size and the model structure itself; Therefore, I focused on image detail processing and network structure design as much as possible</p></li>\n</ul>",
          "rawMarkdown": "- For normalization, I feel that the image may be affected by the staining solution during the actual sampling process, which may lead to color differences. This point may be considered in the normalization idea\n\n- However, I feel that in this competition, the actual outcome of the project may be more effectively affected by focusing on the balance between image detail, image size and the model structure itself; Therefore, I focused on image detail processing and network structure design as much as possible\n\n "
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1953936,
      "author_name": "MITEL-UNIUD",
      "author_url": "",
      "post_date": "2022-09-24T21:41:45.737000",
      "content": "<p>I arrived late, however  slides are acquired with scanners that recognize where there is tissue on a glass slide and scan only the relevant area. So, while the potential area is always the same (about 20x45mm), the scanned area depends on the tissue section(s) position and size. Dimensions will be always different, but of course, resolution remains the same (the dataset paper does not mention it, but with the scanner they used, it is 0.25 or 0.50 micron/pixel, likely 0.25). Definitely, if you resize, it should be in the same way for each slide. </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1893528,
      "author_name": "hjunlee941",
      "author_url": "",
      "post_date": "2022-08-10T22:22:58.113000",
      "content": "<p>If the classification happens based on <strong>details</strong>, normal attention mechanism won't work well since it more focuses on global aspects (I feel like it is almost similar to see a dull image of tissues).  Also, if we only care about details, I guess that slicing the gigantic image into a smaller patches may be a nice idea to try. My concerns are that \"patchifying\" will destroy a global features of each original image. Furthermore, we still have limited amount of resource to fit all these patches. And we cannot assure whether we feed <strong>meaningful</strong> patches from the original image into a network to classify CE or LAA. In this sense, background on each image is definitely hard to deal with. Anyway, I agree that we should focus on the balance between image detail and image size.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1893642,
          "author_name": "Leon",
          "author_url": "",
          "post_date": "2022-08-11T00:28:22.110000",
          "content": "<table>\n<thead>\n<tr>\n<th>In fact, I personally think we should start from the details to complete this competition, for the following reasons</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>- In fact, the data image of this time has no obvious correlation in shape due to the different angles in the actual framing, so we cannot solve the problem from the shape</td>\n</tr>\n<tr>\n<td>- In fact, due to the different reagents used in the shape of the data image this time, there is no obvious correlation in the color, so we cannot solve the problem from the color</td>\n</tr>\n<tr>\n<td>- So the key element I think is texture; In other words, we should start with the details</td>\n</tr>\n</tbody>\n</table>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1903601,
      "author_name": "mbmlearner",
      "author_url": "",
      "post_date": "2022-08-17T14:16:29.493000",
      "content": "<p>good looking out.  The resizing is a compounding factor.  And it's confusing that the images aren't symmetric - I've never had to deal with that before.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1903726,
          "author_name": "Leon",
          "author_url": "",
          "post_date": "2022-08-17T15:50:28.197000",
          "content": "<p>You mean the size of each sample is different, right？</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1892652,
      "author_name": "jcerpent",
      "author_url": "",
      "post_date": "2022-08-10T08:25:42.993000",
      "content": "<p>Interesting and helpful post. Thanks for sharing!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1892658,
          "author_name": "Leon",
          "author_url": "",
          "post_date": "2022-08-10T08:29:13.927000",
          "content": "<p>Also hope that our thoughts and findings can be shared here; Make Kaggle more and more transparent and meaningful, and build an information analysis and capacity improvement platform for data scientists.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1892300,
      "author_name": "Phan Nguyen",
      "author_url": "",
      "post_date": "2022-08-10T02:52:25.570000",
      "content": "<p>Thank you for sharing your findings. Currently I'm also exploring the distribution of background in the images and I found similar results when it comes to the sizes. But about the normalization though, do you have any suggestions in this part?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1892302,
          "author_name": "Leon",
          "author_url": "",
          "post_date": "2022-08-10T02:57:32.257000",
          "content": "<ul>\n<li><p>For normalization, I feel that the image may be affected by the staining solution during the actual sampling process, which may lead to color differences. This point may be considered in the normalization idea</p></li>\n<li><p>However, I feel that in this competition, the actual outcome of the project may be more effectively affected by focusing on the balance between image detail, image size and the model structure itself; Therefore, I focused on image detail processing and network structure design as much as possible</p></li>\n</ul>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1892225": "| These are the two images I downloaded that are very different in size |\n| ------------------------------------------------------------ |\n| - I used CV2 reading and cropped the same size area using slicing (3000x3000 I remember) |\n| - What I want to emphasize here is the attention to detail area. From a biomedical perspective, we pay attention to detail; |\n| - I intentionally visualized the same size cropped images at the same scale; I found that the size of the nucleus and other relevant information in the visual field was almost the same; In other words, in different medical images, although the overall size of the image itself is very different, the number of pixels that constitute each element of the original image is fixed |\n| - What I want to show here is that direct size renormalization will lead to large changes in the size of the nucleus and other influencing factors in different pictures, which will directly affect the rationality of the input data; |\n| - From the perspective of medical images, under the premise of resource satisfaction, medical images of different sizes should be directly fed into the neural network with the original size retained; However, it puts forward great demands on computing resources and multi-scale performance of network |\n\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F9468132%2F07d3562d8824d0256e82b28ab4b26dcd%2FPV8EIISXKXPT7(MJCN.png?generation=1660092991439758&alt=media)\n\n",
    "1953936": "I arrived late, however  slides are acquired with scanners that recognize where there is tissue on a glass slide and scan only the relevant area. So, while the potential area is always the same (about 20x45mm), the scanned area depends on the tissue section(s) position and size. Dimensions will be always different, but of course, resolution remains the same (the dataset paper does not mention it, but with the scanner they used, it is 0.25 or 0.50 micron/pixel, likely 0.25). Definitely, if you resize, it should be in the same way for each slide. ",
    "1893528": "If the classification happens based on **details**, normal attention mechanism won't work well since it more focuses on global aspects (I feel like it is almost similar to see a dull image of tissues).  Also, if we only care about details, I guess that slicing the gigantic image into a smaller patches may be a nice idea to try. My concerns are that \"patchifying\" will destroy a global features of each original image. Furthermore, we still have limited amount of resource to fit all these patches. And we cannot assure whether we feed **meaningful** patches from the original image into a network to classify CE or LAA. In this sense, background on each image is definitely hard to deal with. Anyway, I agree that we should focus on the balance between image detail and image size.",
    "1903601": "good looking out.  The resizing is a compounding factor.  And it's confusing that the images aren't symmetric - I've never had to deal with that before.",
    "1892652": "Interesting and helpful post. Thanks for sharing!",
    "1892300": "Thank you for sharing your findings. Currently I'm also exploring the distribution of background in the images and I found similar results when it comes to the sizes. But about the normalization though, do you have any suggestions in this part?"
  }
}