Skip to content

Semantic segmentation colours not in the seg_rgbs.txt #2358

Closed
@ivannson

Description

I am collecting some segmentation images, but upon displaying them, I found that the colours in my segmentation image do not correspond to any colours specified in seg_rgbs.txt.

This is the image produced:
Screenshot 2019-12-25 at 17 22 23

Data collection code snippet:

responses = client.simGetImages([
            airsim.ImageRequest("2", airsim.ImageType.DepthPerspective, compress = False, pixels_as_float = True),  #depth visualization image
            airsim.ImageRequest("0", airsim.ImageType.Scene, compress = False), #png format
            airsim.ImageRequest("0", airsim.ImageType.Segmentation, False, False)])

filename = 'images/segmentation/' + 'segmentation' + str(file_sequence)
        img1d = np.fromstring(responses[2].image_data_uint8, dtype=np.uint8) #get numpy array
        img_rgb = img1d.reshape(responses[2].height, responses[2].width, 3) #reshape array to 4 channel image array H X W X 3
        img_rgb = np.flipud(img_rgb) #original image is fliped vertically

        np.save(filename, img_rgb)

By looking at the colours, for example top left quadrant with a building in dark yellow, I get [203 174 42] as the rgb values, however this colour doesn't seem to correspond to any label seg_rgbs.txt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions