1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Super-resolution for geospatial imagery
//!
//! This module provides super-resolution capabilities using ONNX models
//! (Real-ESRGAN and similar architectures) with tile-based processing
//! to handle large rasters efficiently.
//!
//! # Features
//!
//! - Tile-based processing with overlap blending
//! - Support for 2x and 4x upsampling
//! - Memory-efficient batch processing
//! - Preserves geospatial metadata (GeoTransform)
//! - Edge case handling for tiles at boundaries
//!
//! # Example
//!
//! ```no_run
//! use oxigdal_ml::superres::{SuperResolution, SuperResConfig};
//! use oxigdal_core::buffer::RasterBuffer;
//! use oxigdal_core::types::RasterDataType;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create configuration
//! let config = SuperResConfig::new(2, 256, 32);
//!
//! // Load model
//! let mut model = SuperResolution::from_file("real_esrgan_2x.onnx", config)?;
//!
//! // Create input raster
//! let input = RasterBuffer::zeros(512, 512, RasterDataType::Float32);
//!
//! // Upscale
//! let output = model.upscale(&input)?;
//! # Ok(())
//! # }
//! ```
pub use ;
use crateResult;
use RasterBuffer;
/// Upscale factor for super-resolution