yanmin-wu / EDA

[CVPR 2023] EDA: Explicit Text-Decoupling and Dense Alignment for 3D Visual Grounding
Other
101 stars 4 forks source link

Question about "point_instance_label" #14

Closed Tavish9 closed 11 months ago

Tavish9 commented 11 months ago

Hi, thanks for you great work.

But I have a question about "point_instance_label" when reading the code.

In src/joint_det_dataset.py, function _get_target_boxes:

point_instance_label = -np.ones(len(scan.pc))
for t, tid in enumerate(tids):
    point_instance_label[scan.three_d_objects[tid]['points']] = t

Is there any problem with setting the label of the point to the sequence index t?

In my opinion, the code should be modified as follows:

point_instance_label = -np.ones(len(scan.pc))
for t, tid in enumerate(tids):
    point_instance_label[scan.three_d_objects[tid]['points']] = tid 

In this way, all points in the same scene can be correctly classified into the corresponding object IDs.

If we set the point_instance_label to t, the label of the point can only be 0 on the scanrefer dataset when joint_det is false, which leads to logic errors.

yanmin-wu commented 11 months ago

Thanks for your interest.

I think there is no issue here. For example, under the ScanRefer settings, the point_instance_label will set the labels of the point clouds associated with the target object to 0, and the remaining points will be set to -1. Then, in the compute_points_obj_cls_loss_hard_topk() function, operation L179 will obtain labels for 1024 seed points, which are either 0 or -1. Operation L180 will set the labels of all seed points with a label of -1 to 131. Operation L181 will convert the labels into one-hot vectors.

Additionally, a label of 0 won't cause logical errors. Its corresponding one-hot label is 10000...

Tavish9 commented 11 months ago

Thank you for your gracious reply. Your answer was indeed correct, and I apologize for my previous misunderstanding. I truly appreciate your support.