Closed oliverxudd closed 3 years ago
Hi @oliverxudd , please note that the transforms
used in this repo is not pytorch's transforms, it is defined here: https://github.com/haofeixu/aanet/blob/master/dataloader/transforms.py.
We have normalized the images to [0, 1] in ToTensor()
: https://github.com/haofeixu/aanet/blob/f689abf81ef072b4e50eb480d3a73db66eebda44/dataloader/transforms.py#L23-L26
This clear things up. Thx!
Hi, haofeixu, I have a simple question about data preprocessing.
In my understanding, the data preprocess from 1) inference.py 2) dataloader.dataloader.py 3) utils.file_io.py is:
step1, read_img() from file_io.py, read image as np.float32, ranging from 0 to 255.0 step2, transform as in
The problem is transform.ToTensor() will not normalize image to [0,1] if np.dtype is not np.uint8 doc.
I don't know if this will be a problem. I hope not.