Skip to main content

MIRAGE 1.4.0

Español · API · Validation

MIRAGE extracts raster lineaments for human review. QGIS is the primary interface; the mirage-geo distribution exposes the mirage Python package and mirage CLI. GPL-3.0-or-later, Jordan Zavaleta.

Scope (unchanged since 1.3.0): the new routes, benchmarks and calibration apply only to geophysical mode (magnetic and gravity grids). Geological and archaeological modes retain v1.2.0 behavior and were not reevaluated. Neither route identifies the geological origin of a feature, and texture or circular geometry does not establish archaeology.

Installation

For QGIS, download MIRAGE_QGIS_1.4.0.zip from release v1.4.0, then Plugins → Manage and Install Plugins → Install from ZIP. Open the MIRAGE panel. Its explicit dependency installer uses the QGIS settings directory; MIRAGE_QGIS_DEPENDENCIES can override that directory. It retains the host GIS libraries. Tested with QGIS 3.44.12 on Windows, offscreen.

For Python 3.11 or 3.12, create an isolated environment (Git is needed only for the tag install):

python -m venv .venv
# Activate .venv using your shell, then:
pip install mirage-geo
pip install "mirage-geo[io,wavelets,nn]"
# or directly from the tag:
pip install "mirage-geo @ git+https://github.com/jordan-zav/MIRAGE@v1.4.0"
mirage --help

The second command adds standalone raster/vector I/O, PyWavelets and ONNX Runtime CPU. The gui extra adds standalone Tk interface dependencies; dev adds testing/build tools. No extra contains model weights or PyTorch. In a source checkout use pip install -e ".[dev,wavelets,nn,io]" for development.

Geophysical routes and profiles

Route/profile Behavior
A: geomatic THDR, multilevel worming, wavelets and tensor anisotropy; no neural weights
geophysics (default) Calibrated worming, threshold 0.50; heights 0/2/4 and scales 1/2/4 times cell size
legacy-v120 Historical v1.2.0 file pipeline through API, CLI and QGIS
legacy-array Previous array defaults, THDR at 0.20; separate from v1.2 file parity
B: neural/onnx Experimental external model inference; explicit manifest and SHA-256 required

Calling mirage.profiles() exposes engine calibration. Explicit method and threshold overrides remain available. Old source-bound recipes retain legacy-v120 unless explicitly overridden. Scientific profiles explains compatibility.

import numpy as np
import mirage

image = np.tile(np.tanh((np.arange(64) - 31) / 3), (64, 1))
result = mirage.extract(image, pixel_size=25)
result.write("new_lineaments.gpkg", "EPSG:32750")
print(mirage.profiles(), mirage.provenance())

Geophysical grids must be finite, north-up, square and projected in metres. The array caller supplies a truthful metric transform; file/QGIS adapters enforce CRS requirements. Physical scales and continuation heights are not inferred geological depths. Processing is global in memory; regional or out-of-core scalability is not certified. Crop large rasters deliberately. Outputs include line geometry, route/method, length, azimuth, strength and applicable scale/height; worming retains amplitude per vertex. Strength is not geological confidence.

mirage -i input.tif -o new_output --feature-mode "Geophysics Potential Fields" --input-kind magnetic --geophysics-profile geophysics
mirage -i input.tif -o legacy_output --feature-mode "Geophysics Potential Fields" --input-kind magnetic --geophysics-profile legacy-v120

QGIS retains declared-input physical recommendations, three previews of the same native window, human selection and source-bound recipes. See workflow and parameters.

Evidence and limits

The expanded synthetic bank contains 3,000 independent 128 × 128 Harmonica scenes: 1,800 training, 600 validation, 600 test. Test reference geometry is the upper projected body trace, with a primary tolerance of two cells. Calibration and model selection used validation only.

Test method Precision Recall F1 Position error (cells)
A worming 0.509 0.719 0.564 1.898
A wavelets 0.473 0.785 0.550 1.578
B TEED, seed selected by validation 0.824 0.662 0.715 8.569

B improves F1 here but worsens localization; empty predictions receive the preregistered diagonal penalty (16 B scenes versus zero worming scenes). It fails the joint superiority criterion. This table does not imply higher synthetic recall for B.

Pilbara, Mount Isa and Broken Hill compare predictions against Geoscience Australia RTP magnetics and 1:1,000,000 mapped faults/shear zones (CC BY 4.0). These regions share compilation, processing and map scale: they are not independent validation sources. At 500 m, B increases mapped-fault coverage (paired CI95 +4.79 to +9.32 percentage points) but also unmatched detection density (CI95 +0.0037 to +0.0173 km/km²), exceeding the allowed margin. B provides more cartographic coverage but worse synthetic position and fails the joint real concordance criterion. Cartographic agreement is not geological truth or origin identification. See verifiable results and research.

Route B with your own model

Install the nn extra. Obtain or train your own licensed ONNX model and place a JSON manifest beside it. MIRAGE never downloads weights during import or extraction. The model must accept float32 NCHW, three repeated normalized grayscale channels scaled by input_scale with channel mean subtraction, and return one spatial probability map (or logits when declared). Reflection padding satisfies multiple; the output is cropped to the input shape. Validate this preprocessing and a threshold for your own survey.

{
  "path": "my-model.onnx",
  "sha256": "REPLACE_WITH_THE_64_CHARACTER_SHA256_OF_YOUR_MODEL",
  "code_license": "MIT",
  "weights_license": "MIT",
  "multiple": 8,
  "input_scale": 255.0,
  "mean": [103.939, 116.779, 123.68],
  "logits": false
}

The license fields must record actual permissions, not the example labels: accepted code licenses are MIT, Apache-2.0 or BSD-3-Clause; weights also accept CC0-1.0. Compute the SHA-256 of the exact binary and replace the placeholder. A relative model path resolves beside the manifest.

result = mirage.extract(image, route="neural", method="onnx",
                        model="my-model.json", pixel_size=25, threshold=0.5)
result.write("new_neural_lineaments.gpkg", "EPSG:32750")

This interface is the array API; the historical file CLI and own QGIS panel do not expose ONNX selection. No weights are distributed. TEED code is MIT, but a separately scoped permission for its original checkpoint is not confirmed. The previous research recorded repository-wide MIT as its basis; that is not an independently confirmed checkpoint grant. Review rights before redistributing any original or derived model. Reproduction and hashes.

Citation and development

Cite: Zavaleta, Jordan. MIRAGE: reproducible raster lineament extraction, version 1.4.0. Zenodo. https://doi.org/10.5281/zenodo.24269845 (all versions). CITATION.cff and .zenodo.json provide metadata.

python -m pytest
python -m ruff check src tests mirage_qgis scripts setup.py
python -m build
python scripts/package_qgis.py --output MIRAGE_QGIS_1.4.0.zip

Changelog · Release notes · Author publishing guide (Spanish) · GPL-3.0-or-later.

Metadata

Release files for mirage-geo 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mirage-geo 1.4.0
File Size Uploaded Provenance Actions
mirage_geo-1.4.0.tar.gz 739.9 kB With provenance Details for mirage_geo-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mirage-geo 1.4.0
File Interpreter ABI Platform Actions
mirage_geo-1.4.0-py3-none-any.whl Python 3 none any Details for mirage_geo-1.4.0-py3-none-any.whl

Total release size: 998.0 kB

Release files / mirage_geo-1.4.0.tar.gz

Download URL mirage_geo-1.4.0.tar.gz
Size 739.9 kB
Tags Source
SHA-256 checksum
How to use checksums
17f2222568aafffa22a27e53fa75c34c88aa15a61e5cf4ab2c265d8d48a0ec69
BLAKE2b-256 checksum
How to use checksums
4df040743e6eb2457acde19968de036391d3aa9c7bf3b9414f5f6d06196e2781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / mirage_geo-1.4.0-py3-none-any.whl

Download URL mirage_geo-1.4.0-py3-none-any.whl
Size 258.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29f6aca67b24dccafce5e346020ad265af7edec9124d524024c28d5e190d6cf5
BLAKE2b-256 checksum
How to use checksums
29f22cf8035b280ab0d47e228b164260079de82dd1499008913696f41d631b79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for mirage-geo 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mirage_geo-1.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page