Test image resolution
ljc19940403 opened this issue · 3 comments
Hello, I am confused about resolution recently.
When I limited the resolution of the test image, I found that different resolutions would bring different effects. I currently speculate that the influencing factors are the resolution of the original image and the parameter setting of resize()
I wonder if you have any research experience in this kind of question?
Looking forward to your reply
Resize()
will usually cause different outputs as the network's receptive field on the objects in the input image changes as well.
This can be avoided by :
- zero-padding the images that are too small;
- setting the parameter
ceil_mode=True
intorch.nn.AvgPool2d()
.
The 1st solution is easy to understand and use, while the 2nd one can solve the problem of 'input image is too small' permanently but you'd better re-train the network (my suggestion).
Resize()
will usually cause different outputs as the network's receptive field on the objects in the input image changes as well.
This can be avoided by :
- zero-padding the images that are too small;
- setting the parameter
ceil_mode=True
intorch.nn.AvgPool2d()
.The 1st solution is easy to understand and use, while the 2nd one can solve the problem of 'input image is too small' permanently but you'd better re-train the network (my suggestion).
Thanked your reply.If I have a higher resolution image, For resolution reduction solutions,Do you have any Suggestions?
You can try to resize the high-resolution image to lower ones and forward it to the network, or crop the image in a sliding-window manner and then stitch the patches.