Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Unable to get higher resolution image with models single-image-super-resolution-1032/1033

Adithya_N_Intel
Employee
1,601 Views

We are unable to get High resolution image as output using the below models

single-image-super-resolution-1032

single-image-super-resolution-1033

 

The Output image with the dimension [N,C,H,W]: 1, 3, 1080, 1920 has been obtained for Input with dimensions [N,C,H,W]:  1, 3, 270, 480.

Unable to upload output image since it is not supporting the uploads with dimensions more than 2000x1000. Output image as per model is 1920x1080.

Only the dimensions have been increased for the image, not the clarity. The Output image is blurred.

Tried using .jpg, .png and .bmp formats.

OS : Ubuntu 16.04 and 18.04

OpenVINO versions: 2019 R1.1 and 2019 R1

Model used: single-image-super-resolution-1032

Same is the issue with single-image-super-resolution-1033 model as well.

Please verify from your end and resolve this issue.

TIA

0 Kudos
6 Replies
Shubha_R_Intel
Employee
1,601 Views

Dear NNV, Adithya,

Per The Super Resolution C++ Demo Documentation

On the start-up, the application reads command-line parameters and loads the specified network. After that, the application reads a 200x200 input image and performs 4x upscale using super resolution.

I think you're feeding in too-large image sizes which are not supported by the sample. Moreover I doubt that this can be easily fixed since the models you are using (the intel trained models) were trained in a certain way, expecting a certain size of input to be fed in. If the model was trained as such, obviously, if you violate the assumptions by passing in huge images - the results will not be good, as you've observed.

Thanks,

Shubha

0 Kudos
Adithya_N_Intel
Employee
1,601 Views

Hi Shubha,

Thanks for the response.

The model single-image-super-resolution-1032 is not taking any input other than the image with WxH: 480x270.

Tried giving images with other dimensions close to 480x270 as well, but same result.

Same is the case with single-image-super-resolution-1033 model. Its taking only 640x360 images.

Error:

root@ubuntu:~/inference_engine_samples_build/intel64/Release# ./super_resolution_demo -i /home/katta/Downloads/200x200.jpg -d CPU -m /opt/intel/openvino/deployment_tools/INTEL_MODELS/single-image-super-resolution-1032/FP32/single-image-super-resolution-1032.xml -show true
[ INFO ] InferenceEngine:
    API version ............ 1.6
    Build .................. custom_releases/2019/R1.1_28dfbfdd28954c4dfd2f94403dd8dfc1f411038b
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /home/katta/Downloads/200x200.jpg
[ INFO ] Loading plugin

    API version ............ 1.6
    Build .................. 23780
    Description ....... MKLDNNPlugin
[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Size of the image /home/katta/Downloads/200x200.jpg is not equal to WxH = 480x270
[ ERROR ] Valid input images were not found!

 

0 Kudos
Shubha_R_Intel
Employee
1,601 Views

Dear NNV, Adithya,

Yep. I know that error well. It drove me nuts the other day. You literally have to use an image with the specified size  WxH = 480x270 or it won't work. How did I find such an image ? I googled on the web. image 480x270 and found one. 

Thanks,

Shubha

0 Kudos
Adithya_N_Intel
Employee
1,601 Views

Hi Shubha,

I have used 480x270 image as input and I've got the 1920x1080 image as output.

(Used Online Image resize tools to get the images with 480x270 and 640x360 dimensions)

But the output image is blurred and not at all clear. It's just like a zoomed version of input image. Can we consider that 1920x1080 image as the final output ?

Just wanted to confirm if the purpose of both models(single-image-super-resolution-1032/1033) is just to give an enlarged version of input image or will the output images have clear resolution as well.

 

Thanks,

Adithya

0 Kudos
Shubha_R_Intel
Employee
1,601 Views

Dear NNV, Adithya,

Yes using a resizing tool is also a viable option (I used Gimp to do this but Gimp refused to resize exactly to 480x270 no matter how hard I tried).  You ask a good question. Let me ask the guy who designed the super-resolution model about whether images will get blurry if too large to begin with. I will report back on this forum.

I can tell you that I searched an already 480x270 from the web (no resizing needed) and the result was not blurry at all - it was quite good.

Thanks,

Shubha

0 Kudos
Sergei_N_Intel
Employee
1,601 Views

Dear NNV, Adithya,

The models you mention provide 3x and 4x upscaling to 1920x1080. So, the both input and output resolutions are, in a way, fixed.

If you see blurry output - I'd first think that this might be due to the resizing tools you use. As Shubha mention, if you take the image that is originally 480x270 (or if you simply crop a bigger image instead of resize) - it should work ok.

That said, if you need other input resolutions there's a somewhat more involved way to get them. You have to call model optimizer manually for the models in original format that you can find here: https://github.com/opencv/openvino_training_extensions/tree/develop/pytorch_toolkit/super_resolution

0 Kudos
Reply