tianweiy / MVP

MIT License
273 stars 38 forks source link

Where is the code of ground truth sampling(GT-Paste)? #3

Closed PLester closed 2 years ago

PLester commented 2 years ago

Could you kindly indicate the specific location of the code snippet of ground truth sampling(GT-Paste)?

tianweiy commented 2 years ago

https://github.com/tianweiy/CenterPoint/blob/master/det3d/datasets/utils/create_gt_database.py

PLester commented 2 years ago

https://github.com/tianweiy/CenterPoint/blob/master/det3d/datasets/utils/create_gt_database.py

Thanks

PLester commented 2 years ago

https://github.com/tianweiy/CenterPoint/blob/master/det3d/datasets/utils/create_gt_database.py

db_sampler = dict( type="GT-AUG", enable=False, db_info_path="data/nuScenes/dbinfos_train_10sweeps_withvelo_virtual.pkl", sample_groups=[ dict(car=2), dict(truck=3), dict(construction_vehicle=7), dict(bus=4), dict(trailer=6), dict(barrier=2), dict(motorcycle=6), dict(bicycle=6), dict(pedestrian=2), dict(traffic_cone=2), ], db_prep_steps=[ dict( filter_by_min_num_points=dict( car=5, truck=5, bus=5, trailer=5, construction_vehicle=5, traffic_cone=5, barrier=5, motorcycle=5, bicycle=5, pedestrian=5, ) ), dict(filter_by_difficulty=[-1],), ], global_random_rotation_range_per_object=[0, 0], rate=1.0, )

@tianweiy

this type = "GT-AUG" but I did't find any class named "GT-AUG", And I want to now , where used the class of "create_gt_database.py" in the dataset pipeline, and how to implement GT-Paste(ground truth sampling)? I'm a newer of this codebase, and I'm familiar with “MMDetection3d”

Thanks very much!!!

tianweiy commented 2 years ago

Hi,

the code builds the sampler here https://github.com/tianweiy/CenterPoint/blob/5b0e574a4478086ee9686702456aaca4f4115caa/det3d/datasets/pipelines/preprocess.py#L40

and then the sampling function is at

https://github.com/tianweiy/CenterPoint/blob/5b0e574a4478086ee9686702456aaca4f4115caa/det3d/core/sampler/sample_ops.py#L97