Skip to main content

MIRAGE 1.3.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 of 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.3.0.zip from release v1.3.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.3.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.3.0. https://github.com/jordan-zav/MIRAGE. CITATION.cff and .zenodo.json provide metadata. No DOI has been assigned here; add the actual Zenodo DOI after release.

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.3.0.zip

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

Metadata

Release files for mirage-geo 1.3.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.3.0
File Size Uploaded Provenance Actions
mirage_geo-1.3.0.tar.gz 724.5 kB With provenance Details for mirage_geo-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 981.5 kB

Release files / mirage_geo-1.3.0.tar.gz

Download URL mirage_geo-1.3.0.tar.gz
Size 724.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b363a581108ec9f549a0f2edda50a8a96f5400d0bafd2f7bf392b3b49c6c612f
BLAKE2b-256 checksum
How to use checksums
d47e9f1b7564ee5772c310671e81eba4f155188cc6d9ef49d04d7a4c3ca4dd2a
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 16, 2026.

Transparency log

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

Download URL mirage_geo-1.3.0-py3-none-any.whl
Size 256.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
237246786f24b5c0be12f31dc4437d73ebdb7b7ef63410038f281f7b67c2d790
BLAKE2b-256 checksum
How to use checksums
44a883b6d6c6efee2757f59c7fb521c38253d39295fca69a049d70f2a7b73872
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 16, 2026.

Transparency log

Security for mirage-geo 1.3.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.3.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 16, 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