问题
I am new to Synthia dataset. I would like to read the label file from this datset. I expect to have one channel matrix with size of my RGB image, but when I load the data I got 3x760x1280 and it is full of zeros.
I tried to read as belows:
label = np.asarray(imread(label_path))
Can anyone help to read these labels file correctly?
回答1:
I found the right way to read it as below:
label = np.asarray(imageio.imread(label_path, format='PNG-FI'))[:,:,0]
来源:https://stackoverflow.com/questions/56148891/how-to-read-the-labelannotation-file-from-synthia-dataset