I added new features to make the website more interactive and engaging. Users can select a date, view the previous or next astronomy picture, or discover a random NASA image. I also added HD viewing, link copying, a loading animation, improved error handling, and responsive design for mobile devices.
adding new features
Final Devlog – Mars Terrain Classifier
The Mars Terrain Classifier is now live The model runs on Hugging Face for inference, and the frontend is deployed on Netlify. You can try it here: 🔗 https://mars-terrain-classifier.netlify.app
The model works well on clear orbital images from HiRISE, but it struggles with low-resolution photos, overexposed shots, or images with unusual color tones. It also has difficulty with rover-level photos (like from Curiosity or Perseverance) since it was trained only on orbiter data. Categories like spider and swiss cheese have fewer training samples, so predictions there are less confident. Upload a Mars image and see what happens – if it fails, it’s probably a resolution or color issue. The web UI is fully functional with drag-and-drop upload and real-time confidence scores.
Live demo: https://mars-terrain-classifier.netlify.app
GitHub: https://github.com/gelo-dev-e/mars-terrain-classifier
Devlog – Web UI for Mars Terrain Classifier
Title: Building a Web Interface for the Mars Terrain Classifier
After training the model to 97% validation accuracy, I created a web-based user interface to make the classifier accessible to anyone – no command line needed.
The UI features:
Drag & drop image upload
Real-time prediction display
7 terrain categories with visual indicators
Clean NASA-inspired design (dark theme, Mars colors)
I’m not sure yet if I will deploy this publicly online, but the entire project will remain open source. The code, the training scripts, the web UI, and everything else will be available on GitHub for anyone to use, modify, or improve.
Devlog – Training Complete!
After all the dataset struggles, I finally completed the training!
Training Results
I trained a ResNet50 model for 20 epochs on 7 Mars terrain categories (bright dune, crater, dark dune, impact ejecta, slope streak, spider, swiss cheese).
Final metrics:
Training Accuracy: 96.41%
Validation Accuracy: 96.80%
Best Validation Accuracy: 97.00%
Training Loss: 0.1261
Validation Loss: 0.0968
The model achieved 97% validation accuracy which is solid for a 7-class classifier on orbital Mars imagery.
What Worked Well
ResNet50 pretrained on ImageNet was a great base – even with limited data, it learned quickly
Freezing early layers and only training layer4 + fc prevented overfitting
Dropout (0.4 and 0.3) helped with generalization
Data augmentation (random flips, rotations) made the model more robust
Next Steps
Now that I have a working model at 97% accuracy, here’s what’s next:
The 97% was measured on the validation split (20% of the original dataset)
Next, I need to test on brand new images that the model has never seen – not even in validation
Find fresh Mars orbiter images online (not from the original dataset)
See if the model can correctly identify terrain types in the wild
Which categories is the model struggling with?
Spider and swiss cheese have fewer training samples – likely lower accuracy
Confusion matrix will show where mistakes happen
Build a simple interface
Upload any Mars image and get instant terrain prediction
Goal
Take the 97% validation model and prove it works on real-world, never-before-seen Mars images – not just the test split from the dataset.
I initially planned to use 4 simple categories (crater, dusty, rocky, sandy), but I ended up with 7 scientific categories from the HiRISE orbiter dataset: bright dune, crater, dark dune, impact ejecta, slope streak, spider, and swiss cheese.
The main challenge was that the official NASA datasets (AI4Mars) had over 50,000 images and were too large to download (around 16-20 GB). Direct download kept failing, and the dataset required heavy preprocessing because it was semantic segmentation, not simple image classification. So instead, I used a smaller HiRISE dataset from Kaggle. The trade-off is that these are orbital telescope images, not rover photos, so the terrain looks different. Also, some categories like spider and swiss cheese are very rare, which makes the dataset imbalanced, and the model might struggle to learn them properly.
Making the dataset (training and validation data) for my model.