Skip to content

Commit

Permalink
Merge pull request #923 from StanfordVL/replicator-patch
Browse files Browse the repository at this point in the history
Replicator Patch for INVALID segmentation label
  • Loading branch information
cgokmen authored Oct 1, 2024
2 parents 7518d90 + 20af421 commit 811bd4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions omnigibson/sensors/vision_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,7 @@ def _remap_instance_segmentation(self, img, id_to_labels, semantic_img, semantic
key = int(key)
if value in ["BACKGROUND", "UNLABELLED"]:
value = value.lower()
else:
assert "/" in value, f"Instance segmentation (ID) label {value} is not a valid prim path!"
elif "/" in value:
prim_name = value.split("/")[-1]
# Hacky way to get the particles of MacroVisual/PhysicalParticleSystem
# Remap instance segmentation and instance segmentation ID labels to system name
Expand All @@ -440,6 +439,9 @@ def _remap_instance_segmentation(self, img, id_to_labels, semantic_img, semantic
# Keep the instance segmentation ID labels intact (prim paths of visual meshes)
else:
pass
else:
# TODO: This is a temporary fix unexpected labels e.g. INVALID introduced in new Isaac Sim versions
value = "unlabelled"

self._register_instance(value, id=id)
replicator_mapping[key] = value
Expand Down

0 comments on commit 811bd4c

Please sign in to comment.