Composer - replication: semantic seg coming out empty

all of these behaviors are with:
semantic_seg: True

warehouse_object_1.yaml (1.6 KB)

  1. unexpected behavior from semantic segmentation parameter obj/scenario_class_id:
    when giving a class id, It does not override the seg class ID with scenario model , rendering it a useless parameter, I would imagine setting one obj group class one to 0, and obj group two to 1, and also setting the scenario model class to 0 would only show me the segmentation of group two.

  2. i have 2 object groups, one with class_id 1, one with class_id 0, setting groudtruth_visuals False, outputs empty png files:

proof the png file is empty

Thank you for your help

1 Like

I can’t figure out how to enter the semantic information when using composer like you do when using the replicator.core method. e.g.

    drill = rep.create.from_usd(asset_path)
    with drill:
        myscale = 1000   # scale the model down
        rep.modify.semantics([('class', 'drill')])
        rep.modify.pose(
                position=(0, 270, 0),
                rotation=(0, 0, 0),
                scale=(myscale, myscale, myscale)
                )

Anyone got any pointers?

Thanks,
Dave

You can use obj_class_id: with an integer value between 0 and 255 or a string that represents the semantic label.

Best,
Andrei

1 Like

I still get the empty pngs as OP.

Hi there,

because you have selected groundtruth_visuals as False the data will be stored as a 2d array of types np.uint32 instead of 2d array of types np.uint8 with 4 channels.
See here for the annotator being used, and here: If groundtruth_visuals` is false - instance data will be stored as a non-rgb png file, where each pixel corresponds a instance id.

I tested your script and the values are indeed there, you can test this using a color picker capable of reading grayscale values (for example in krita) or by changing groundtruth_visuals to True.

You can also use the Composer UI to visualize your scene.

In the .json file with the labels you have more values because the assets you are using are already labeled, however your chosen id is also in the list.

Let me know if you need further assistance.

Best,
Andrei

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.