{
  "id": 109331,
  "title": "Loading test data",
  "url": "/competitions/3d-object-detection-for-autonomous-vehicles/discussion/109331",
  "author_name": "",
  "post_date": "2019-09-18T14:50:52.489565700Z",
  "votes": 4,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Does anyone know the way to load test data as <code>LyftDataset</code> ?</p>\n\n<p>Since instance.json is not in <code>data</code> directory for test set, I'm facing below error.\n<code>\nFileNotFoundError: [Errno 2] No such file or directory: './dataset/test/data/instance.json'\n</code>\nI checked some EDA notebooks to find an example. But they used only training data as far as I know.</p>",
  "messages": [
    {
      "id": "629236",
      "postDate": "09/18/2019 14:50:52",
      "content": "<p>Does anyone know the way to load test data as <code>LyftDataset</code> ?</p>\n\n<p>Since instance.json is not in <code>data</code> directory for test set, I'm facing below error.\n<code>\nFileNotFoundError: [Errno 2] No such file or directory: './dataset/test/data/instance.json'\n</code>\nI checked some EDA notebooks to find an example. But they used only training data as far as I know.</p>",
      "rawMarkdown": "Does anyone know the way to load test data as `LyftDataset` ?\n\nSince instance.json is not in `data` directory for test set, I'm facing below error.\n```\nFileNotFoundError: [Errno 2] No such file or directory: './dataset/test/data/instance.json'\n```\nI checked some EDA notebooks to find an example. But they used only training data as far as I know.",
      "votes": null
    },
    {
      "id": "629243",
      "postDate": "09/18/2019 14:57:54",
      "content": "<p>It's just like how you load your training set. \n<code>\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\n!ls -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data data\nlevel5data = LyftDataset(data_path='.', json_path='data/', verbose=True)\n</code></p>\n\n<p><code>data_path</code> expects path to a folder which contains images, maps, lidar in <code>images</code>, <code>maps</code> and <code>lidar</code> named folders, <code>json_path</code> expects path to the folder containing json files.</p>",
      "rawMarkdown": "It's just like how you load your training set. \n```\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\n!ls -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data data\nlevel5data = LyftDataset(data_path='.', json_path='data/', verbose=True)\n```\n\n`data_path` expects path to a folder which contains images, maps, lidar in `images`, `maps` and `lidar` named folders, `json_path` expects path to the folder containing json files.",
      "votes": null
    },
    {
      "id": "629254",
      "postDate": "09/18/2019 15:10:58",
      "content": "<p>Okay, because we don't have <code>sample_annotation.json</code> and <code>instance.json</code> in test data, and lyft's sdk expects those files to present in the data folder, we can something like this:\n```\n!cp -r /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data .\n!echo \"{}\" &gt;&gt; ./test_data/sample_annotation.json\n!echo \"{}\" &gt;&gt; ./test_data/instance.json</p>\n\n<p>!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\nlevel5data = LyftDataset(data_path='.', json_path='./test_data/', verbose=True)\n```\nJust create empty json files, sample_annotation.json and instance.json.</p>",
      "rawMarkdown": "Okay, because we don't have `sample_annotation.json` and `instance.json` in test data, and lyft's sdk expects those files to present in the data folder, we can something like this:\n```\n!cp -r /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data .\n!echo \"{}\" &gt;&gt; ./test_data/sample_annotation.json\n!echo \"{}\" &gt;&gt; ./test_data/instance.json\n\n\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\nlevel5data = LyftDataset(data_path='.', json_path='./test_data/', verbose=True)\n```\nJust create empty json files, sample_annotation.json and instance.json.",
      "votes": null
    },
    {
      "id": "629521",
      "postDate": "09/18/2019 21:41:19",
      "content": "<p>Thank you for your ideas, but empty JSON files raised below error 😟 \n<code>\nraise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n</code></p>",
      "rawMarkdown": "Thank you for your ideas, but empty JSON files raised below error 😟 \n```\nraise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n```",
      "votes": null
    },
    {
      "id": "629527",
      "postDate": "09/18/2019 21:55:15",
      "content": "<p>Sorry I solve the problem. I should have made  JSON files which contain \"{}\" rather then empty files. Thank you for your support !</p>",
      "rawMarkdown": "Sorry I solve the problem. I should have made  JSON files which contain \"{}\" rather then empty files. Thank you for your support !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 629243,
      "author_name": "rishabhiitbhu",
      "author_url": "",
      "post_date": "09/18/2019 14:57:54",
      "content": "<p>It's just like how you load your training set. \n<code>\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\n!ls -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data data\nlevel5data = LyftDataset(data_path='.', json_path='data/', verbose=True)\n</code></p>\n\n<p><code>data_path</code> expects path to a folder which contains images, maps, lidar in <code>images</code>, <code>maps</code> and <code>lidar</code> named folders, <code>json_path</code> expects path to the folder containing json files.</p>",
      "votes": null,
      "replies": [
        {
          "id": 629254,
          "author_name": "rishabhiitbhu",
          "author_url": "",
          "post_date": "09/18/2019 15:10:58",
          "content": "<p>Okay, because we don't have <code>sample_annotation.json</code> and <code>instance.json</code> in test data, and lyft's sdk expects those files to present in the data folder, we can something like this:\n```\n!cp -r /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data .\n!echo \"{}\" &gt;&gt; ./test_data/sample_annotation.json\n!echo \"{}\" &gt;&gt; ./test_data/instance.json</p>\n\n<p>!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\nlevel5data = LyftDataset(data_path='.', json_path='./test_data/', verbose=True)\n```\nJust create empty json files, sample_annotation.json and instance.json.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 629521,
          "author_name": "toshik",
          "author_url": "",
          "post_date": "09/18/2019 21:41:19",
          "content": "<p>Thank you for your ideas, but empty JSON files raised below error 😟 \n<code>\nraise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n</code></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 629527,
          "author_name": "toshik",
          "author_url": "",
          "post_date": "09/18/2019 21:55:15",
          "content": "<p>Sorry I solve the problem. I should have made  JSON files which contain \"{}\" rather then empty files. Thank you for your support !</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "629236": "Does anyone know the way to load test data as `LyftDataset` ?\n\nSince instance.json is not in `data` directory for test set, I'm facing below error.\n```\nFileNotFoundError: [Errno 2] No such file or directory: './dataset/test/data/instance.json'\n```\nI checked some EDA notebooks to find an example. But they used only training data as far as I know.",
    "629243": "It's just like how you load your training set. \n```\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\n!ls -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data data\nlevel5data = LyftDataset(data_path='.', json_path='data/', verbose=True)\n```\n\n`data_path` expects path to a folder which contains images, maps, lidar in `images`, `maps` and `lidar` named folders, `json_path` expects path to the folder containing json files.",
    "629254": "Okay, because we don't have `sample_annotation.json` and `instance.json` in test data, and lyft's sdk expects those files to present in the data folder, we can something like this:\n```\n!cp -r /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_data .\n!echo \"{}\" &gt;&gt; ./test_data/sample_annotation.json\n!echo \"{}\" &gt;&gt; ./test_data/instance.json\n\n\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_images images\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_maps maps\n!ln -s /kaggle/input/3d-object-detection-for-autonomous-vehicles/test_lidar lidar\nlevel5data = LyftDataset(data_path='.', json_path='./test_data/', verbose=True)\n```\nJust create empty json files, sample_annotation.json and instance.json.",
    "629521": "Thank you for your ideas, but empty JSON files raised below error 😟 \n```\nraise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n```",
    "629527": "Sorry I solve the problem. I should have made  JSON files which contain \"{}\" rather then empty files. Thank you for your support !"
  },
  "source": "meta"
}