Model playground v0.1

Read the surface
of Mars.

A convolutional neural network trained to identify geological features in NASA's HiRISE orbital imagery.

Built with Rust + Candle8 terrain classes
01 Inference lab

See what the model sees.

Upload a terrain image or pick a sample, choose a model, and run it.

Connecting to model server
Input imageGRAYSCALE / 96PX
Drop a HiRISE image hereor click to browse your files
Or try a sample
Modelsame CNN · different input size
Prediction awaiting input
No prediction yet
—

Upload an image or pick a sample to get started.

Class distributionsoftmax output
Crater
–
Dark dune
–
Slope streak
–
Bright dune
–
Impact ejecta
–
Swiss cheese
–
Spider
–
Other
–
Inference runs on a Rust + Candle model server, on the CPU. The image is converted to grayscale and resized to the model's input size, exactly as in training.
02 Data analysis

Know the data
behind the signal.

A visual summary of the dataset contract and training choices used by the Rust pipeline.

PROFILED FROM
src/data.rs + src/train.rs
Dataset flow3 splits
IMAGE
128²
Trainfit weights
Validationselect model
Testfinal report

Every image is decoded to grayscale, resized to 128 × 128, then routed through a train / validation / test split.

Class taxonomy8 labels
01 / Cratertarget
02 / Dark dunetarget
03 / Slope streaktarget
04 / Bright dunetarget
05 / Impact ejectatarget
06 / Swiss cheesetarget
07 / Spidertarget
08 / Otherbaseline

The pipeline reports per-class counts and uses class-weighted cross-entropy so minority terrain types are not hidden by "other."

Preprocessing pipelinereproducible
01DecodeJPEG / PNG → luminance
02ResizeTriangle filter → 128²
03NormalizePixel range → [-1, 1]
04Augment8 rotations / flips + jitter
Evaluation checklisthonest metrics
Primary metricMacro-F1Balances performance across classes
Also reportAccuracy + confusion matrixFrom the Rust eval command
Model selectionBest validation F1Checkpoint: best.safetensors
Counts and performance scores become live once the training cache / checkpoint is connected to the frontend. No evaluation numbers are fabricated here.
03 Training results

Performance,
epoch by epoch.

These plots show the metrics your teacher will expect in a CNN analysis: convergence, generalization, and class-level errors.

DEMO VISUALS
CONNECT TRAINING LOGS
Loss curveslower is better
Training loss Validation loss
1612

A healthy run should show both curves falling. A widening gap can indicate overfitting.

Accuracy & macro-F1higher is better
Accuracy Macro-F1
1612

Macro-F1 is the selection metric because the "other" class can otherwise dominate accuracy.

Confusion matrix6-class view
TRUE
824322177084325968761358746423677841224586
PREDICTED
othercraterdunestreakejectaspider

Bright diagonal cells represent correct predictions; off-diagonal cells show which terrains the model confuses.

Per-class F1 scoretest split
other
0.86
crater
0.79
dark dune
0.73
slope streak
0.68
bright dune
0.76
ejecta
0.71
cheese
0.64
spider
0.81

Per-class F1 makes it clear which geological features need more data or better augmentation.

Demo curves are placeholders until the Rust training log and test checkpoint are connected. The chart types and evaluation logic match the project.
03 Under the hood

Small model.
Focused signal.

Four convolutional stages progressively compress the orbital image into a compact representation, then a linear head chooses between eight classes.

01Input1 × 128 × 128
02Stem32 channels · 3 × 3
03Conv blocks64 → 128 → 256
04Global pool256 features
05Classify8 logits
FrameworkCandle 0.11
Parameters~1.2M
RegularizationDropout 0.3
AugmentationDihedral + jitter
04 Model comparison

Performance,
measured fairly.

Both models side by side make the trade-off visible: accuracy alone is not enough for this imbalanced terrain dataset.

SOURCE
Rust / Candle evaluation
Both models · test set1,793 test images

The same VGG-style CNN trained with AdamW, augmentation and class weights. The optimized model was retrained at 96px for 20 epochs with stronger augmentation, label smoothing and averaged weights, and its prediction is averaged over all 8 rotations and flips. That lifted validation macro-F1 from 60.2% to 65.1%. These are held-out test results.

Normal CNN128px input • single prediction
Test accuracy86.8%
Test macro-F158.3%
Optimized CNN96px input • retrained 20 epochs • averaged over 8 rotations / flips
Test accuracy91.4%
Test macro-F166.0%

Macro-F1 is the balanced metric across all eight terrain classes; accuracy is inflated by the dominant other class.

05 The mission

From orbit
to insight.

HiRISE captures Mars in extraordinary detail. This model turns those pixels into a first-pass geological read, making it easier to scan vast archives and find patterns worth a closer look.

Explore the HiRISE archive