ImageEn, unit ievision

TIEVisionNNetSuperRes


Declaration

TIEVisionNNetSuperRes = interface(TIEVisionNNetBase)


Description

The TIEVisionNNetSuperRes class allows you to upscale images (i.e. increase image resolution) using neural networks.
This class handles loading of the model, input preparation and execution of upscaling.
The model determines the level of upscaling that is performed (2x, 4x, etc).

Original Image:


Upscaled 3x using FSRCNN:


Compared with Bicubic Upscaling:


See model comparisons and benchmarks at: www.imageen.com/support/SuperRes_Benchmarking/
More information on Super Resolution is available at: learnopencv.com/super-resolution-in-opencv/


Demo

Demo  Demos\IEVision\NeuralNet\NeuralNet.dpr


Example

// Increase the image resolution by a factor of three using FSRCNN pretrained model
var
  nnet: TIEVisionNNetSuperRes;
  img: TIEVisionImage;
begin
  nnet:= IEVisionLib.createNNetSuperRes(ievFSRCNN, 3, 'FSRCNN_x3.pb');
  img := nnet.upsample(ImageEnView1.IEBitmap.GetIEVisionImage());
  ImageEnView1.IEBitmap.AssignIEVisionImage(img);
  ImageEnView1.Update();
end;


Methods and Properties

Public Method  upsample
Public Method  setChunkSize
Public Method  setDevice


See Also

createNNetSuperRes
TIEVisionNNet