sr-pytorch-lightning icon indicating copy to clipboard operation
sr-pytorch-lightning copied to clipboard

Add test and measurement pipeline steps

Open Dowsley opened this issue 1 year ago • 0 comments

Context

For the scope of my Final Paper, I've continued your work by finishing the test (prediction) with an extra measurement step, which takes the average PSNR and SSIM score for the resulting super-resolved image from each model, and saves it into a JSON within the experiment folder of that specific model. This is all done in "metrics.py", which expects a folder with the original HR images.

I've also fixed an unintended bug in start_here.sh where the folder name casing where the experiments are saved from the training, were not coherent with how they are expected in your predict.py.

NT: This diff is incomplete for merging, and I'd like guidance how to proceed.

I manually downscaled all images I used to predict. They were 256x256 images of galaxies, and I downscaled them using bicubic to 128x128. First, I had ran training of models using DIV2K, with patches sized 128, and factor of 2. But whenever I tried running the tests pointing to the Galaxy datasource, I had errors because it tried to cut patches from it.

For the purposes of finishing tests, I conditionally excluded the lines that were causing it (with a flag) in SRData. I don't understand well why it didn't work, but it seems it's because my LR images already are the size of the patches.

Other improvements to be made before merging

  • Properly add new dependencies (from metrics.py) to the Docker Image.
  • Consider not using a flag.

Dowsley avatar Jun 19 '23 18:06 Dowsley