MarsSimNav is a deep learning and path planning system designed to simulate autonomous Mars rover navigation using real NASA imagery. It leverages a DeepLabV3+ segmentation model trained on the AI4Mars dataset to classify Martian terrain types, followed by A search* to calculate optimal paths over hazardous terrain.
- Semantic Segmentation: Powered by DeepLabV3+ with a ResNet50 backbone.
- Custom Pipeline: Specialized PyTorch Dataset handling for AI4Mars pixel-level annotations.
- Terrain-Aware Path Planning: Implements the A* algorithm via NetworkX.
- Cost-Based Navigation: Assigns navigation weights to different terrain types (soil, bedrock, sand, big rocks).
- Visualization: Generates visual overlays of the predicted rover path on original Mars surface images.
- Scalable: Supports subsetting for lightweight experimentation (e.g., 5,000 images).
- Source: AI4Mars Dataset from NASA JPL.
- Imagery: Over 18,000 images captured by the Curiosity rover (MSL).
- Labels: Pixel-level annotations for:
- Soil: Safe for traverse.
- Bedrock: Stable but requires caution.
- Sand: High risk of entrapment.
- Big Rocks: Physical obstacles.
- Core: Python 3.11, PyTorch, Torchvision
- Algorithms: DeepLabV3+, A* (NetworkX)
- Data & Visualization: Matplotlib, PIL, NumPy
- Environment: Google Colab / Linux
git clone [https://github.com/pushkar-hue/marssimnav.git](https://github.com/pushkar-hue/marssimnav.git)
cd marssimnavpip install -r requirements.txt-
Ensure your trained model is available as
deeplabv3_mars.pth. -
Place sample Mars images in
ai4mars-subset/images/. -
Run the inference script or call the planning function:
The system follows a 4-step pipeline to ensure safe navigation:
-
Inference: Predict the segmentation mask using the DeepLabV3+ model.
-
Mapping: Convert the mask into a Terrain Cost Map based on class IDs.
-
Search: Use A* to find the lowest-cost path from start to goal coordinates.
-
Overlay: Project the computed path onto the original image for visualization.
Terrain,Class ID,Cost Weight,Risk Level Soil,0,1,Low Bedrock,1,4,Moderate Sand,2,6,High Big Rock,3,10,Obstacle
Pixels with unknown labels (e.g. masked/NULL) are assigned high cost or skipped.
Input Image Segmentation Mask Planned Path Overlay
mars_image.jpg predicted_mask.png planned_path_overlay.png

-
Add support for D* Lite and real-time replanning
-
Interactive terrain selection and goal input via UI
-
Animated simulation of rover motion along the path
-
Deployable web dashboard using Streamlit or Gradio
-
Integration with planetary data system (PDS) metadata
Authors
- Pushkar Sharma (@pushkar-hue)
- Ved Thorat (@i3hz)
Special thanks to NASA JPL for providing the AI4Mars Dataset.