/openvino_superres

Intel OpenVINO practice with super resolution network

Primary LanguagePython

Image super resolution practice with Intel OpenVINO

This project is designed as practicing challenge for everyone interested in Intel OpenVINO toolkit. It demonstrates

  • OpenVINO's super resolution network adopted to work on varying input resolutions.
  • Complete sample to upscale a single image (x3)

Project structute

  • data - a folder with visual data (images, video)
  • superres_img.py - script to run super resolution for image
  • superres_mri.py - MRI visualization script

Setup

  1. Download and install OpenVINO: https://software.seek.intel.com/openvino-toolkit

  2. Download model

  1. Setup environment

    • Windows

      "C:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat"

      Expected output:

      Python 3.7.6
      ECHO is off.
      PYTHONPATH=C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\tools\accuracy_checker;C:\Program Files (x86)\IntelSWTools\openvino\python\python3.7;C:\Program Files (x86)\IntelSWTools\openvino\python\python3;C:\Users\dkurtaev\opencv\build\lib\Release
      [setupvars.bat] OpenVINO environment initialized
    • Linux

      source /opt/intel/openvino/bin/setupvars.sh

      Expected output:

      [setupvars.sh] OpenVINO environment initialized

Single image run

python3 superres_img.py -i data/sample.png

Source image (click to expand):

Bicubic interpolation Network output

python3 superres_img.py -i data/mri.png

Source image (click to expand):

Bicubic interpolation Network output

source: Calgary-Campinas Public Brain MR Dataset

Practice

  1. Create a script superres_video.py based on superres_img.py which can process video file data/video.mp4 and show three windows: source video, resized with cv.INTER_CUBIC and upscaled by OpenVINO network.

  2. Extend superres_mri.py so it could show both cv.INTER_CUBIC and output from OpenVINO network (on different windows or in a single window).