How can I infer my single img?
I want to test the model with my demo img, how can I do this?
Hello everyone, I've encountered a similar issue. Has anyone found a solution for it?
modify the .yml file in options/test. For example, in HAT_GAN_Real_SRx4.yml
line 15
dataroot_lq: input_dir
please modify it to a real folder path including your images.
This is my example:
line 15
dataroot_lq: ./datasets/input_dir
I make a folder named input_dir in ./datasets/ and move a .png file to it. Then
python hat/test.py -opt options/test/HAT_GAN_Real_SRx4.yml
hello,Infer whether a single image was calculated using a GPU? I feel that my computing speed is a bit too slow, so I suspect that I haven't used GPU calculations. How should I check this
hello,Infer whether a single image was calculated using a GPU? I feel that my computing speed is a bit too slow, so I suspect that I haven't used GPU calculations. How should I check this
I haven't tested this code in a long time, but I probably remember it took a few seconds to infer an image.
when you run your script, you can use nvidia-smi to see the Memory-Usage of your GPU.
On the other hand, you can use torch.cuda.is_available() to check your cuda.
hello,Infer whether a single image was calculated using a GPU? I feel that my computing speed is a bit too slow, so I suspect that I haven't used GPU calculations. How should I check this
I haven't tested this code in a long time, but I probably remember it took a few seconds to infer an image. when you run your script, you can use
nvidia-smito see the Memory-Usage of your GPU. On the other hand, you can usetorch.cuda.is_available()to check your cuda.
Thank you for your reply. It's the reason for my computer's insufficient performance