{
  "id": 236298,
  "title": "broken pixel chemical structural diagram",
  "url": "/competitions/bms-molecular-translation/discussion/236298",
  "author_name": "",
  "post_date": "2021-05-03T18:16:01.212980900Z",
  "votes": 4,
  "comment_count": 3,
  "views": 0,
  "content": "<p><img src=\"https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing\" alt=\"image\"></p>\n<p>how to overcome this? this image has lost much information, so while extracting features in the encoder section it would get information in which lot of information would be absent.</p>\n<p>How to deal with this issue?</p>\n<p>(please follow that link,I don't know why I cannot embed the image in this!<br>\n<a href=\"https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing\" target=\"_blank\">https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing</a>)</p>",
  "messages": [
    {
      "id": "1292192",
      "postDate": "05/03/2021 18:16:01",
      "content": "<p><img src=\"https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing\" alt=\"image\"></p>\n<p>how to overcome this? this image has lost much information, so while extracting features in the encoder section it would get information in which lot of information would be absent.</p>\n<p>How to deal with this issue?</p>\n<p>(please follow that link,I don't know why I cannot embed the image in this!<br>\n<a href=\"https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing\" target=\"_blank\">https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing</a>)</p>",
      "rawMarkdown": "![image](https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing)\n\nhow to overcome this? this image has lost much information, so while extracting features in the encoder section it would get information in which lot of information would be absent.\n\nHow to deal with this issue?\n\n(please follow that link,I don't know why I cannot embed the image in this!\nhttps://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing)",
      "votes": null
    },
    {
      "id": "1292201",
      "postDate": "05/03/2021 18:31:03",
      "content": "<p>this might help… <br>\n<a href=\"https://arxiv.org/pdf/2104.11222.pdf\" target=\"_blank\">https://arxiv.org/pdf/2104.11222.pdf</a>  = ) </p>",
      "rawMarkdown": "this might help... \nhttps://arxiv.org/pdf/2104.11222.pdf  = )",
      "votes": null
    },
    {
      "id": "1292209",
      "postDate": "05/03/2021 18:37:18",
      "content": "<p>Thanks! I guess it might help!</p>",
      "rawMarkdown": "Thanks! I guess it might help!",
      "votes": null
    },
    {
      "id": "1292329",
      "postDate": "05/03/2021 20:50:45",
      "content": "<p>Found out independently some time ago that torchvision torch.Tensor-based resize doesn't give good results. But you can use PIL images directly:</p>\n<p><code>from PIL import Image\nfrom torchvision import transforms\nfrom torchvision.transforms import InterpolationMode\nimg_size = (192, 192);\nimg_transform = transforms.Resize(size=img_size, interpolation=InterpolationMode.LANCZOS);\nimg_conversion = transforms.PILToTensor()</code></p>\n<p>Inside for-loop over all image-paths:<br>\n<code>p_img = Image.open(img_read_path);\np_img = img_transform(p_img);\np_img.save(img_write_path);\nt_img = img_conversion(p_img).to(dtype=torch.float32, device=device)</code></p>\n<p>Why does the code block never work :,(</p>",
      "rawMarkdown": "Found out independently some time ago that torchvision torch.Tensor-based resize doesn't give good results. But you can use PIL images directly:\n\n`from PIL import Image\nfrom torchvision import transforms\nfrom torchvision.transforms import InterpolationMode\nimg_size = (192, 192);\nimg_transform = transforms.Resize(size=img_size, interpolation=InterpolationMode.LANCZOS);\nimg_conversion = transforms.PILToTensor()`\n\nInside for-loop over all image-paths:\n```p_img = Image.open(img_read_path);\np_img = img_transform(p_img);\np_img.save(img_write_path);\nt_img = img_conversion(p_img).to(dtype=torch.float32, device=device)```\n\nWhy does the code block never work :,(",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1292201,
      "author_name": "drhabib",
      "author_url": "",
      "post_date": "05/03/2021 18:31:03",
      "content": "<p>this might help… <br>\n<a href=\"https://arxiv.org/pdf/2104.11222.pdf\" target=\"_blank\">https://arxiv.org/pdf/2104.11222.pdf</a>  = ) </p>",
      "votes": null,
      "replies": [
        {
          "id": 1292209,
          "author_name": "debasish05",
          "author_url": "",
          "post_date": "05/03/2021 18:37:18",
          "content": "<p>Thanks! I guess it might help!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1292329,
          "author_name": "cepheidq",
          "author_url": "",
          "post_date": "05/03/2021 20:50:45",
          "content": "<p>Found out independently some time ago that torchvision torch.Tensor-based resize doesn't give good results. But you can use PIL images directly:</p>\n<p><code>from PIL import Image\nfrom torchvision import transforms\nfrom torchvision.transforms import InterpolationMode\nimg_size = (192, 192);\nimg_transform = transforms.Resize(size=img_size, interpolation=InterpolationMode.LANCZOS);\nimg_conversion = transforms.PILToTensor()</code></p>\n<p>Inside for-loop over all image-paths:<br>\n<code>p_img = Image.open(img_read_path);\np_img = img_transform(p_img);\np_img.save(img_write_path);\nt_img = img_conversion(p_img).to(dtype=torch.float32, device=device)</code></p>\n<p>Why does the code block never work :,(</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1292192": "![image](https://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing)\n\nhow to overcome this? this image has lost much information, so while extracting features in the encoder section it would get information in which lot of information would be absent.\n\nHow to deal with this issue?\n\n(please follow that link,I don't know why I cannot embed the image in this!\nhttps://drive.google.com/file/d/1jGn-CF1s-v-Pwag99KHqCDLmE45p3LXJ/view?usp=sharing)",
    "1292201": "this might help... \nhttps://arxiv.org/pdf/2104.11222.pdf  = )",
    "1292209": "Thanks! I guess it might help!",
    "1292329": "Found out independently some time ago that torchvision torch.Tensor-based resize doesn't give good results. But you can use PIL images directly:\n\n`from PIL import Image\nfrom torchvision import transforms\nfrom torchvision.transforms import InterpolationMode\nimg_size = (192, 192);\nimg_transform = transforms.Resize(size=img_size, interpolation=InterpolationMode.LANCZOS);\nimg_conversion = transforms.PILToTensor()`\n\nInside for-loop over all image-paths:\n```p_img = Image.open(img_read_path);\np_img = img_transform(p_img);\np_img.save(img_write_path);\nt_img = img_conversion(p_img).to(dtype=torch.float32, device=device)```\n\nWhy does the code block never work :,("
  },
  "source": "meta"
}