DISCNet
DISCNet copied to clipboard
Test your own data set
Hello, how are you going to .Jpg to .NPY, after I used the conversion code I wrote, the test results were very different from those in the paper. This is my conversion code. How did you convert it.
def jpgtonpy(path): for file in os.listdir(path): sourceDir1 = os.path.join(path, file) im1 = cv2.imread(sourceDir1) file_name = os.path.join(path, file.split('.')[0] + '.npy') np.save(file_name, im1[:,:,::-1])
i look forward to your reply
Hi, cv.imread will return image with data type uint8. You need to first convert it into np.float and then store as .NPY file.