AlmoonYsl / QTNet

[NeurIPS 2023] Query-based Temporal Fusion with Explicit Motion for 3D Object Detection
Apache License 2.0
64 stars 1 forks source link

Create the Memory Bank #11

Closed robotville closed 2 months ago

robotville commented 3 months ago

Hello, thanks very much for the wonderful paper and code.

I want to try using QTNet on my own custom dataset which is in NuScenes format. I think that if I generate the memory-bank for my own dataset I should be able to use QTNet for training and inference.

How do I generate the memory bank for my own dataset?

Thanks very much for your help.

AlmoonYsl commented 2 months ago

Hello, thanks very much for the wonderful paper and code.

I want to try using QTNet on my own custom dataset which is in NuScenes format. I think that if I generate the memory-bank for my own dataset I should be able to use QTNet for training and inference.

How do I generate the memory bank for my own dataset?

Thanks very much for your help.

Hi

Just save query features and detection results. Here is the code to serialize the results into files:

 boxes = bbox_results[0]['boxes_3d'].tensor.cpu().numpy()
 scores = bbox_results[0]['scores_3d'].cpu().numpy()
 labels = bbox_results[0]['labels_3d'].cpu().numpy()
 result = dict(boxes=boxes, scores=scores, labels=labels)
 name = img_metas[0]['pts_filename'].split('/')[-1].split('.')[0] + '.bin'
 out_path_tokens = 'xxxx'
 np.save(out_path_tokens + name, query_feat)
 out_path_det = 'xxxx'
 pickle.dump(result, open(out_path_det + name, 'wb'))