{
  "id": 306206,
  "title": "Can anyone please help me submitting . It just tell limit exceed",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/306206",
  "author_name": "",
  "post_date": "2022-02-08T14:11:58.844843700Z",
  "votes": -2,
  "comment_count": 11,
  "views": 0,
  "content": "<p>Can anyone please help me submitting me my notebook?<br>\nnotebook : <a href=\"https://www.kaggle.com/captainabhijeeth/cots-submission\" target=\"_blank\">https://www.kaggle.com/captainabhijeeth/cots-submission</a></p>",
  "messages": [
    {
      "id": "1681510",
      "postDate": "02/08/2022 14:11:58",
      "content": "<p>Can anyone please help me submitting me my notebook?<br>\nnotebook : <a href=\"https://www.kaggle.com/captainabhijeeth/cots-submission\" target=\"_blank\">https://www.kaggle.com/captainabhijeeth/cots-submission</a></p>",
      "rawMarkdown": "Can anyone please help me submitting me my notebook?\nnotebook : https://www.kaggle.com/captainabhijeeth/cots-submission",
      "votes": null
    },
    {
      "id": "1681545",
      "postDate": "02/08/2022 14:48:49",
      "content": "<p>Could it be because you print annotations for every image? Try commenting the print statement out (the one inside format_output) and see if that works.</p>",
      "rawMarkdown": "Could it be because you print annotations for every image? Try commenting the print statement out (the one inside format_output) and see if that works.",
      "votes": null
    },
    {
      "id": "1681564",
      "postDate": "02/08/2022 15:01:44",
      "content": "<p>will try it.</p>",
      "rawMarkdown": "will try it.",
      "votes": null
    },
    {
      "id": "1681567",
      "postDate": "02/08/2022 15:02:04",
      "content": "<p>thanks for your views.</p>",
      "rawMarkdown": "thanks for your views.",
      "votes": null
    },
    {
      "id": "1682329",
      "postDate": "02/09/2022 05:06:28",
      "content": "<p>still stuck in the same error.</p>",
      "rawMarkdown": "still stuck in the same error.",
      "votes": null
    },
    {
      "id": "1682331",
      "postDate": "02/09/2022 05:09:25",
      "content": "<p>still stuck can't submit my notebook help needed. <a href=\"https://www.kaggle.com/datastrophy\" target=\"_blank\">@datastrophy</a> </p>",
      "rawMarkdown": "still stuck can't submit my notebook help needed. @datastrophy",
      "votes": null
    },
    {
      "id": "1682379",
      "postDate": "02/09/2022 06:11:55",
      "content": "<p>you should try some train images to verify before inference.</p>",
      "rawMarkdown": "you should try some train images to verify before inference.",
      "votes": null
    },
    {
      "id": "1682389",
      "postDate": "02/09/2022 06:18:08",
      "content": "<p>Sir, Do you mean. To check the outputs. before submitting it.</p>",
      "rawMarkdown": "Sir, Do you mean. To check the outputs. before submitting it.",
      "votes": null
    },
    {
      "id": "1682632",
      "postDate": "02/09/2022 09:52:35",
      "content": "<p>I am not an expert but I think you have a bottle neck here: </p>\n<pre><code>def format_output(image,pred):\n    annot = []\n    for i in range(300):\n        if pred['detection_scores'][0][i].numpy()&gt;0.25:\n            ls=pred['detection_boxes'][0][i].numpy()\n            height,width,chal=image_np.shape\n            xmin=ls[1]*width\n            x2=ls[3]*width\n            ymin=ls[0]*height\n            y2=ls[2]*height\n            height_img=x2-xmin\n            width_img=y2-ymin\n#             arr={'x':xmin, 'y':ymin, 'width':width_img , 'height':height_img}\n            annot.append('{:.2f} {} {} {} {}'.format(pred['detection_scores'][0][i], int(xmin), int(ymin), int(width_img), int(height_img)))\n    return annot\n</code></pre>\n<p>What is the 300 ? this will loop 300 times for every image in the test set ! most likely this takes time and exceeds …. </p>",
      "rawMarkdown": "I am not an expert but I think you have a bottle neck here: \n```\ndef format_output(image,pred):\n    annot = []\n    for i in range(300):\n        if pred['detection_scores'][0][i].numpy()>0.25:\n            ls=pred['detection_boxes'][0][i].numpy()\n            height,width,chal=image_np.shape\n            xmin=ls[1]*width\n            x2=ls[3]*width\n            ymin=ls[0]*height\n            y2=ls[2]*height\n            height_img=x2-xmin\n            width_img=y2-ymin\n#             arr={'x':xmin, 'y':ymin, 'width':width_img , 'height':height_img}\n            annot.append('{:.2f} {} {} {} {}'.format(pred['detection_scores'][0][i], int(xmin), int(ymin), int(width_img), int(height_img)))\n    return annot\n```\n\nWhat is the 300 ? this will loop 300 times for every image in the test set ! most likely this takes time and exceeds ....",
      "votes": null
    },
    {
      "id": "1682649",
      "postDate": "02/09/2022 10:02:54",
      "content": "<p>Huge Respect for you sir. I thought the same. The 300 is actually the array of accuracies. So from that, I am fetching an accuracy greater than 25%. So is there any way this could be removed?</p>",
      "rawMarkdown": "Huge Respect for you sir. I thought the same. The 300 is actually the array of accuracies. So from that, I am fetching an accuracy greater than 25%. So is there any way this could be removed?",
      "votes": null
    },
    {
      "id": "1682654",
      "postDate": "02/09/2022 10:09:37",
      "content": "<p>Try to decrease the number to say 100 and submit, if everything went well then you can focus on how to write a faster or better way, if it still exceeds the limit then your problem might be somewhere else. </p>",
      "rawMarkdown": "Try to decrease the number to say 100 and submit, if everything went well then you can focus on how to write a faster or better way, if it still exceeds the limit then your problem might be somewhere else.",
      "votes": null
    },
    {
      "id": "1682749",
      "postDate": "02/09/2022 11:15:15",
      "content": "<p>Yeah, it worked.  But how can I get a better way to reduce the size of for loop.</p>",
      "rawMarkdown": "Yeah, it worked.  But how can I get a better way to reduce the size of for loop.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1681545,
      "author_name": "ther3venant",
      "author_url": "",
      "post_date": "02/08/2022 14:48:49",
      "content": "<p>Could it be because you print annotations for every image? Try commenting the print statement out (the one inside format_output) and see if that works.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1681564,
          "author_name": "captainabhijeeth",
          "author_url": "",
          "post_date": "02/08/2022 15:01:44",
          "content": "<p>will try it.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1681567,
          "author_name": "captainabhijeeth",
          "author_url": "",
          "post_date": "02/08/2022 15:02:04",
          "content": "<p>thanks for your views.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1682329,
      "author_name": "captainabhijeeth",
      "author_url": "",
      "post_date": "02/09/2022 05:06:28",
      "content": "<p>still stuck in the same error.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1682331,
      "author_name": "captainabhijeeth",
      "author_url": "",
      "post_date": "02/09/2022 05:09:25",
      "content": "<p>still stuck can't submit my notebook help needed. <a href=\"https://www.kaggle.com/datastrophy\" target=\"_blank\">@datastrophy</a> </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1682379,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "02/09/2022 06:11:55",
      "content": "<p>you should try some train images to verify before inference.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1682389,
          "author_name": "captainabhijeeth",
          "author_url": "",
          "post_date": "02/09/2022 06:18:08",
          "content": "<p>Sir, Do you mean. To check the outputs. before submitting it.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1682632,
      "author_name": "asalhi",
      "author_url": "",
      "post_date": "02/09/2022 09:52:35",
      "content": "<p>I am not an expert but I think you have a bottle neck here: </p>\n<pre><code>def format_output(image,pred):\n    annot = []\n    for i in range(300):\n        if pred['detection_scores'][0][i].numpy()&gt;0.25:\n            ls=pred['detection_boxes'][0][i].numpy()\n            height,width,chal=image_np.shape\n            xmin=ls[1]*width\n            x2=ls[3]*width\n            ymin=ls[0]*height\n            y2=ls[2]*height\n            height_img=x2-xmin\n            width_img=y2-ymin\n#             arr={'x':xmin, 'y':ymin, 'width':width_img , 'height':height_img}\n            annot.append('{:.2f} {} {} {} {}'.format(pred['detection_scores'][0][i], int(xmin), int(ymin), int(width_img), int(height_img)))\n    return annot\n</code></pre>\n<p>What is the 300 ? this will loop 300 times for every image in the test set ! most likely this takes time and exceeds …. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1682649,
          "author_name": "captainabhijeeth",
          "author_url": "",
          "post_date": "02/09/2022 10:02:54",
          "content": "<p>Huge Respect for you sir. I thought the same. The 300 is actually the array of accuracies. So from that, I am fetching an accuracy greater than 25%. So is there any way this could be removed?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1682654,
          "author_name": "asalhi",
          "author_url": "",
          "post_date": "02/09/2022 10:09:37",
          "content": "<p>Try to decrease the number to say 100 and submit, if everything went well then you can focus on how to write a faster or better way, if it still exceeds the limit then your problem might be somewhere else. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1682749,
          "author_name": "captainabhijeeth",
          "author_url": "",
          "post_date": "02/09/2022 11:15:15",
          "content": "<p>Yeah, it worked.  But how can I get a better way to reduce the size of for loop.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1681510": "Can anyone please help me submitting me my notebook?\nnotebook : https://www.kaggle.com/captainabhijeeth/cots-submission",
    "1681545": "Could it be because you print annotations for every image? Try commenting the print statement out (the one inside format_output) and see if that works.",
    "1681564": "will try it.",
    "1681567": "thanks for your views.",
    "1682329": "still stuck in the same error.",
    "1682331": "still stuck can't submit my notebook help needed. @datastrophy",
    "1682379": "you should try some train images to verify before inference.",
    "1682389": "Sir, Do you mean. To check the outputs. before submitting it.",
    "1682632": "I am not an expert but I think you have a bottle neck here: \n```\ndef format_output(image,pred):\n    annot = []\n    for i in range(300):\n        if pred['detection_scores'][0][i].numpy()>0.25:\n            ls=pred['detection_boxes'][0][i].numpy()\n            height,width,chal=image_np.shape\n            xmin=ls[1]*width\n            x2=ls[3]*width\n            ymin=ls[0]*height\n            y2=ls[2]*height\n            height_img=x2-xmin\n            width_img=y2-ymin\n#             arr={'x':xmin, 'y':ymin, 'width':width_img , 'height':height_img}\n            annot.append('{:.2f} {} {} {} {}'.format(pred['detection_scores'][0][i], int(xmin), int(ymin), int(width_img), int(height_img)))\n    return annot\n```\n\nWhat is the 300 ? this will loop 300 times for every image in the test set ! most likely this takes time and exceeds ....",
    "1682649": "Huge Respect for you sir. I thought the same. The 300 is actually the array of accuracies. So from that, I am fetching an accuracy greater than 25%. So is there any way this could be removed?",
    "1682654": "Try to decrease the number to say 100 and submit, if everything went well then you can focus on how to write a faster or better way, if it still exceeds the limit then your problem might be somewhere else.",
    "1682749": "Yeah, it worked.  But how can I get a better way to reduce the size of for loop."
  },
  "source": "meta"
}