DSEC icon indicating copy to clipboard operation
DSEC copied to clipboard

Lidar Data for Semantic Segmentation Test Set?

Open liupeng3425 opened this issue 1 year ago • 3 comments

Dear authors,

I would like to express my gratitude for your work. I have been using the lidar data downloaded from your source for my experiments. However, I have encountered an issue where the timestamps of the lidar data and the semantic labels do not correspond to each other. I wanted to inquire whether the lidar data includes point cloud data corresponding to the semantic segmentation test set.

Thank you for your attention to this matter.

liupeng3425 avatar Feb 27 '24 03:02 liupeng3425

Hi @liupeng3425

Is this specific to LIDAR data? The timestamps between images and semantic labels are as expected?

magehrig avatar Feb 27 '24 15:02 magehrig

Hi @magehrig Thanks for your prompt reply! Yes, the timestamps of images and semantic labels are matched. e.g., zurich_city_15_a/images/timestamps.txt and zurich_city_15_a/zurich_city_15_a_semantic_timestamps.txt

image

However, I failed to find the corresponding lidar data by timestamps when iter over the lidar data. My code is like below:

      from rosbags.highlevel import AnyReader
      from pathlib import Path

      # get the timestamps of test data
      path = 'test/zurich_city_15_a/zurich_city_15_a_semantic_timestamps.txt'
      timestamp_data = set()
      with open(path, "r") as f:
          data = f.read().splitlines()
          for line in data:
              timestamp_data.add(int(line))

      # read lidar data from bag file
      lidar_path = 'lidar_imu/data/zurich_city_15/lidar_imu.bag'
      with AnyReader([Path(lidar_path)]) as lidar_data:
          conn = lidar_data.connections
          conn = [i for i in conn if i.topic == '/velodyne_points']
          for connection, timestamp, rawdata in lidar_data.messages(connections=conn):
              if timestamp/1000 in timestamp_data: # !!can't  find expected lidar data
                  msg = lidar_data.deserialize(rawdata, connection.msgtype)
                  # process lidar data

liupeng3425 avatar Feb 27 '24 15:02 liupeng3425

It is unlikely that there is an exact match. Are you able to retrieve a lidar pointcloud close to these timestamps?

magehrig avatar Mar 23 '24 00:03 magehrig