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.

deblurring test

gb8
New Contributor I
942 Views

I managed to run deblurring demo.

the result is,

1. result image has no difference from original image.

2022-04-01 16_48_10-Deblurring Results.png

2. result image shrinks sometimes.

2022-04-01 16_33_37-Deblurring Results.png

 

3. quit loop doesn't work.

     interrupt key input check code seems to be wrong.

      current :  if key == 27 or key == 'q' or key == 'Q'

      working : if key in {ord("q"), ord("Q"), 27}    # in other example code.

 

4. After quit, image window doesn't disappears. It seems to need :

     - cv2.destroyAllWindows()

 

Thanks.

gb8

 

0 Kudos
1 Solution
Vladimir_Dudnik
Employee
865 Views

@gb8 I've tested demo with your image and see the same result as you (image still be too blurred), seems model can't process well such blurry images, doesn't matter if it was PNG or JPG (I've also tried to save image as JPG).

View solution in original post

0 Kudos
7 Replies
Vladimir_Dudnik
Employee
930 Views

@gb8 Thanks for your report, we will look at exit condition in demo, this actually work for me (I've used cmd line like this: -d CPU -i <image> -m <model> --loop, and when I press ESC demo exit. Note, I've run demo and model from OpenVINO 2022.1 release.

 

For model itself, deblurgan-v2 is public model, pre-trained on GoPro (and some other) datasets, see model description for the details. So regarding training quality you may need to look at training pipeline in model's original repository. For quick test I've just used one image from GoPro dataset and I see the difference between original and resulting image (used -o <output_image> option to store result)

original imageoriginal imageresultresult

0 Kudos
gb8
New Contributor I
919 Views

Thanks for quick reply.

I tried to run command mode, and the result is,

2022-04-01 21_21_39-OV_Ub20.png

< content >

(ov) [OV_~/code/omz_demos/deblurring_demo] $ python deblurring_demo_org.py -i '/home/pi/code/dataset/blurry4.jpg' -m '/home/pi/code/models/public/deblurgan-v2/FP32/deblurgan-v2.xml' -d CPU --loop
Traceback (most recent call last):
File "deblurring_demo_org.py", line 27, in <module>
from openvino.model_zoo.model_api.models import Deblurring
ModuleNotFoundError: No module named 'openvino.model_zoo.model_api'
(ov) [OV_~/code/omz_demos/deblurring_demo] $

 

So, to solve path problem, I modified demo source(source upload not allowed).

  - append api module path to sys.path

  - manually feed args

But the result is same and with small image, very curious.

2022-04-01 21_28_55-OV_Ub20.png

For cross check, I send the image file. And can you send me the file you tested?

blurry4.jpg

I am testing on,

  - WSL(Ubuntu 20.04), VSCode, Python 3.8

Colorization demo works as expected.

 

Thanks.

gb8

 

 

 

0 Kudos
gb8
New Contributor I
918 Views

I tested with the file in the mail(the street).

And the result is as you showed me.

The difference for now is your file is png, my test file is jpgs.

I will test the pngs tomorrow.

 

gb8

 

0 Kudos
gb8
New Contributor I
898 Views

I appreciate for this great work.

I can use this work as it is, I am just reporting my observations.

 

Escape key and quitting result window works well on command line execution.

Just I tested on VSCode and Notebook for analyzing code, it was not.

The image you uploaded here also works well to me, but still my image doesn't work(jpg or pngs).

 

blurry1.png

Thanks.

gb8

 

0 Kudos
Vladimir_Dudnik
Employee
866 Views

@gb8 I've tested demo with your image and see the same result as you (image still be too blurred), seems model can't process well such blurry images, doesn't matter if it was PNG or JPG (I've also tried to save image as JPG).

0 Kudos
gb8
New Contributor I
857 Views
0 Kudos
IntelSupport
Community Manager
841 Views

Hi gb8,


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question. 



Regards,

Aznie



0 Kudos
Reply