pclucas14 / lidar_generation

Code for "Deep Generative Models for LiDAR Data"
79 stars 20 forks source link

Question of kitti_data #14

Closed cbh4635 closed 3 years ago

cbh4635 commented 3 years ago

image

Thank you so much for your excellent paper and code.

I have a question about dataset. Downloading and reversing the 'processed-kitti-lidar' creates a processed.npz file for each data.

Could you tell me how to organize processed kitti data in the directory of 'idar-generation/kitti_data/'? Or can i get lidar.npz, lidar_test.npz?

pclucas14 commented 3 years ago

Hi,

You will need to build a custom dataloader for this. I have an example of this here https://github.com/pclucas14/adaptive-quantization-modules/blob/f33984ce8e03a19c1f465ed9a0c1c7b64edcdfc4/utils/data.py#L123. You will probably need to change it a little bit to merge all the examples together.

Hope this helps, Lucas


From: cbh4635 notifications@github.com Sent: January 20, 2021 1:44 AM To: pclucas14/lidar_generation lidar_generation@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [pclucas14/lidar_generation] Question of kitti_data (#14)

[image]https://user-images.githubusercontent.com/58653682/105142695-3cbc3780-5b3e-11eb-9cd4-d3d685b0f85b.png

Thank you so much for your excellent paper and code.

I have a question about dataset. Downloading and reversing the 'processed-kitti-lidar' creates a processed.npz file for each data.

Could you tell me how to organize processed kitti data in the directory of 'idar-generation/kitti_data/'?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/pclucas14/lidar_generation/issues/14, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE7FPIXZVMIXMTK5A6KCRD3S22CURANCNFSM4WKH7CAA.

torchlidar commented 3 years ago

I have a similar question.

Is there simply no way to get rid of ridar_test.npz lidar.npz?

I'm sorry for the unreasonable request.

Thank You.

pclucas14 commented 3 years ago

Hi,

the please have a look at the code above, it should be enough to get you started

pclucas14 commented 3 years ago

If you follow the code above, the following modification should be close enough to get something working

def get_processed_kitti(args):

    root = PATH_TO_DATASET

    task_id = 0
    env_recs = {}
    for env in os.listdir(root):
        env_recs[env] = []
        for recording in os.listdir(os.path.join(root, env)):
            path = os.path.join(root, env, recording, 'processed.npz')
            env_recs[env] += [path]
            task_id += 1

        all_recs = env_recs['road'] + env_recs['residential'] + env_recs['city']

    train_ds = Kitti_dataset(all_recs)

    return train_ds
qifang-robotics commented 3 years ago

Hi pclucas14, Thanks for your great contribution! I noticed that in lidar_generation, a function in utils.py "def preprocess(dataset)" is used in the original code. Do I need to apply this function to the "processed_kitti_lidar" dataset?