facebookresearch / InterHand2.6M

Official PyTorch implementation of "InterHand2.6M: A Dataset and Baseline for 3D Interacting Hand Pose Estimation from a Single RGB Image", ECCV 2020
Other
675 stars 92 forks source link

Why divide the input image by 255 after the process of "transforms.ToTensor"? #110

Open TMahh opened 2 years ago

TMahh commented 2 years ago

Hi

Why divide the input image by 255 after the process of "transforms.ToTensor"? https://github.com/facebookresearch/InterHand2.6M/blob/2b8061d2c8e762aa6fcb8e6f5d18f8a9e83bfd0c/data/InterHand2.6M/dataset.py#L138

This process takes the pixel value to a very small value between 0 and 1/255. Is there any reason for this?

mks0601 commented 2 years ago

transforms.ToTensor changes the pixel value when the input tensor is in np.uint8. As I changed the img tensor to np.float32, the pixel values do not change.