CSCI 635 - Group 4
Edit the path of training data and testing data folders in "data.py".
Optional: Edit the path where you want to store the models.
You can change the batch size in main.py if your VRAM in insufficient
Run main.py
You can access the pre-trained models from this drive link: https://drive.google.com/drive/folders/19WSmRBpaKdZd2yDP8t7_dfwK1ht0UYis?usp=sharing
Run super_resolve.py with following arguments -
Example command: python3 super_resolve.py --input_image "Input_Images/1.jpeg" --model "Trained_model/model_epoch_27.pth" --output_filename "Output_Images/output.jpg" --cuda
Remove --cuda, if you dont have gpu or in other cases, to run on cpu.
Run torch_to_engine.py with following arguments:
Example command: python3 torch_to_engine.py --model model.pth --output_filename model --input_height 128 --input_width 128
One of the contraints for speeding up the model is we fix the input size for the image.
With our limitation of 8GB vRAM we were able to produce an engine that takes input image of resolution 128x128.
However this constraint doesnt apply for the pytorch model which can handle a 1280x720 image for a 8GB vRam GPU.
The engine file for the pretrained model for 128x128 input size is also available on the above drive link
Run run_engine.py with following arguments:
Example command: python3 run_engine.py --engine model.engine --input_image 9.jpg --output_filename test.png