MCPcopy Create free account
hub / github.com/Pointcept/SegmentAnything3D / __init__

Method __init__

util.py:17–30  ·  view source on GitHub ↗
(self,
                 voxel_size=0.05,
                 hash_type="fnv",
                 mode='train',
                 keys=("coord", "normal", "color", "label"),
                 return_discrete_coord=False,
                 return_min_coord=False)

Source from the content-addressed store, hash-verified

15
16class Voxelize(object):
17 def __init__(self,
18 voxel_size=0.05,
19 hash_type="fnv",
20 mode='train',
21 keys=("coord", "normal", "color", "label"),
22 return_discrete_coord=False,
23 return_min_coord=False):
24 self.voxel_size = voxel_size
25 self.hash = self.fnv_hash_vec if hash_type == "fnv" else self.ravel_hash_vec
26 assert mode in ["train", "test"]
27 self.mode = mode
28 self.keys = keys
29 self.return_discrete_coord = return_discrete_coord
30 self.return_min_coord = return_min_coord
31
32 def __call__(self, data_dict):
33 assert "coord" in data_dict.keys()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected