You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to overlay the object IDs in a scene image using the instance segmentation seg_inst and the environment graph comm.environment_graph() generated by the simulator. The scene image and the segmentation mask are shown as follows:
For example, the sofa node from the environment graph looks like this: { "id": 368, "category": "Furniture", "class_name": "sofa", "properties": ["SURFACES", "SITTABLE", "LIEABLE", "MOVABLE"], "states": []}
which has an ID of 368.
Here is the code I wrote for overlaying object IDs with the scene image rgb_file, instance segmentation seg_file, and the environment graph sg:
The output is shown in the following image. However, the unique labels obtained from unique_labels = np.unique(seg_mask) do not match the object IDs from the environment graph. For example, the sofa is labeled with 40 instead of 368 (the id from the environment graph), see the center lower part of the image.
I assume the values from the segmentation mask are randomly given, since the pixel value in a 3-channel RGB image normally varies from 0 to 255, but the values of the object IDs in the environment graph can be greater than 255. I'd like to ask how I can get the corresponding object IDs from the segmentation mask. Thanks very much!
P.S. The versions of VirtualHome and Unity simulator I use are both v2.3.0. The code is implemented in Python 3.10.15 and executed on Ubuntu 20.
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to overlay the object IDs in a scene image using the instance segmentation
seg_inst
and the environment graphcomm.environment_graph()
generated by the simulator. The scene image and the segmentation mask are shown as follows:For example, the
sofa
node from the environment graph looks like this:{ "id": 368, "category": "Furniture", "class_name": "sofa", "properties": ["SURFACES", "SITTABLE", "LIEABLE", "MOVABLE"], "states": []}
which has an ID of 368.
Here is the code I wrote for overlaying object IDs with the scene image
rgb_file
, instance segmentationseg_file
, and the environment graphsg
:The output is shown in the following image. However, the unique labels obtained from
unique_labels = np.unique(seg_mask)
do not match the object IDs from the environment graph. For example, thesofa
is labeled with40
instead of368
(the id from the environment graph), see the center lower part of the image.I assume the values from the segmentation mask are randomly given, since the pixel value in a 3-channel RGB image normally varies from 0 to 255, but the values of the object IDs in the environment graph can be greater than 255. I'd like to ask how I can get the corresponding object IDs from the segmentation mask. Thanks very much!
P.S. The versions of VirtualHome and Unity simulator I use are both v2.3.0. The code is implemented in Python 3.10.15 and executed on Ubuntu 20.
The text was updated successfully, but these errors were encountered: