Automatic identification of geologically interesting regions on Mars using autoencoders and satellite imagery from HiRISE and CTX. This project processes large-scale mosaics from The Murray Lab, applies normalization and tiling strategies, trains autoencoders for unsupervised anomaly detection, and generates anomaly heatmaps to support planetary exploration and geological mapping.
Planetary scientists rely on high-resolution imagery to study the Martian surface. This project automates the pipeline:
- Download & transform CTX mosaics (from The Murray Lab).
- Normalization and preprocessing of TIF mosaics into tiles.
- Autoencoder training for anomaly detection.
- Reconstruction & anomaly scoring per tile.
- Heatmap generation for visual exploration of anomalies.
The final outputs are geospatial heatmaps that highlight regions of potential geological interest.
download_ctx.py→ downloads CTX tiles in.zipformat.decompress_ctx.py→ extracts ZIP archives into TIF mosaics.
normalize_tif.py→ histogram matching + normalization (z-score, min-max).tile_single_mosaic.py→ splits large mosaics into small PNG tiles.tif_to_png_split.py→ organizes tiles intotrain/val/testsubsets.
Further stages (not shown in the diagram) handle:
- Model training (
advanced_cae.py,main.py) - Inference over tiles or passes (
infer_* scripts) - Visualization (
plain_overlay.py,heatmap_overlay.py)
- Unsupervised anomaly detection with convolutional autoencoders.
- End-to-end data preparation pipeline for CTX mosaics.
- Heatmap generation for anomaly visualization.
- Modular scripts for preprocessing, training, inference, and visualization.
- Python 3.10+
- TensorFlow / Keras (autoencoder training & inference)
- Rasterio (geospatial raster handling)
- OpenCV / NumPy (image processing)
- scikit-image (histogram matching, SSIM)
- tqdm (progress tracking)
- QGIS (optional: for further geospatial visualization)
The trained convolutional autoencoder was able to reconstruct CTX tiles and highlight anomalous regions. The following examples show how anomaly scores are transformed into visual overlays and heatmaps:
Original tile (left), heatmap (right):
Original tile (left), heatmap (right):
These results demonstrate the ability of the pipeline to support automatic geological feature discovery and provide scientists with prioritized regions for further exploration.
This project is licensed under the MIT License. See the LICENSE file for details.
👤 Author: Enrique Ruiz Ruiz
🎓 Master’s Thesis – Universidad de Alcalá de Henares


