Semantic segmentation colours not in the seg_rgbs.txt #2358
Closed
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
.
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