{
  "id": 135559,
  "title": "FastAi unable to get scored",
  "url": "/competitions/bengaliai-cv19/discussion/135559",
  "author_name": "",
  "post_date": "2020-03-14T14:54:40.836727400Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p><em><a href=\"https://www.kaggle.com/tanmaymaloo/final-bengali\">https://www.kaggle.com/tanmaymaloo/final-bengali</a></em>\nIn the notebook above I used the 3 different learned models for prediction of each feature of the image. But I think because I am converting all parquet files at once into the image and then using it for prediction is too memory consuming...\nTherefore, I used another method (Kind of jugaad) which is also clearly not working.\n<em><a href=\"https://www.kaggle.com/tanmaymaloo/fork-of-final-bengali-fe31e3\">https://www.kaggle.com/tanmaymaloo/fork-of-final-bengali-fe31e3</a></em>\nIn[24]: which is commented right now is giving the correct result and also memory efficient but taking more the 2 hrs which I think because I am converting each array in parquet file into an image -&gt; using open_image -&gt; prediction.\nNow, at last, I think to eliminate the step of saving each image and using open_image instead i used.\n*img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB);\n  img_fastai = Image(pil2tensor(img, dtype=np.uint8))*\nAfter all preprocessing to convert np.array format of image into fastai.Image format (On visualizing it is showing the exact same image as we got from *open_image*) but the prediction from these <em>img</em> is bizzare.\n<strong>Any help is appreciated</strong></p>",
  "messages": [
    {
      "id": "771732",
      "postDate": "03/14/2020 14:54:40",
      "content": "<p><em><a href=\"https://www.kaggle.com/tanmaymaloo/final-bengali\">https://www.kaggle.com/tanmaymaloo/final-bengali</a></em>\nIn the notebook above I used the 3 different learned models for prediction of each feature of the image. But I think because I am converting all parquet files at once into the image and then using it for prediction is too memory consuming...\nTherefore, I used another method (Kind of jugaad) which is also clearly not working.\n<em><a href=\"https://www.kaggle.com/tanmaymaloo/fork-of-final-bengali-fe31e3\">https://www.kaggle.com/tanmaymaloo/fork-of-final-bengali-fe31e3</a></em>\nIn[24]: which is commented right now is giving the correct result and also memory efficient but taking more the 2 hrs which I think because I am converting each array in parquet file into an image -&gt; using open_image -&gt; prediction.\nNow, at last, I think to eliminate the step of saving each image and using open_image instead i used.\n*img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB);\n  img_fastai = Image(pil2tensor(img, dtype=np.uint8))*\nAfter all preprocessing to convert np.array format of image into fastai.Image format (On visualizing it is showing the exact same image as we got from *open_image*) but the prediction from these <em>img</em> is bizzare.\n<strong>Any help is appreciated</strong></p>",
      "rawMarkdown": "*https://www.kaggle.com/tanmaymaloo/final-bengali*\nIn the notebook above I used the 3 different learned models for prediction of each feature of the image. But I think because I am converting all parquet files at once into the image and then using it for prediction is too memory consuming...\nTherefore, I used another method (Kind of jugaad) which is also clearly not working.\n*https://www.kaggle.com/tanmaymaloo/fork-of-final-bengali-fe31e3*\nIn[24]: which is commented right now is giving the correct result and also memory efficient but taking more the 2 hrs which I think because I am converting each array in parquet file into an image -&gt; using open_image -&gt; prediction.\nNow, at last, I think to eliminate the step of saving each image and using open_image instead i used.\n*img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB);\n  img_fastai = Image(pil2tensor(img, dtype=np.uint8))*\nAfter all preprocessing to convert np.array format of image into fastai.Image format (On visualizing it is showing the exact same image as we got from *open_image*) but the prediction from these *img* is bizzare.\n**Any help is appreciated**",
      "votes": null
    },
    {
      "id": "771825",
      "postDate": "03/14/2020 17:11:41",
      "content": "<p>Use the below way with three different models</p>\n\n<p><a href=\"https://www.kaggle.com/ianmoone0617/grapheme?scriptVersionId=29759128\">https://www.kaggle.com/ianmoone0617/grapheme?scriptVersionId=29759128</a></p>\n\n<p>or if  you still face difficulty \nshare me your inference kernel</p>",
      "rawMarkdown": "Use the below way with three different models\n\nhttps://www.kaggle.com/ianmoone0617/grapheme?scriptVersionId=29759128\n\nor if  you still face difficulty \nshare me your inference kernel",
      "votes": null
    },
    {
      "id": "772521",
      "postDate": "03/15/2020 15:32:02",
      "content": "<p><a href=\"/ianmoone0617\">@ianmoone0617</a> it's working now man... thanks for replying.</p>",
      "rawMarkdown": "ianmoone0617 it's working now man... thanks for replying.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 771825,
      "author_name": "",
      "author_url": "",
      "post_date": "03/14/2020 17:11:41",
      "content": "<p>Use the below way with three different models</p>\n\n<p><a href=\"https://www.kaggle.com/ianmoone0617/grapheme?scriptVersionId=29759128\">https://www.kaggle.com/ianmoone0617/grapheme?scriptVersionId=29759128</a></p>\n\n<p>or if  you still face difficulty \nshare me your inference kernel</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 772521,
      "author_name": "tanmaymaloo",
      "author_url": "",
      "post_date": "03/15/2020 15:32:02",
      "content": "<p><a href=\"/ianmoone0617\">@ianmoone0617</a> it's working now man... thanks for replying.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "771732": "*https://www.kaggle.com/tanmaymaloo/final-bengali*\nIn the notebook above I used the 3 different learned models for prediction of each feature of the image. But I think because I am converting all parquet files at once into the image and then using it for prediction is too memory consuming...\nTherefore, I used another method (Kind of jugaad) which is also clearly not working.\n*https://www.kaggle.com/tanmaymaloo/fork-of-final-bengali-fe31e3*\nIn[24]: which is commented right now is giving the correct result and also memory efficient but taking more the 2 hrs which I think because I am converting each array in parquet file into an image -&gt; using open_image -&gt; prediction.\nNow, at last, I think to eliminate the step of saving each image and using open_image instead i used.\n*img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB);\n  img_fastai = Image(pil2tensor(img, dtype=np.uint8))*\nAfter all preprocessing to convert np.array format of image into fastai.Image format (On visualizing it is showing the exact same image as we got from *open_image*) but the prediction from these *img* is bizzare.\n**Any help is appreciated**",
    "771825": "Use the below way with three different models\n\nhttps://www.kaggle.com/ianmoone0617/grapheme?scriptVersionId=29759128\n\nor if  you still face difficulty \nshare me your inference kernel",
    "772521": "ianmoone0617 it's working now man... thanks for replying."
  },
  "source": "meta"
}