GeFolki is a coregistration software for SAR/SAR and for other cases of remote sensing image coregistration (ex LIDAR/SAR, optics/SAR, hyperspectral/optics)
Project description
gefolki
GeFolki is a dense image coregistration library for remote sensing. It is designed for SAR/SAR registration and also for heterogeneous pairs such as SAR/optical, SAR/LiDAR, or hyperspectral/optical when a coarse initialization is already available.
The package estimates a dense displacement field between a reference image and a secondary image, then lets you resample the secondary image onto the reference geometry. The method is based on optical-flow-style matching adapted to remote sensing imagery, including rank filtering, multiscale pyramids, and a contrast inversion strategy for heterogeneous data.
Upstream And Packaging
This repository is the PyPI packaging and maintenance layer for the upstream GeFolki project hosted at:
https://github.com/aplyer/gefolki
The upstream repository is the historical source of the algorithms, example material, manuals, and citation guidance. This repository focuses on making GeFolki installable and usable as a packaged Python project, including:
- modern Python packaging
- the packaged CLI interface
- tests and CI
- repository-local documentation for the Python API and usage patterns
What GeFolki Does
GeFolki is the middle step of a three-step coregistration workflow described in the project documentation:
- Initialization Put the secondary image into roughly the same geometry, extent, and pixel grid as the reference image.
- Dense flow estimation Estimate the per-pixel displacement field between the two aligned images.
- Resampling Warp the secondary image with the estimated displacement field.
GeFolki handles steps 2 and 3 directly. Step 1 is intentionally external because it depends on sensor geometry, control points, geocoding, DEMs, orbit data, or a simpler crop/resize/rotation workflow.
When To Use Which Method
The library exposes three dense registration variants:
FolkiBest suited to more standard optical-flow conditions where brightness consistency is reasonable.EFolkiAdds rank-based filtering to improve robustness for remote sensing imagery and texture changes.GEFolkiAdds contrast adaptation and is intended for heterogeneous image pairs such as radar/optical or radar/LiDAR.
In practice:
- Use
Folkifor homogeneous image pairs with relatively consistent appearance. - Use
EFolkifor homogeneous remote sensing pairs that need more robustness. - Use
GEFolkifor heterogeneous modalities or local contrast inversion cases.
Key Capabilities
- Dense sub-image matching on a full grid
- Multiscale pyramid search for larger displacements
- Rank-filter-based matching for difficult remote sensing textures
- Contrast inversion handling for heterogeneous imagery
- Resampling of the secondary image from the estimated flow
- A CLI utility to search a smaller secondary image inside a larger reference raster
Installation
From source with pip
python -m pip install .
From PyPI
pip install gefolki
Input and Output Model
Inputs to dense registration
All three main registration functions expect:
I0: reference image as a 2D arrayI1: secondary image as a 2D array, already initialized to the reference grid- algorithm parameters such as
radius,levels,iteration, andrank
The arrays are normalized internally by the pyramid wrapper, but input images should still be numerically well-behaved and represent meaningful intensity structure.
Outputs from dense registration
The registration functions return two arrays:
u: horizontal displacement fieldv: vertical displacement field
Both arrays have the same shape as the input images. Together they define the dense deformation needed to warp the secondary image onto the reference image.
CLI: Mining Workflow
The package exposes one command-line entry point:
gefolki-mining --input_reference REFERENCE.tif --input_secondary SECONDARY.png --rank 3 --fdecimation 8
This workflow searches for a smaller secondary image inside a larger reference image using a coarse-to-fine rank-based matching procedure.
Mining inputs
--input_referencePath to the reference raster opened withrasterio--input_secondaryPath to the secondary image opened withskimage.io.imread--rankRank filter radius--fdecimationDecimation factor for the coarse search
Mining outputs
The function gefolki.mining.mining(...) returns:
xminxmaxyminymaxreference_final
These correspond to the detected bounding box in the reference image and the extracted matching subimage. The CLI currently visualizes the process and prints basic execution messages rather than writing a structured file output.
Demo Workflow
The built-in demo expects these local files:
./datasets/radar_bandep.png./datasets/lidar_georef.png./datasets/optiquehr_georef.png
Example:
import gefolki
gefolki.demo()
The demo:
- computes a LiDAR/radar registration example
- computes an optical/radar registration example
- displays the displacement norm
- displays before/after fused visualizations
References
The original manuals cite these publications for scientific use:
- Aurélien Plyer, Elise Colin-Koeniguer, Flora Weissgerber, "A New Coregistration Algorithm for Recent Applications on Urban SAR Images", IEEE Geoscience and Remote Sensing Letters, 2015.
- Guillaume Brigot, Elise Colin-Koeniguer, Aurélien Plyer, Fabrice Janez, "Adaptation and Evaluation of an Optical Flow Method Applied to Coregistration of Forest Remote Sensing Images", IEEE JSTARS, 2016.
If you use GeFolki in scientific work, cite the publication that matches your homogeneous or heterogeneous registration scenario.
The upstream project also documents its recommended citation guidance here: https://github.com/aplyer/gefolki?tab=readme-ov-file#citations-for-ge-e-_folki-algorithms-
License
This repository follows the upstream project license and is distributed under GPL-3.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gefolki-1.1.0.tar.gz.
File metadata
- Download URL: gefolki-1.1.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adf97ecc443bf37b7eb41f6592db63008f86cc856dd12fd04ef9ae296f9a9067
|
|
| MD5 |
8e3699c5b3d6c840f30239c4b5d0e3cc
|
|
| BLAKE2b-256 |
99227edfb60358bf5eedd3bd6bff6249f649a3a9fa4efa42e3bd0c8fda5b6727
|
Provenance
The following attestation bundles were made for gefolki-1.1.0.tar.gz:
Publisher:
package.yaml on Terradue/gefolki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gefolki-1.1.0.tar.gz -
Subject digest:
adf97ecc443bf37b7eb41f6592db63008f86cc856dd12fd04ef9ae296f9a9067 - Sigstore transparency entry: 1755314554
- Sigstore integration time:
-
Permalink:
Terradue/gefolki@64855815a5e1895ba568ef6bc7028bb80e4339a9 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/Terradue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yaml@64855815a5e1895ba568ef6bc7028bb80e4339a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gefolki-1.1.0-py3-none-any.whl.
File metadata
- Download URL: gefolki-1.1.0-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3c450fb9e2afd59face428fcfb88734aec33d93087a1c13e36f05654c4a3b11
|
|
| MD5 |
d62b0da91af426a368daabbb180e98a5
|
|
| BLAKE2b-256 |
86847127accce24921173953f1f0c4eee630dc88dac23bf3b4db880b82c8c1bd
|
Provenance
The following attestation bundles were made for gefolki-1.1.0-py3-none-any.whl:
Publisher:
package.yaml on Terradue/gefolki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gefolki-1.1.0-py3-none-any.whl -
Subject digest:
d3c450fb9e2afd59face428fcfb88734aec33d93087a1c13e36f05654c4a3b11 - Sigstore transparency entry: 1755314602
- Sigstore integration time:
-
Permalink:
Terradue/gefolki@64855815a5e1895ba568ef6bc7028bb80e4339a9 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/Terradue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yaml@64855815a5e1895ba568ef6bc7028bb80e4339a9 -
Trigger Event:
push
-
Statement type: