MCG-NJU / SparseOcc

[ECCV 2024] Fully Sparse 3D Occupancy Prediction & RayIoU Evaluation Metric
https://arxiv.org/abs/2312.17118
Apache License 2.0
277 stars 22 forks source link

About valid_mask in loss #39

Closed Hong753 closed 5 months ago

Hong753 commented 5 months ago

Hello, may I ask what's the point of valid_mask in line 84 of "sparseocc_head.py"? If I followed your code correctly, voxel_semantics does not have any values with 255. Is the valid_mask intended to mask out free voxels, which in case, it would be valid_mask = (voxel_semantics_sparse > 0) ?

YANG-CY-163 commented 5 months ago

The valid_mask is used to mask out the invalid value 255 instead of free voxels, the value 255 is filled in LoadOccGTFromFile because of the rotation in bda. By the way, here the free_id is num_classes -1, not 0.

Hong753 commented 5 months ago

Yes, I understand that the free_id is num_classes-1 for voxel_semantics, but I thought that you intended to use voxel_instances instead. I just found the line you were referring to. Thanks!