Skip to main content

Super-resolution applied to power line inspection: Script

In the project Super-power (I-NERGY Open Call I), FuVeX has developed Super-resolution algorithms to enhance the quality of the photos to inspect power lines.

The execution of the algorithm is concentrated on the following line, which corresponds to the execution of the script to process original images in order to increase their resolution two times.

The script call line is:

python ./Real-ESRGAN/ -s 2 -t 128 --input ./ENTRADA --output ./SALIDA --model_path ./net_g_90000.pth -n "RealESRGAN_x2plus" --suffix "x2" -g 0

Interpreting each parameter:

./Real-ESRGAN/ – Path and script name to be executed. In this case the learning process is completed and we use the script to call the neural network to process original images. In this case we are doing the inference process with the neural network. In this case, we are using a ESRGAN neural network (

-s 2 – scales two times original images. Output images resolution is duplicated.

-t 128 – size of the pixel matrix to process images. Images are processed by squares. This is the size of the tesela (width of the square).

--input ./ENTRADA – Path of the folder where the original images are located.

--output ./SALIDA - Path of the folder where the results (output images) are stored after script processing of the input images..

--model_path ./net_g_90000.pth - path and name of the trained network weight file.

-n "RealESRGAN_x2plus" - name of the neural network type.

--suffix "x2" – label to add to the file name of the output images.

-g 0 – flag to indicate that the software must use the GPU card. 0.