{
  "id": 64459,
  "title": "Kaggle Evaluation exception",
  "url": "/competitions/google-ai-open-images-object-detection-track/discussion/64459",
  "author_name": "",
  "post_date": "2018-08-29T20:09:43.293817700Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I submitted a csv file and got the exception: Evaluation Exception: Your box's XMin, 0, &gt;= XMax, 0\nHowever, when I executed the code:\nimport pandas as pd\nd = pd.read_csv('csvfile.csv')\nfor j in range(len(d['ImageId'])):\n    if type(d['PredictionString'][j]) is str:\n        l = d['PredictionString'][j].split(' ')\n        new = []\n        for i in range(int(len(l)/6)):\n            xmin = float(l[i*6+2])\n            xmax = float(l[i*6+4])\n            ymin = float(l[i*6+3])\n            ymax = float(l[i*6+5])\n            if xmax &lt;= xmin or ymax &lt;= ymin :\n                print(d['ImageId'][j])\n                print(l[i*6])</p>\n\n<p>I got no output. I have used similar code to process and successfully submit files before. But, it does not seem to be working now. Is there a problem with this code? I don't understand which row the error occurred. Is there any way to tell? The values look fine to me, there doesn't seem to be a good way to find the problem manually.</p>\n\n<p>Does it expect a prediction string for every row? My file does have some gaps, but it never used to be a problem before.</p>\n\n<p>[Solved]: The Kaggle evaluator used to accept blank prediction strings for some rows, but now returns an error. Before, it would only give a lower score since no objects were detected in the image. I got around the issue by adding a fake detection to blank prediction strings.</p>",
  "messages": [
    {
      "id": "377830",
      "postDate": "08/29/2018 20:09:43",
      "content": "<p>I submitted a csv file and got the exception: Evaluation Exception: Your box's XMin, 0, &gt;= XMax, 0\nHowever, when I executed the code:\nimport pandas as pd\nd = pd.read_csv('csvfile.csv')\nfor j in range(len(d['ImageId'])):\n    if type(d['PredictionString'][j]) is str:\n        l = d['PredictionString'][j].split(' ')\n        new = []\n        for i in range(int(len(l)/6)):\n            xmin = float(l[i*6+2])\n            xmax = float(l[i*6+4])\n            ymin = float(l[i*6+3])\n            ymax = float(l[i*6+5])\n            if xmax &lt;= xmin or ymax &lt;= ymin :\n                print(d['ImageId'][j])\n                print(l[i*6])</p>\n\n<p>I got no output. I have used similar code to process and successfully submit files before. But, it does not seem to be working now. Is there a problem with this code? I don't understand which row the error occurred. Is there any way to tell? The values look fine to me, there doesn't seem to be a good way to find the problem manually.</p>\n\n<p>Does it expect a prediction string for every row? My file does have some gaps, but it never used to be a problem before.</p>\n\n<p>[Solved]: The Kaggle evaluator used to accept blank prediction strings for some rows, but now returns an error. Before, it would only give a lower score since no objects were detected in the image. I got around the issue by adding a fake detection to blank prediction strings.</p>",
      "rawMarkdown": "I submitted a csv file and got the exception: Evaluation Exception: Your box's XMin, 0, &gt;= XMax, 0\nHowever, when I executed the code:\nimport pandas as pd\nd = pd.read_csv('csvfile.csv')\nfor j in range(len(d['ImageId'])):\n    if type(d['PredictionString'][j]) is str:\n        l = d['PredictionString'][j].split(' ')\n        new = []\n        for i in range(int(len(l)/6)):\n            xmin = float(l[i*6+2])\n            xmax = float(l[i*6+4])\n            ymin = float(l[i*6+3])\n            ymax = float(l[i*6+5])\n            if xmax &lt;= xmin or ymax &lt;= ymin :\n                print(d['ImageId'][j])\n                print(l[i*6])\n\nI got no output. I have used similar code to process and successfully submit files before. But, it does not seem to be working now. Is there a problem with this code? I don't understand which row the error occurred. Is there any way to tell? The values look fine to me, there doesn't seem to be a good way to find the problem manually.\n\nDoes it expect a prediction string for every row? My file does have some gaps, but it never used to be a problem before.\n\n[Solved]: The Kaggle evaluator used to accept blank prediction strings for some rows, but now returns an error. Before, it would only give a lower score since no objects were detected in the image. I got around the issue by adding a fake detection to blank prediction strings.",
      "votes": null
    },
    {
      "id": "377838",
      "postDate": "08/29/2018 20:38:30",
      "content": "<p>Try  if (xmax &lt;= xmin) or (ymax &lt;= ymin) </p>",
      "rawMarkdown": "Try  if (xmax &lt;= xmin) or (ymax &lt;= ymin)",
      "votes": null
    },
    {
      "id": "377877",
      "postDate": "08/29/2018 22:03:35",
      "content": "<p>Thanks for replying. It did not work. It still gives no output.</p>",
      "rawMarkdown": "Thanks for replying. It did not work. It still gives no output.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 377838,
      "author_name": "moshel",
      "author_url": "",
      "post_date": "08/29/2018 20:38:30",
      "content": "<p>Try  if (xmax &lt;= xmin) or (ymax &lt;= ymin) </p>",
      "votes": null,
      "replies": [
        {
          "id": 377877,
          "author_name": "aseshasa",
          "author_url": "",
          "post_date": "08/29/2018 22:03:35",
          "content": "<p>Thanks for replying. It did not work. It still gives no output.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "377830": "I submitted a csv file and got the exception: Evaluation Exception: Your box's XMin, 0, &gt;= XMax, 0\nHowever, when I executed the code:\nimport pandas as pd\nd = pd.read_csv('csvfile.csv')\nfor j in range(len(d['ImageId'])):\n    if type(d['PredictionString'][j]) is str:\n        l = d['PredictionString'][j].split(' ')\n        new = []\n        for i in range(int(len(l)/6)):\n            xmin = float(l[i*6+2])\n            xmax = float(l[i*6+4])\n            ymin = float(l[i*6+3])\n            ymax = float(l[i*6+5])\n            if xmax &lt;= xmin or ymax &lt;= ymin :\n                print(d['ImageId'][j])\n                print(l[i*6])\n\nI got no output. I have used similar code to process and successfully submit files before. But, it does not seem to be working now. Is there a problem with this code? I don't understand which row the error occurred. Is there any way to tell? The values look fine to me, there doesn't seem to be a good way to find the problem manually.\n\nDoes it expect a prediction string for every row? My file does have some gaps, but it never used to be a problem before.\n\n[Solved]: The Kaggle evaluator used to accept blank prediction strings for some rows, but now returns an error. Before, it would only give a lower score since no objects were detected in the image. I got around the issue by adding a fake detection to blank prediction strings.",
    "377838": "Try  if (xmax &lt;= xmin) or (ymax &lt;= ymin)",
    "377877": "Thanks for replying. It did not work. It still gives no output."
  },
  "source": "meta"
}