{
  "id": 296903,
  "title": "Submission Scoring Error",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/296903",
  "author_name": "",
  "post_date": "2021-12-24T07:05:30.221381100Z",
  "votes": 1,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hi community,</p>\n<p>I am getting a submission scoring error and I am really not able to figure out what am I doing wrong, any help will be appreciated.</p>\n<pre><code>submission_dict = {\n    'id': [],\n    'prediction_string': [],\n}\n\ncount=0\nfor (pixel_array, sample_prediction_df) in iter_test:\n    bboxes=get_prediction_dict(pixel_array,imgsz,visualize)# returns list of bboxes or [] if no bbox\n    bbox_denormalized=[]\n    prediction_string_submission=''\n    for bbox in bboxes:\n        cls,x1,y1,x2,y2,conf= bbox\n        prediction_str= '{} {} {} {} {}'.format(conf,x1,y1,(x2-x1),(y2-y1))\n        prediction_string_submission= prediction_string_submission+prediction_str+' '\n\n    submission_dict['id'].append(count)\n    prediction_string_submission=prediction_string_submission.strip()\n    submission_dict['prediction_string'].append(prediction_string_submission)\n\n    sample_prediction_df['annotations'] =prediction_string_submission\n    env.predict(sample_prediction_df)\n    count+=1\n\ndf= pd.DataFrame(submission_dict)\ndf.to_csv('../../submission.csv', index=False)\n</code></pre>",
  "messages": [
    {
      "id": "1627786",
      "postDate": "12/24/2021 07:05:30",
      "content": "<p>Hi community,</p>\n<p>I am getting a submission scoring error and I am really not able to figure out what am I doing wrong, any help will be appreciated.</p>\n<pre><code>submission_dict = {\n    'id': [],\n    'prediction_string': [],\n}\n\ncount=0\nfor (pixel_array, sample_prediction_df) in iter_test:\n    bboxes=get_prediction_dict(pixel_array,imgsz,visualize)# returns list of bboxes or [] if no bbox\n    bbox_denormalized=[]\n    prediction_string_submission=''\n    for bbox in bboxes:\n        cls,x1,y1,x2,y2,conf= bbox\n        prediction_str= '{} {} {} {} {}'.format(conf,x1,y1,(x2-x1),(y2-y1))\n        prediction_string_submission= prediction_string_submission+prediction_str+' '\n\n    submission_dict['id'].append(count)\n    prediction_string_submission=prediction_string_submission.strip()\n    submission_dict['prediction_string'].append(prediction_string_submission)\n\n    sample_prediction_df['annotations'] =prediction_string_submission\n    env.predict(sample_prediction_df)\n    count+=1\n\ndf= pd.DataFrame(submission_dict)\ndf.to_csv('../../submission.csv', index=False)\n</code></pre>",
      "rawMarkdown": "Hi community,\n\nI am getting a submission scoring error and I am really not able to figure out what am I doing wrong, any help will be appreciated.\n\n```\nsubmission_dict = {\n    'id': [],\n    'prediction_string': [],\n}\n\ncount=0\nfor (pixel_array, sample_prediction_df) in iter_test:\n    bboxes=get_prediction_dict(pixel_array,imgsz,visualize)# returns list of bboxes or [] if no bbox\n    bbox_denormalized=[]\n    prediction_string_submission=''\n    for bbox in bboxes:\n        cls,x1,y1,x2,y2,conf= bbox\n        prediction_str= '{} {} {} {} {}'.format(conf,x1,y1,(x2-x1),(y2-y1))\n        prediction_string_submission= prediction_string_submission+prediction_str+' '\n        \n    submission_dict['id'].append(count)\n    prediction_string_submission=prediction_string_submission.strip()\n    submission_dict['prediction_string'].append(prediction_string_submission)\n    \n    sample_prediction_df['annotations'] =prediction_string_submission\n    env.predict(sample_prediction_df)\n    count+=1\n\ndf= pd.DataFrame(submission_dict)\ndf.to_csv('../../submission.csv', index=False)\n\n```",
      "votes": null
    },
    {
      "id": "1627818",
      "postDate": "12/24/2021 07:44:26",
      "content": "<p>Hi. You should read the evaluation in this competition. I need to initialize an environment and add your prediction. <a href=\"https://www.kaggle.com/c/tensorflow-great-barrier-reef/overview/evaluation\" target=\"_blank\">https://www.kaggle.com/c/tensorflow-great-barrier-reef/overview/evaluation</a></p>",
      "rawMarkdown": "Hi. You should read the evaluation in this competition. I need to initialize an environment and add your prediction. https://www.kaggle.com/c/tensorflow-great-barrier-reef/overview/evaluation",
      "votes": null
    },
    {
      "id": "1629207",
      "postDate": "12/25/2021 20:50:26",
      "content": "<p>Hi thanks for reply I was able to do it now. Thank you.</p>",
      "rawMarkdown": "Hi thanks for reply I was able to do it now. Thank you.",
      "votes": null
    },
    {
      "id": "1630483",
      "postDate": "12/27/2021 11:10:31",
      "content": "<p>Hi Manas, I'm new to kaggle and can't really figure out how to make a submission. Could you please help me out with it?</p>",
      "rawMarkdown": "Hi Manas, I'm new to kaggle and can't really figure out how to make a submission. Could you please help me out with it?",
      "votes": null
    },
    {
      "id": "1637231",
      "postDate": "01/03/2022 17:09:40",
      "content": "<p>Hi, how did you manage to do it? Our team is still facing this error, we've initialised the environment already.</p>",
      "rawMarkdown": "Hi, how did you manage to do it? Our team is still facing this error, we've initialised the environment already.",
      "votes": null
    },
    {
      "id": "1641944",
      "postDate": "01/07/2022 20:46:49",
      "content": "<p>Hi Camille,</p>\n<p>Thank you I was able to solve the problem. Now I am trying to optimize the parameters for my model. Thanks again.</p>",
      "rawMarkdown": "Hi Camille,\n\nThank you I was able to solve the problem. Now I am trying to optimize the parameters for my model. Thanks again.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1627818,
      "author_name": "hsulet",
      "author_url": "",
      "post_date": "12/24/2021 07:44:26",
      "content": "<p>Hi. You should read the evaluation in this competition. I need to initialize an environment and add your prediction. <a href=\"https://www.kaggle.com/c/tensorflow-great-barrier-reef/overview/evaluation\" target=\"_blank\">https://www.kaggle.com/c/tensorflow-great-barrier-reef/overview/evaluation</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1641944,
          "author_name": "justforgags",
          "author_url": "",
          "post_date": "01/07/2022 20:46:49",
          "content": "<p>Hi Camille,</p>\n<p>Thank you I was able to solve the problem. Now I am trying to optimize the parameters for my model. Thanks again.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1629207,
      "author_name": "justforgags",
      "author_url": "",
      "post_date": "12/25/2021 20:50:26",
      "content": "<p>Hi thanks for reply I was able to do it now. Thank you.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1630483,
          "author_name": "uday47",
          "author_url": "",
          "post_date": "12/27/2021 11:10:31",
          "content": "<p>Hi Manas, I'm new to kaggle and can't really figure out how to make a submission. Could you please help me out with it?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1637231,
          "author_name": "hkrsmk",
          "author_url": "",
          "post_date": "01/03/2022 17:09:40",
          "content": "<p>Hi, how did you manage to do it? Our team is still facing this error, we've initialised the environment already.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1627786": "Hi community,\n\nI am getting a submission scoring error and I am really not able to figure out what am I doing wrong, any help will be appreciated.\n\n```\nsubmission_dict = {\n    'id': [],\n    'prediction_string': [],\n}\n\ncount=0\nfor (pixel_array, sample_prediction_df) in iter_test:\n    bboxes=get_prediction_dict(pixel_array,imgsz,visualize)# returns list of bboxes or [] if no bbox\n    bbox_denormalized=[]\n    prediction_string_submission=''\n    for bbox in bboxes:\n        cls,x1,y1,x2,y2,conf= bbox\n        prediction_str= '{} {} {} {} {}'.format(conf,x1,y1,(x2-x1),(y2-y1))\n        prediction_string_submission= prediction_string_submission+prediction_str+' '\n        \n    submission_dict['id'].append(count)\n    prediction_string_submission=prediction_string_submission.strip()\n    submission_dict['prediction_string'].append(prediction_string_submission)\n    \n    sample_prediction_df['annotations'] =prediction_string_submission\n    env.predict(sample_prediction_df)\n    count+=1\n\ndf= pd.DataFrame(submission_dict)\ndf.to_csv('../../submission.csv', index=False)\n\n```",
    "1627818": "Hi. You should read the evaluation in this competition. I need to initialize an environment and add your prediction. https://www.kaggle.com/c/tensorflow-great-barrier-reef/overview/evaluation",
    "1629207": "Hi thanks for reply I was able to do it now. Thank you.",
    "1630483": "Hi Manas, I'm new to kaggle and can't really figure out how to make a submission. Could you please help me out with it?",
    "1637231": "Hi, how did you manage to do it? Our team is still facing this error, we've initialised the environment already.",
    "1641944": "Hi Camille,\n\nThank you I was able to solve the problem. Now I am trying to optimize the parameters for my model. Thanks again."
  },
  "source": "meta"
}