"vscode:/vscode.git/clone" did not exist on "f6c0d9d3f1e6700a536ed98f85cf259be5ed95e7"
Commit 3ea681ec authored by ChaimZhu's avatar ChaimZhu
Browse files

[Fix] Fix all unittests and refactor tests directory and add circle ci in `test-1.x` (#1654)



* add circle ci

* delete github ci

* fix ci

* fix ut

* fix markdown version

* rm

* fix part of uts

* fix comments

* change foler

* refactor test directory

* fix kitti metric ut

* fix all ut
Co-authored-by: default avatarVVsssssk <shenkun@pjlab.org.cn>
parent 391f99c5
......@@ -288,6 +288,20 @@ 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