Skip to content

Subrat1920/Nasa-Near-Earth-Hazardous-Detection

Repository files navigation

πŸš€ NASA NEO Interactive Universe & Hazard Classification

This project is a high-performance, production-grade 3D web application that visualizes 32,001 NASA Near-Earth Objects (NEOs) and classifies them as hazardous or non-hazardous. It combines a sophisticated Three.js 3D simulation with a robust MLOps pipeline automated via GitHub Actions, DVC, and FastAPI.


πŸ“‘ Project Overview

  • Interactive Universe: A cinematic 3D simulation (Orrery) of the solar system featuring 32,000+ real-time tracked asteroids.
  • AI-Driven Prediction: Real-time hazard classification using ML models trained with NASA orbital data.
  • 3D Scale Comparator: High-fidelity visual tool to compare asteroid sizes against Earth in real-time.
  • Full-Stack Architecture: Modern split-module design with a specialized FastAPI backend and a glassmorphic Vanilla JS frontend.
  • End-to-End MLOps: Automated data ingestion, preprocessing (SMOTE), drift detection, and monitoring via MLflow and Grafana.

βš™οΈ Tech Stack

Frontend (Interactive UI)

  • 3D Engine: Three.js (WebGL)
  • Styling: Vanilla CSS with Glassmorphism
  • State Management: Asynchronous JS with custom state-driven components

Backend (Production API)

  • Framework: FastAPI (Asynchronous)
  • Database: Neon (Serverless PostgreSQL)
  • Real-time: WebSockets for live asteroid tracking
  • Data Versioning: DVC (Data Version Control)

Machine Learning & MLOps

  • ML Engine: Scikit-Learn, XGBoost, CatBoost
  • Pipeline: GitHub Actions (Scheduled Workflows)
  • Experiment Tracking: MLflow (hosted on DAGsHub)
  • Monitoring: Grafana Dashboards

🌌 Interactive Modules

1. High-Fidelity 3D Orrery

  • Real-time visualization of 32,001 unique NASA asteroids.
  • Cinematic camera controls with zoom-to-asteroid functionality.
  • Procedural textures for celestial bodies and starfield environments.

2. Asteroid-to-Earth Comparator

  • Dynamic 3D model scaling based on real physical diameters.
  • Synchronized zoom effects for precise scale perception.
  • Targeting reticle and AI-driven risk indicators.

3. AI Explorer & Leaderboard

  • Name-based asteroid search and advanced filtering.
  • AI risk assessment scoring displayed in real-time.
  • WebSocket-powered "Recent Discoveries" live feed.

4. Technical Dashboard (MLOps)

  • Visual documentation of the end-to-end data pipeline.
  • DVC-driven data flow visualization.
  • Real-time backend health monitoring.

🌳 Repository Structure

β”œβ”€β”€ πŸ“ .github/             # GitHub Actions Workflows (CI/CD, Ingestion, Drift)
β”œβ”€β”€ πŸ“ backend/             # FastAPI Application (API v2.0)
β”‚   β”œβ”€β”€ 🐍 main.py          # API Entry Point
β”‚   β”œβ”€β”€ 🐍 models.py        # SQLAlchemy/Neon Models
β”‚   β”œβ”€β”€ 🐍 database.py      # NeonDB Connection Pool & Watcher
β”œβ”€β”€ πŸ“ frontend/            # High-Fidelity Web Interface
β”‚   β”œβ”€β”€ πŸ“ src/             # Specialized 3D & UI Components
β”‚   β”‚   β”œβ”€β”€ πŸ’Ž orrery.js    # 3D Solar System Engine
β”‚   β”‚   β”œβ”€β”€ πŸ’Ž comparator.js # 3D Scale Comparison
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ mlops.js     # Technical Dashboard
β”œβ”€β”€ πŸ“ src/                 # ML Pipeline Source Code (V1)
β”‚   β”œβ”€β”€ πŸ“ custom/          # Data Transformation & Model Training
β”œβ”€β”€ πŸ“ Data/                # Local data storage (DVC tracked)
β”œβ”€β”€ πŸ“ Notebook/            # Research & Exploratory Analysis
β”œβ”€β”€ 🐍 app.py               # Legacy Flask Gateway
β”œβ”€β”€ 🧊 dvc.yaml             # Data Pipeline Orchestration
└── πŸ“– README.md            # This documentation

πŸ“Š Monitoring & Alerts

  • Grafana Dashboards: Publicly accessible dashboards tracking ingestion, performance, and drift.
  • Data Drift Detection: Automated weekly checks with email notifications via GitHub Actions.
  • Real-time Watcher: Background service polling for new unique asteroid discoveries.

πŸ‘¨β€πŸ’» Author

Subrat Mishra

Portfolio LinkedIn GitHub Medium

About

This project builds a production-grade ML pipeline to classify Near-Earth Objects (NEOs) as hazardous or non-hazardous. It automates data ingestion, preprocessing, model training, monitoring, and drift detection using GitHub Actions, PostgreSQL, MLflow, DAGsHub, and Grafana.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors