HyperRIM
HyperRIM copied to clipboard
Dataset configure problem
Provide the steps elaborately to configure the data files and to run the codes. Does someone implemented this in google colab? Please help me to get through this.
Hi,
For data preparation, you can refer to here. Basically, you need to specify a folder that contains all the images and run that script. For running the code, you can refer to here. I don't think there is a colab for running the code, but all the details can be found in the README.
Hello,
Thanks for replying. Can you say what are all the images to be enclosed under these paths(under options folder) and how to generate those images,
train dataroot_HR: "/path/to/train/HR/data" dataroot_LR: "/path/to/train/LR/data" dataroot_D1": "/path/to/train/HR/downsampled/by/8x/data" dataroot_D2: "/path/to/train/HR/downsampled/by/4x/data" dataroot_D3: "/path/to/train/HR/downsampled/by/2x/data"
test "dataroot_HR": "/path/to/test/HR/data" "dataroot_LR": "/path/to/test/LR/data"
Please guide me through this project as I'm a beginner.
Those directories correspond to the same set of train/test images at different resolutions. For example, your target resolution is at 512x512, then the 5 directories would contain images of following resolutions:
dataroot_HR: 512x512 dataroot_LR: 32x32 dataroot_D1: 64x64 dataroot_D2: 128x128 dataroot_D3: 256x256
To generate these images, you can start with the highest resolution ones and bicubic downsample them using standard libraries like PIL or Matlab (note that OpenCV's implementation is faulty, use the two listed instead).
Hi @niopeng Thanks for providing the code As you know, the images in the ImageNet dataset have different resolutions. What was your strategy for dealing with this problem?
Here are some of the approaches that came to my mind, but I would be very grateful if you could share your approach.
- Random crops: Taking a few random crops from each image
- 5 different crops: center, top left, top right, bottom left, bottom right.
- Resize all images: Resize the image regardless of the aspect ratio to a fixed size.(resize and deform)
- Variable inputs size: Do not crop the images and train on images of variable size, which I think you did not go with this approach!
- Cropping images in a fixed size by using bounding boxes in ImageNet Object Localization Challenge
Hi @SoheilZabihi
I would suggest random cropping or image resizing. I experimented with both ways using different datasets and they all seemed to be working (though I think other cropping strategies would work as well). Regarding ImageNet in particular, I tried resizing using ImageMagick. Hope it helps :)