{
  "id": 110000,
  "title": "[LiDAR data issue] host-a011_lidar1_1233090652702363606.bin",
  "url": "/competitions/3d-object-detection-for-autonomous-vehicles/discussion/110000",
  "author_name": "",
  "post_date": "2019-09-24T06:07:03.941483700Z",
  "votes": 9,
  "comment_count": 5,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3714640%2Fca175d1f221b38185162d63d1c82222e%2Finbox_2539019_ad73b218aedc5fe8182264bcc4a9f79d_QQ20190922184729.png?generation=1569305245170235&amp;alt=media\" alt=\"\">\nHi <a href=\"/iglovikov\">@iglovikov</a> and guys, I was about to check the provided dataset, found an issue same as \"gakki\", who commented to \"Lyft Dataset SDK\" by Vladimir Iglovikov. Brought the image posted by \"gakki\" \nThe array of the bin has size of 265728 which seems some of data of (a) cloud point has missed. Want to confirm whether it is or not.\nThanks.</p>",
  "messages": [
    {
      "id": "632837",
      "postDate": "09/24/2019 06:07:03",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3714640%2Fca175d1f221b38185162d63d1c82222e%2Finbox_2539019_ad73b218aedc5fe8182264bcc4a9f79d_QQ20190922184729.png?generation=1569305245170235&amp;alt=media\" alt=\"\">\nHi <a href=\"/iglovikov\">@iglovikov</a> and guys, I was about to check the provided dataset, found an issue same as \"gakki\", who commented to \"Lyft Dataset SDK\" by Vladimir Iglovikov. Brought the image posted by \"gakki\" \nThe array of the bin has size of 265728 which seems some of data of (a) cloud point has missed. Want to confirm whether it is or not.\nThanks.</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3714640%2Fca175d1f221b38185162d63d1c82222e%2Finbox_2539019_ad73b218aedc5fe8182264bcc4a9f79d_QQ20190922184729.png?generation=1569305245170235&amp;alt=media)\nHi @iglovikov and guys, I was about to check the provided dataset, found an issue same as \"gakki\", who commented to \"Lyft Dataset SDK\" by Vladimir Iglovikov. Brought the image posted by \"gakki\" \nThe array of the bin has size of 265728 which seems some of data of (a) cloud point has missed. Want to confirm whether it is or not.\nThanks.",
      "votes": null
    },
    {
      "id": "634599",
      "postDate": "09/26/2019 13:46:36",
      "content": "<p>How are you tackling this? Do you ignore the whole corresponding scene while training? \nOne way can be to remove this sample and modify the next and prev sample's <code>prev</code> and <code>next</code> fields respectively.</p>",
      "rawMarkdown": "How are you tackling this? Do you ignore the whole corresponding scene while training? \nOne way can be to remove this sample and modify the next and prev sample's `prev` and `next` fields respectively.",
      "votes": null
    },
    {
      "id": "634955",
      "postDate": "09/27/2019 02:04:41",
      "content": "<p>you can add \"100, 1\" to the end of data  and it work fine for me</p>",
      "rawMarkdown": "you can add \"100, 1\" to the end of data  and it work fine for me",
      "votes": null
    },
    {
      "id": "634960",
      "postDate": "09/27/2019 02:08:10",
      "content": "<p><a href=\"/rishabhiitbhu\">@rishabhiitbhu</a> I’ve skipped the corresponding scene. <a href=\"/ozzcbb\">@ozzcbb</a> idea seems simpler. </p>",
      "rawMarkdown": "rishabhiitbhu I’ve skipped the corresponding scene. @ozzcbb idea seems simpler.",
      "votes": null
    },
    {
      "id": "635230",
      "postDate": "09/27/2019 09:24:41",
      "content": "<p>Yeah, that's exactly what's missing here. \nEvery point in the given lidar point clouds is in the form of <code>[x, y, z, 100, 1]</code> (100 is the reflectance intensity, 1 is the ring index both are same for all points, see <a href=\"https://github.com/lyft/nuscenes-devkit/blob/master/lyft_dataset_sdk/utils/data_classes.py#L274\">here</a>). Regarding the lidar file which OP mentions, its last 3D point doesn't have 100 and 1. </p>\n\n<p>Code to fix the issue:\n<code>\nlidar_path = 'lidar/host-a011_lidar1_1233090652702363606.bin'\npoints = np.fromfile(str(lidar_path), dtype=np.float32, count=-1)#.reshape([-1, 5])\nnew_points = np.array(list(points) + [100.0, 1.0], dtype='float32')\nnew_points.tofile(lidar_path)\n</code>\nI've attached the fixed the lidar file here, you can just replace the original file with this fixed one.</p>",
      "rawMarkdown": "Yeah, that's exactly what's missing here. \nEvery point in the given lidar point clouds is in the form of `[x, y, z, 100, 1]` (100 is the reflectance intensity, 1 is the ring index both are same for all points, see [here](https://github.com/lyft/nuscenes-devkit/blob/master/lyft_dataset_sdk/utils/data_classes.py#L274)). Regarding the lidar file which OP mentions, its last 3D point doesn't have 100 and 1. \n\nCode to fix the issue:\n```\nlidar_path = 'lidar/host-a011_lidar1_1233090652702363606.bin'\npoints = np.fromfile(str(lidar_path), dtype=np.float32, count=-1)#.reshape([-1, 5])\nnew_points = np.array(list(points) + [100.0, 1.0], dtype='float32')\nnew_points.tofile(lidar_path)\n```\nI've attached the fixed the lidar file here, you can just replace the original file with this fixed one.",
      "votes": null
    },
    {
      "id": "635231",
      "postDate": "09/27/2019 09:25:55",
      "content": "<p>Yeah, this can be done at the expense of ~120 samples. Better fix the file itself as suggested by <a href=\"/ozzcbb\">@ozzcbb</a> </p>",
      "rawMarkdown": "Yeah, this can be done at the expense of ~120 samples. Better fix the file itself as suggested by @ozzcbb",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 634599,
      "author_name": "rishabhiitbhu",
      "author_url": "",
      "post_date": "09/26/2019 13:46:36",
      "content": "<p>How are you tackling this? Do you ignore the whole corresponding scene while training? \nOne way can be to remove this sample and modify the next and prev sample's <code>prev</code> and <code>next</code> fields respectively.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 634955,
      "author_name": "ozzcbb",
      "author_url": "",
      "post_date": "09/27/2019 02:04:41",
      "content": "<p>you can add \"100, 1\" to the end of data  and it work fine for me</p>",
      "votes": null,
      "replies": [
        {
          "id": 635230,
          "author_name": "rishabhiitbhu",
          "author_url": "",
          "post_date": "09/27/2019 09:24:41",
          "content": "<p>Yeah, that's exactly what's missing here. \nEvery point in the given lidar point clouds is in the form of <code>[x, y, z, 100, 1]</code> (100 is the reflectance intensity, 1 is the ring index both are same for all points, see <a href=\"https://github.com/lyft/nuscenes-devkit/blob/master/lyft_dataset_sdk/utils/data_classes.py#L274\">here</a>). Regarding the lidar file which OP mentions, its last 3D point doesn't have 100 and 1. </p>\n\n<p>Code to fix the issue:\n<code>\nlidar_path = 'lidar/host-a011_lidar1_1233090652702363606.bin'\npoints = np.fromfile(str(lidar_path), dtype=np.float32, count=-1)#.reshape([-1, 5])\nnew_points = np.array(list(points) + [100.0, 1.0], dtype='float32')\nnew_points.tofile(lidar_path)\n</code>\nI've attached the fixed the lidar file here, you can just replace the original file with this fixed one.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 634960,
      "author_name": "ejhung",
      "author_url": "",
      "post_date": "09/27/2019 02:08:10",
      "content": "<p><a href=\"/rishabhiitbhu\">@rishabhiitbhu</a> I’ve skipped the corresponding scene. <a href=\"/ozzcbb\">@ozzcbb</a> idea seems simpler. </p>",
      "votes": null,
      "replies": [
        {
          "id": 635231,
          "author_name": "rishabhiitbhu",
          "author_url": "",
          "post_date": "09/27/2019 09:25:55",
          "content": "<p>Yeah, this can be done at the expense of ~120 samples. Better fix the file itself as suggested by <a href=\"/ozzcbb\">@ozzcbb</a> </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "632837": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3714640%2Fca175d1f221b38185162d63d1c82222e%2Finbox_2539019_ad73b218aedc5fe8182264bcc4a9f79d_QQ20190922184729.png?generation=1569305245170235&amp;alt=media)\nHi @iglovikov and guys, I was about to check the provided dataset, found an issue same as \"gakki\", who commented to \"Lyft Dataset SDK\" by Vladimir Iglovikov. Brought the image posted by \"gakki\" \nThe array of the bin has size of 265728 which seems some of data of (a) cloud point has missed. Want to confirm whether it is or not.\nThanks.",
    "634599": "How are you tackling this? Do you ignore the whole corresponding scene while training? \nOne way can be to remove this sample and modify the next and prev sample's `prev` and `next` fields respectively.",
    "634955": "you can add \"100, 1\" to the end of data  and it work fine for me",
    "634960": "rishabhiitbhu I’ve skipped the corresponding scene. @ozzcbb idea seems simpler.",
    "635230": "Yeah, that's exactly what's missing here. \nEvery point in the given lidar point clouds is in the form of `[x, y, z, 100, 1]` (100 is the reflectance intensity, 1 is the ring index both are same for all points, see [here](https://github.com/lyft/nuscenes-devkit/blob/master/lyft_dataset_sdk/utils/data_classes.py#L274)). Regarding the lidar file which OP mentions, its last 3D point doesn't have 100 and 1. \n\nCode to fix the issue:\n```\nlidar_path = 'lidar/host-a011_lidar1_1233090652702363606.bin'\npoints = np.fromfile(str(lidar_path), dtype=np.float32, count=-1)#.reshape([-1, 5])\nnew_points = np.array(list(points) + [100.0, 1.0], dtype='float32')\nnew_points.tofile(lidar_path)\n```\nI've attached the fixed the lidar file here, you can just replace the original file with this fixed one.",
    "635231": "Yeah, this can be done at the expense of ~120 samples. Better fix the file itself as suggested by @ozzcbb"
  },
  "source": "meta"
}