﻿{"id":16202,"date":"2026-01-12T10:00:00","date_gmt":"2026-01-12T09:00:00","guid":{"rendered":"https:\/\/www.sigterritoires.fr\/?p=16202"},"modified":"2026-01-10T19:03:57","modified_gmt":"2026-01-10T18:03:57","slug":"improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/","title":{"rendered":"Improving aerial image resolution with ESRGAN: when AI brings old photos back to life"},"content":{"rendered":"\n<p>Aerial images are a gold mine: old surveys, forest inventories, coastal monitoring, digitized cadastral maps, etc.<\/p>\n\n\n\n<p>But they often suffer from a major problem: low resolution. Blurring, pixelation, crushed textures, loss of detail&#8230; these are all limitations that complicate spatial analysis.<\/p>\n\n\n\n<p>In recent years, a technology derived from deep learning has completely changed the game: ESRGAN (Enhanced Super Resolution Generative Adversarial Network).<\/p>\n\n\n\n<p>Initially developed to improve image quality in video games, ESRGAN has become a valuable tool in remote sensing, photogrammetry, and geomatics.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contenu <\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Why_use_ESRGAN_for_aerial_images\" >Why use ESRGAN for aerial images?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#How_does_ESRGAN_work_simplified_version\" >How does ESRGAN work? (simplified version)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Example_4x_super-resolution_on_an_aerial_photo_generic\" >Example: 4x super-resolution on an aerial photo (generic)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Using_Real-ESRGAN-ncnn-vulkan_on_Windows\" >Using Real-ESRGAN-ncnn-vulkan on Windows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#1_Download_preparation_quick\" >1) Download &amp; preparation (quick)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#2_Basic_command_and_parameters_explained\" >2) Basic command and parameters (explained)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#3_Pipeline_for_georeferenced_images_simple_and_reliable_method\" >3) Pipeline for georeferenced images (simple and reliable method)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Steps_manual\" >Steps (manual)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#4_Windows_batch_script_automatic_for_an_entire_folder\" >4) Windows batch script (automatic for an entire folder)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#5_Tips_pitfalls_to_avoid\" >5) Tips &amp; pitfalls to avoid<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#6_Add_GFPGAN_optional\" >6) Add GFPGAN (optional)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Integration_into_QGIS\" >Integration into QGIS<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#1_Via_Python_processing_Processing_Toolbox\" >1. Via Python processing (Processing Toolbox)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#2_Via_an_external_plugin\" >2. Via an external plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#3_Via_an_image_RW_workflow\" >3. Via an image R\/W workflow<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Advantages\" >Advantages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Limitations\" >Limitations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Towards_a_specialized_ESRGAN_for_aerial_images\" >Towards a specialized ESRGAN for aerial images?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/improving-aerial-image-resolution-with-esrgan-when-ai-brings-old-photos-back-to-life\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>In this article, we will explore how ESRGAN can improve the resolution of old aerial images, what its advantages and limitations are, and how to use it in a QGIS-compatible processing chain.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_use_ESRGAN_for_aerial_images\"><\/span>Why use ESRGAN for aerial images?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Unlike traditional resampling algorithms (bicubic, bilinear), ESRGAN does not simply enlarge the image.<\/p>\n\n\n\n<p>It reconstructs missing details using deep learning based on thousands of high-resolution images.<\/p>\n\n\n\n<p>ESRGAN can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>reconstruct the textures of roofs, roads, fields, and coastlines<\/li>\n\n\n\n<li>refine lines (riverbanks, buildings, agricultural boundaries)<\/li>\n\n\n\n<li>make small structures that would otherwise be invisible legible<\/li>\n\n\n\n<li>improve the quality of old digitized orthophotos<\/li>\n\n\n\n<li>prepare images for segmentation or automatic classification<\/li>\n<\/ul>\n\n\n\n<p>For geomatics specialists, this is a game changer:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>we can finally take advantage of old aerial images whose quality had previously been a hindrance.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_does_ESRGAN_work_simplified_version\"><\/span>How does ESRGAN work? (simplified version)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>ESRGAN is based on two neural networks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A generator that attempts to produce a realistic high-resolution version.<\/li>\n\n\n\n<li>A discriminator that attempts to distinguish between the generated images and the actual high-resolution images.<\/li>\n<\/ul>\n\n\n\n<p>The two improve each other until they produce a detailed, sharp, and consistent image.<\/p>\n\n\n\n<p>ESRGAN is particularly useful for aerial photographs because:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>it learns from natural textures (ground, roofs, vegetation)<\/li>\n\n\n\n<li>it handles noise well<\/li>\n\n\n\n<li>it limits artifacts specific to old scans (grain, halos)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_4x_super-resolution_on_an_aerial_photo_generic\"><\/span>Example: 4x super-resolution on an aerial photo (generic)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We start with a digitized aerial image measuring 512\u00d7512 px.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Original resolution: blurry, details erased<\/li>\n\n\n\n<li>ESRGAN \u00d74 \u2192 output in 2048\u00d72048 px<\/li>\n\n\n\n<li>Improvements observed:\n<ul class=\"wp-block-list\">\n<li>better readability of plots<\/li>\n\n\n\n<li>clearer roof contours<\/li>\n\n\n\n<li>roads and tracks clearly visible<\/li>\n\n\n\n<li>better reconstructed ground textures<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"234\" data-attachment-id=\"16063\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/ameliorer-la-resolution-des-images-aeriennes-avec-esrgan-quand-lia-redonne-vie-aux-vieux-cliches\/resultatsr2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?fit=2560%2C937&amp;ssl=1\" data-orig-size=\"2560,937\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"resultatsr2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?fit=640%2C234&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2.jpg?resize=640%2C234&#038;ssl=1\" alt=\"\" class=\"wp-image-16063\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?resize=1024%2C375&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?resize=300%2C110&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?resize=768%2C281&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?resize=1536%2C562&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?resize=2048%2C750&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr2-scaled.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption class=\"wp-element-caption\">Image de 1960<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"189\" data-attachment-id=\"16064\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/ameliorer-la-resolution-des-images-aeriennes-avec-esrgan-quand-lia-redonne-vie-aux-vieux-cliches\/resultatsr\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?fit=2560%2C755&amp;ssl=1\" data-orig-size=\"2560,755\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"resultatsr\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?fit=640%2C189&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr.jpg?resize=640%2C189&#038;ssl=1\" alt=\"\" class=\"wp-image-16064\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?resize=1024%2C302&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?resize=300%2C89&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?resize=768%2C227&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?resize=1536%2C453&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?resize=2048%2C604&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/resultatsr-scaled.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption class=\"wp-element-caption\">Image de 1948<\/figcaption><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_Real-ESRGAN-ncnn-vulkan_on_Windows\"><\/span>Using Real-ESRGAN-ncnn-vulkan on Windows<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We will cover:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>download &amp; folder<\/li>\n\n\n\n<li>basic command and useful parameters<\/li>\n\n\n\n<li>\u201cgeoreferenced image \u2192 SR \u2192 GeoTIFF\u201d pipeline (automatic)<\/li>\n\n\n\n<li>ready-to-paste Windows batch script<\/li>\n\n\n\n<li>tips\/pitfalls to avoid and advanced options<\/li>\n\n\n\n<li>option: chain GFPGAN (face\/detail restoration)<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Download_preparation_quick\"><\/span>1) Download &amp; preparation (quick)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download the realesrgan-ncnn-vulkan archive from the project&rsquo;s Releases page (file realesrgan-ncnn-vulkan-*-windows.zip).<\/li>\n\n\n\n<li>Unzip into C:\\SR\\realesrgan-ncnn-vulkan-20220424-windows, for example.<\/li>\n\n\n\n<li>Place the input images in C:\\SR\\input\\ (PNG\/JPG\/TIF formats).<\/li>\n\n\n\n<li>Create C:\\SR\\output\\ for the results.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Basic_command_and_parameters_explained\"><\/span>2) Basic command and parameters (explained)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Minimum command (x4, realesrgan-x4plus model):<\/p>\n\n\n<div class='stb-container stb-style-black'><div class='stb-caption'><div class='stb-logo'><img class='stb-logo__image' src='data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN\/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz\/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH\/w\/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA\/g88wAAKCRFRHgg\/P9eM4Ors7ONo62Dl8t6r8G\/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt\/qIl7gRoXgugdfeLZrIPQLUAoOnaV\/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl\/AV\/1s+X48\/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H\/LcL\/\/wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAP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7Eos1p91Aqs6YEoiyjTS6C+Fx\/agLWK7twTd2ULRz+m4yh71uzWDlK2pn6hbCriblW9Ea8zSWNkbnqW7975AG\/5\/SvYOGiYHB8j8xHKxChtkeAQQFmDMRGo0JvsqiVEW5SOQEUoFSGsQolBjCZfPnJX0TrxXqWjCQi\/ZBH7eQJKKYvP298ubXM5iPucjuoXPv7okwytS+iraiLpIC5FCChvwGiiJAGjCMGhTG\/VRxvQFqViRKUok4CJCSZC4hrBefLxR25wnZMfVTpe8znJCzsfURqUvtt1l\/5Il9knlK28\/d59D9I\/2I9WAe8ygit6ApIERW9j5kShYbUebIEYpSpgKoS0BtUGqjGAa05N5RMHPlPOP\/0v2jTyF\/WgR6EQpX7m85X3aV\/ekRXZh\/MsvzipVNHWYuIY5xxaCWXZqx+b2BKCweURVmKgjsR9qL4BosF1BAvFxGPfkPbKdeXcU\/uVTn9dZ4gKlGoH774quHs2rq9fneWdtxeFeU21Fsfbt2yg3S2YWchRcYwyhjS2NBqWjq+QNCxxwyN6diZ65vu3LPbt\/np7Zemg8WpZ2WQtIfErPtXtlezHrOHL2vCt9uzkSL0irxqsb7pkpdU5o56Y9VhbGxoweudIcJFeWGqtzEy6vH20ODl\/f27qDymTzKqklWFiCL\/8wa566U81L4G8BPL\/A+R\/BgAzCInEE2+\/LgAAAABJRU5ErkJggg==' alt='img'\/><\/div><div class='stb-caption-content'><\/div><div class='stb-tool'><\/div><\/div><div class='stb-content'><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\\realesrgan-ncnn-vulkan.exe -i C:\\SR\\input\\image.png -o C:\\SR\\output\\image_x4.png -n realesrgan-x4plus\n<\/code><\/pre>\n\n\n\n<p><\/div><\/div>\n\n\n\n<p>Useful parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>-i &lt;path&gt;: input image<\/li>\n\n\n\n<li>-o &lt;path&gt;: output image<\/li>\n\n\n\n<li>-n &lt;model_name&gt;: model (realesrgan-x4plus, realesrnet-x4plus, realesrgan-x4plus-anime, etc.)<\/li>\n\n\n\n<li>-s &lt;scale&gt;: magnification factor (sometimes managed by the model; keep -s 4 for x4)<\/li>\n\n\n\n<li>-tile &lt;N&gt;: tile size (e.g., -tile 200) \u2014 reduces GPU\/CPU memory usage, useful for large images<\/li>\n\n\n\n<li>-t &lt;N&gt;: CPU threads (optional)<\/li>\n\n\n\n<li>-g &lt;index&gt;: GPU index (if multiple)<\/li>\n\n\n\n<li>&#8211;help: displays all options<\/li>\n<\/ul>\n\n\n\n<p>Tip: if your machine is not very powerful, use -tile 150 or -tile 100.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Pipeline_for_georeferenced_images_simple_and_reliable_method\"><\/span>3) Pipeline for georeferenced images (simple and reliable method)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Principle: upscaling is performed on the raster image (PNG\/TIF), then a GeoTIFF is recreated by reapplying the geographic envelope (bounds) of the source image, which preserves the spatial geometry and adjusts the resolution to the magnification factor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Steps_manual\"><\/span>Steps (manual)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Retrieve the bounds and CRS of the original: gdalinfo -json C:\\SR\\input\\image.tif &gt; info.json or directly read Upper Left (ulx, uly) and Lower Right (lrx, lry) from gdalinfo image.tif.<\/li>\n\n\n\n<li>Run Real-ESRGAN on the image (image_non_geo.png or converted): .\\realesrgan-ncnn-vulkan.exe -i C:\\SR\\input\\image.png -o C:\\SR\\output\\image_x4.png -n realesrgan-x4plus -tile 150<\/li>\n\n\n\n<li>Recreate a GeoTIFF with the same envelope but a new size:<br>If the original envelope is (ulx, uly, lrx, lry), reuse it. Example: gdal_translate -of GTiff -a_srs EPSG:XXXXX -a_ullr ulx uly lrx lry C:\\SR\\output\\image_x4.png C:\\SR\\output\\image_x4_georef.tif\n<ul class=\"wp-block-list\">\n<li>-a_srs EPSG:XXXXX: the CRS of the original (e.g., <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/epsg-4326-vs-3857-2\/\">EPSG:4326<\/a> or EPSG:3857)<\/li>\n\n\n\n<li>-a_ullr ulx uly lrx lry: corners in spatial coordinates (Upper Left X,Y; Lower Right X,Y)<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>Why it works: we apply the original geographic envelope to the super-resolved image. The new pixel size will automatically correspond to a new spatial resolution (pixel size = original_pixel_size \/ scale).<\/p>\n\n\n\n<p>Note: If you want to be extremely precise about the geo-transform header rather than -a_ullr, you can calculate and apply the new geotransform via gdal_edit.py -a_ullr or using a GDAL Python script, but gdal_translate -a_ullr is simple and robust.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Windows_batch_script_automatic_for_an_entire_folder\"><\/span>4) Windows batch script (automatic for an entire folder)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Paste the following file into C:\\SR\\run_sr_georef.bat, modify the paths and the <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/qgis-projections-crs\/\">projection<\/a> used, then run.<\/p>\n\n\n<div class='stb-container stb-style-black stb-caption-box'><div class='stb-caption'><div class='stb-logo'><img class='stb-logo__image' src='data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN\/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEK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oH774quHs2rq9fneWdtxeFeU21Fsfbt2yg3S2YWchRcYwyhjS2NBqWjq+QNCxxwyN6diZ65vu3LPbt\/np7Zemg8WpZ2WQtIfErPtXtlezHrOHL2vCt9uzkSL0irxqsb7pkpdU5o56Y9VhbGxoweudIcJFeWGqtzEy6vH20ODl\/f27qDymTzKqklWFiCL\/8wa566U81L4G8BPL\/A+R\/BgAzCInEE2+\/LgAAAABJRU5ErkJggg==' alt='img'\/><\/div><div class='stb-caption-content'>run_sr_georef.bat<\/div><div class='stb-tool'><\/div><\/div><div class='stb-content'><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@echo off\nsetlocal enabledelayedexpansion\n\nset OUTDIR=output\nif not exist %OUTDIR% mkdir %OUTDIR%\n\nREM === Boucle sur tous les tif de input ===\nfor %%F in (input\\*.tif) do (\n    echo -------------------------------\n    echo Traitement de : %%F\n\n    set BASENAME=%%~nF\n\n    REM === Extraction coordonn\u00e9es ===\n    for \/f \"tokens=2,3,4,5 delims=(,)\" %%a in ('gdalinfo \"%%F\" ^| find \"Upper Left\"') do (\n        set ULX=%%a\n        set ULY=%%b\n    )\n\n    for \/f \"tokens=2,3,4,5 delims=(,)\" %%a in ('gdalinfo \"%%F\" ^| find \"Lower Right\"') do (\n        set LRX=%%a\n        set LRY=%%b\n    )\n\n    echo ULX=!ULX!\n    echo ULY=!ULY!\n    echo LRX=!LRX!\n    echo LRY=!LRY!\n\n    REM === 1. Extraction PNG temporaire ===\n    gdal_translate -of PNG \"%%F\" temp.png\n\n    REM === 2. Super-r\u00e9solution ===\n    <mark style=\"background-color:#fcb900\" class=\"has-inline-color has-black-color\">C:\\SR\\realesrgan-ncnn-vulkan-20220424-windows<\/mark>\\realesrgan-ncnn-vulkan.exe -i temp.png -o temp_sr.png -s 4\n\n    REM === 3. Conversion en TIF g\u00e9or\u00e9f\u00e9renc\u00e9 ===\n    gdal_translate temp_sr.png \"%OUTDIR%\\!BASENAME!_sr.tif\" -a_ullr !ULX! !ULY! !LRX! !LRY! -a_srs <mark style=\"background-color:#fcb900\" class=\"has-inline-color\">EPSG:2154<\/mark>\n\n    echo Resultat : %OUTDIR%\\!BASENAME!_sr.tif\n    echo DONE\n)\n\nREM === Suppression fichiers temporaires ===\ndel temp.png\ndel temp_sr.png\n\n\n<\/code><\/pre>\n\n\n\n<p><\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"237\" data-attachment-id=\"16065\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/ameliorer-la-resolution-des-images-aeriennes-avec-esrgan-quand-lia-redonne-vie-aux-vieux-cliches\/sr_batch\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?fit=2560%2C948&amp;ssl=1\" data-orig-size=\"2560,948\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"sr_batch\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?fit=640%2C237&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch.jpg?resize=640%2C237&#038;ssl=1\" alt=\"\" class=\"wp-image-16065\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?resize=1024%2C379&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?resize=300%2C111&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?resize=768%2C284&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?resize=1536%2C569&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?resize=2048%2C758&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/figure>\n\n\n\n<p>Notes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This script assumes that gdalinfo.exe and gdal_translate.exe can be found (add the paths if necessary).<\/li>\n\n\n\n<li>The script first converts to PNG to avoid certain TIF files with exotic compression that would cause the executable to fail.<\/li>\n\n\n\n<li>-a_ullr uses the exact bounds. If the original had a slightly non-axial geotransformation (rotation), -a_ullr would lose the rotation; this is rare in orthophotos: if there is rotation, a more advanced GDAL Python script will be needed.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Tips_pitfalls_to_avoid\"><\/span>5) Tips &amp; pitfalls to avoid<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Keep the original: never work on the original\u2014keep a copy.<\/li>\n\n\n\n<li>Bad compression\/exotic TIFs: converting to PNG is often safer.<\/li>\n\n\n\n<li>Rotation\/shearing: -a_ullr assumes no rotation. For georeferenced images with rotation, you need to rewrite the complete geotransform \u2192 GDAL Python script to apply SetGeoTransform. Let me know if you have this case.<\/li>\n\n\n\n<li>Hallucinations: ES(R)GAN can invent unreal details \u2014 check visually and document the processing.<\/li>\n\n\n\n<li>Huge size: for very large images (&gt;10,000 px), use small -tile (50\u2013150) and enough RAM\/temp disk.<\/li>\n\n\n\n<li>Metadata: the final GeoTIFF does not automatically include the image&rsquo;s EXIF metadata; if needed, use gdal_copy or gdal_translate -co to add info.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Add_GFPGAN_optional\"><\/span>6) Add GFPGAN (optional)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If the photo contains damaged people\/facades and you want to locally improve faces\/details after SR:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install GFPGAN (or download the executable if available).<\/li>\n\n\n\n<li>Run GFPGAN on the SR output:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>gfpgan.exe -i image_x4.png -o image_x4_gfpgan.png --upscale 1\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Integration_into_QGIS\"><\/span>Integration into QGIS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are three simple methods for using ESRGAN in QGIS:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Via_Python_processing_Processing_Toolbox\"><\/span>1. Via Python processing (Processing Toolbox)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Create a Python script that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>takes a raster as input<\/li>\n\n\n\n<li>launches ESRGAN<\/li>\n\n\n\n<li>automatically reloads the enhanced image into QGIS<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Via_an_external_plugin\"><\/span>2. Via an external plugin<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Create a custom plugin based on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>an \u201cESRGAN Super-resolution\u201d button<\/li>\n\n\n\n<li>a simple interface: model, \u00d72\/\u00d74 factor, input file<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Via_an_image_RW_workflow\"><\/span>3. Via an image R\/W workflow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Use ESRGAN for pre-processing before importing images into QGIS<\/p>\n\n\n\n<p>\u2192 ideal for old orthophotos.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Advantages\"><\/span>Advantages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>&#x2714; Gives new life to aerial archives<\/p>\n\n\n\n<p>&#x2714; Enables more detailed remote sensing analysis<\/p>\n\n\n\n<p>&#x2714; Useful for extracting objects (buildings, beaches, ravines, etc.)<\/p>\n\n\n\n<p>&#x2714; Works with highly degraded images<\/p>\n\n\n\n<p>&#x2714; 100% open source ecosystem<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Limitations\"><\/span>Limitations<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>&#x26a0; ESRGAN does not predict reality:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>it reconstructs plausible details, which are not guaranteed to be accurate.<\/li>\n<\/ul>\n\n\n\n<p>&#x26a0; Risk of artifacts on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>high-contrast edges<\/li>\n\n\n\n<li>heterogeneous urban areas<\/li>\n\n\n\n<li>deep shadows<\/li>\n<\/ul>\n\n\n\n<p>&#x26a0; Avoid using for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>regulatory mapping<\/li>\n\n\n\n<li>analyses intended to reflect reality down to the pixel<\/li>\n<\/ul>\n\n\n\n<p>However, for exploratory mapping, data preparation, or heritage work, it is an extremely powerful tool.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Towards_a_specialized_ESRGAN_for_aerial_images\"><\/span>Towards a specialized ESRGAN for aerial images?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>An exciting avenue of research: training an ESRGAN specifically on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>high-resolution orthophotos<\/li>\n\n\n\n<li>current aerial images (10\u201320 cm\/pixel)<\/li>\n\n\n\n<li>natural tropical, coastal, or agricultural textures<\/li>\n<\/ul>\n\n\n\n<p>This would result in a model perfectly suited to scanning archives from the 1960s to the 1990s.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>ESRGAN is literally transforming our ability to exploit aerial imagery.<\/p>\n\n\n\n<p>For the first time, it is possible to restore detail to old data and turn it into usable sources for modern geomatics.<\/p>\n\n\n\n<p>Access to open source models and PyTorch paves the way for a new ecosystem of free tools&#8230; serving history, the environment, and cartography.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aerial images are a gold mine: old surveys, forest inventories, coastal monitoring, digitized cadastral maps, etc. But they often suffer from a major problem: low resolution. Blurring, pixelation, crushed textures, loss of detail&#8230; these are all&hellip;<\/p>\n","protected":false},"author":1,"featured_media":16065,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3857,3833,1377],"tags":[3875,3837,1386,3925],"class_list":["post-16202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iaen","category-images-en","category-qgis-en","tag-ia-en","tag-images-en","tag-qgis-en","tag-superresolution-en"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2025\/11\/sr_batch-scaled.jpg?fit=2560%2C948&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-4dk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/16202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=16202"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/16202\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media\/16065"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=16202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=16202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=16202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}