I already have .png data for both image and annotation.
When I run the main.py program there is a error.
Verifying training dataset
"... .png violating range [0, 1]. Found maximum pixel value 255"
File "....../image-segmentation-keras/keras_segmentation/train.py", line 105, in train assert verifed
AssertionError
I have difficult time implementing "Preparing the data for training".
import cv2
import numpy as np
ann_img = np.zeros((30,30,3)).astype('uint8')
ann_img[ 3 , 4 ] = 1 # this would set the label of pixel 3,4 as 1
cv2.imwrite( "ann_1.png" ,ann_img )
Is there a way to open an exisiting .png(0-255 pixel range) file and convert it into (0-1pixel)?
How do I open and save? from the git code above, I just need to have 255 changed into 1 like
ann_img[255] = 1
I already have .png data for both image and annotation. When I run the main.py program there is a error.
Verifying training dataset "... .png violating range [0, 1]. Found maximum pixel value 255" File "....../image-segmentation-keras/keras_segmentation/train.py", line 105, in train assert verifed AssertionError
I have difficult time implementing "Preparing the data for training".
import cv2 import numpy as np ann_img = np.zeros((30,30,3)).astype('uint8') ann_img[ 3 , 4 ] = 1 # this would set the label of pixel 3,4 as 1 cv2.imwrite( "ann_1.png" ,ann_img )
Is there a way to open an exisiting .png(0-255 pixel range) file and convert it into (0-1pixel)? How do I open and save? from the git code above, I just need to have 255 changed into 1 like ann_img[255] = 1