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

Function remove_small_group

util.py:168–175  ·  view source on GitHub ↗
(group_ids, th)

Source from the content-addressed store, hash-verified

166
167
168def remove_small_group(group_ids, th):
169 unique_elements, counts = np.unique(group_ids, return_counts=True)
170 result = group_ids.copy()
171 for i, count in enumerate(counts):
172 if count < th:
173 result[group_ids == unique_elements[i]] = -1
174
175 return result
176
177
178def pairwise_indices(length):

Callers 3

pcd_ensembleFunction · 0.85
make_open3d_point_cloudFunction · 0.85
seg_pcdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected