Commit 2171463d authored by Shilong Zhang's avatar Shilong Zhang Committed by ChaimZhu
Browse files

[Fix] Fix seg mapping (#1681)



* [Doc]: fix markdown version (#1653)

* [CI] Add circle ci (#1647)

* add circle ci

* delete github ci

* fix ci

* fix ut

* fix markdown version

* rm

* fix seg mapping for scannet

* fix requiremetn

* fix all seg dataet

* resolve commnets
Co-authored-by: default avatarVVsssssk <88368822+VVsssssk@users.noreply.github.com>
parent 3ea681ec
......@@ -288,20 +288,6 @@ class PointSegClassMapping(BaseTransform):
others as len(valid_cat_ids).
"""
def __init__(self, valid_cat_ids, max_cat_id=40):
assert max_cat_id >= np.max(valid_cat_ids), \
'max_cat_id should be greater than maximum id in valid_cat_ids'
self.valid_cat_ids = valid_cat_ids
self.max_cat_id = int(max_cat_id)
# build cat_id to class index mapping
neg_cls = len(valid_cat_ids)
self.cat_id2class = np.ones(
self.max_cat_id + 1, dtype=np.int) * neg_cls
for cls_idx, cat_id in enumerate(valid_cat_ids):
self.cat_id2class[cat_id] = cls_idx
def transform(self, results: dict) -> None:
"""Call function to map original semantic class to valid category ids.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment