Closed abhiagwl4262 closed 1 year ago
My bad ...wrong observation. In this repo, the image is being read in BGR but again getting back converted to RGB in image_transform function. Its good to read with PIL if eventually training is going to happen on RGB images.
For Imagenet training This repo - https://github.com/HRNet/HRNet-Image-Classification was used in which data was loaded with
torchvision.datasets.ImageFolder
which uses PIL to load the image which loads image in RGB mode.While in this repo for segmentation, the data is being load using cv2, see this https://github.com/HRNet/HRNet-Semantic-Segmentation/blob/0bbb2880446ddff2d78f8dd7e8c4c610151d5a51/lib/datasets/cocostuff.py#L93-L96 cv2 loads image in BGR format and Image loading of cv2 is slower than PIL as well.