CoolFace
Apppublic

Polo123/NASA-Crater-detection

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

NASA Crater Detection - Interactive Inference Space

This Space is built for inference-only crater detection with ONNX Runtime and includes technical visualizations of the decode pipeline.

What this Space shows

  • —Downloadable sample images (plus zip) for quick testing
  • —Final crater ellipses overlaid on the uploaded image
  • —Heatmap visualization
  • —Local maxima after thresholding
  • —Top-K candidate centers
  • —Kept points after adaptive NMS
  • —Full candidate table with rejection reasons
  • —Downloadable contest-format CSV

Model pipeline (high-level)

  1. 1.Predict heatmap, size (a, b), angle terms (sin2theta, cos2theta), and offsets.
  2. 2.Detect candidate peaks by threshold + local maxima.
  3. 3.Decode center coordinates and ellipse parameters.
  4. 4.Apply Top-K prefilter.
  5. 5.Apply adaptive NMS.
  6. 6.Keep valid detections and export final results.

Files

  • —app.py - Gradio UI
  • —space_inference.py - ONNX inference + decode logic
  • —visualization.py - technical rendering helpers
  • —model/model.onnx + model/model.onnx.data - ONNX graph and external weights
  • —assets/samples/ - 3 train images for download + one zip bundle

Local run

bash
pip install -r requirements.txt
python app.py