charlesq34 / frustum-pointnets

Frustum PointNets for 3D Object Detection from RGB-D Data
Apache License 2.0
1.59k stars 538 forks source link

Understanding 3D box score #108

Closed jarvis-huang closed 4 years ago

jarvis-huang commented 4 years ago

In train.py, the following code computes a score for each 3D box prediction. I have a hard time understanding their meaning. Can someone briefly explain it? Thanks.

        # Compute scores
        batch_seg_prob = softmax(batch_logits)[:,:,1] # BxN
        batch_seg_mask = np.argmax(batch_logits, 2) # BxN
        mask_mean_prob = np.sum(batch_seg_prob * batch_seg_mask, 1) # B,
        mask_mean_prob = mask_mean_prob / np.sum(batch_seg_mask,1) # B,
        heading_prob = np.max(softmax(batch_heading_scores),1) # B
        size_prob = np.max(softmax(batch_size_scores),1) # B,
        batch_scores = np.log(mask_mean_prob) + np.log(heading_prob) + np.log(size_prob)
        scores[i*batch_size:(i+1)*batch_size] = batch_scores 
        # Finished computing scores
kwea123 commented 4 years ago

mask_mean_prob is the mean probability score of positive points in the frustum, heading_prob and size_prob are the confidence of the prediction of heading and size as classification problem.

jarvis-huang commented 4 years ago

@kwea123 It makes sense to me now. Thanks!