Our project is a web-based platform for exoplanet detection and exploration, powered by NASA datasets (Kepler, K2, TESS, KOI). It enables:
-
Prediction of planetary candidates
- Input via tabular metadata (orbital period, radius, stellar parameters, etc.)
- Upload of lightcurve data (flux time-series)
-
3D Visualization of planetary systems
- Interactive orbital simulations built with Three.js
git clone https://github.com/KienPC1234/ExoVision-Kepler-FPT.git
cd ExoVision-Kepler-FPTpython3 -m venv .venv
source .venv/bin/activate # For Linux/macOS
# Or use .venv\Scripts\activate on WindowsOnce activated, your terminal prompt should show
(.venv)indicating you're inside the virtual environment.
sudo apt update
sudo apt install postgresql postgresql-contrib -ysudo -u postgres psql
-- Inside psql shell:
CREATE USER superuser WITH PASSWORD 'Dukuma6Chi7Bolali';
ALTER USER superuser WITH SUPERUSER;
CREATE DATABASE kepler_app_db OWNER superuser;
\qIf you'd like to change the default database username, password, or connection URL, you can do so in the file:
web/db/base.py
# web/db/base.py
DATABASE_URL_SYNC = "postgresql+psycopg2://your_username:your_password@localhost:5432/your_database"
DATABASE_URL_ASYNC = "postgresql+asyncpg://your_username:your_password@localhost:5432/your_database"- Use strong passwords for production environments.
- If you're deploying to cloud (e.g. Railway, Render), replace
localhostwith your remote host address. - You can also load these values from a
.envfile usingos.getenv()for better security:
To run this app with Google login, create a file at .streamlit/secrets.toml with the following content:
[auth]
redirect_uri = "http://localhost:8501/oauth2callback"
cookie_secret = "Spgg2r4HHGal37TH4uvcsubbfJ_nv3IEHgF7ezLtiBU"
client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"
server_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"- Go to Google Cloud Console
- Create a new project
- Enable OAuth consent screen
- Create OAuth 2.0 Client ID
- App type: Web
- Add
http://localhost:8501/oauth2callbackto Authorized redirect URIs
- Copy
client_idandclient_secretinto the file above
pip install -r requirements.txtstreamlit run streamlit_app.py- Tabular Metadata β Ensemble Stacking (LightGBM, Random Forest, XGBoost, Neural Network) with Logistic Regression meta-learner.
- Lightcurves β Transformer model (PatchTST) with attention on patched windows.
- Preprocessing Pipeline includes dataset merging, cleaning, unit conversions, label encoding, feature engineering, imputation, scaling, balancing (SMOTE), and artifact saving for consistent inference.
Predictions are logged and displayed in both tabular and 3D orbital views. Users can also train custom models with built-in tutorials.
ExoVision/
βββ .streamlit/ # Streamlit configuration files
β βββ config.toml
βββ LICENSE # Project license information
βββ ModelTrainer/ # Core training and model loading logic
β βββ checkgpu.py # GPU availability checker
β βββ modelV1/ # Version 1 of the model pipeline
β β βββ data_preprocess.py
β β βββ model_builder.py
β β βββ model_loader.py
β βββ modelV2/ # Version 2 of the model pipeline
β β βββ check_dataset.py
β β βββ data_preprocess.py
β β βββ model_builder.py
β β βββ model_loader.py
β βββ readme.md # Internal documentation for ModelTrainer
βββ data/ # Preprocessed and raw data files
β βββ koi_lightcurves.parquet
β βββ merged_processed.csv
βββ dataset/ # External datasets used for training and prediction
β βββ k2_pandc.csv
β βββ koi_cumulative.csv
β βββ toi.csv
βββ models/ # Saved models and evaluation artifacts
β βββ v1/ # Artifacts from model version 1
β β βββ feature_list.pkl, stacking_model.pkl, etc.
β βββ v2/ # Artifacts from model version 2
β β βββ best_patchtst.pth, y_test.npy
βββ readme.md # Main project documentation
βββ requirements.txt # Python dependencies
βββ static/ # Static assets for Streamlit (fonts, videos, etc.)
β βββ *.ttf, *.mp4
βββ streamlit_app.py # Entry point for the Streamlit web application
βββ supervisor_config/ # Supervisor configuration files for deployment
β βββ iframe_loader.conf, streamlit.conf
βββ usgi_service.py # uWSGI service integration script
βββ web/ # Backend and frontend logic for web integration
β βββ db/ # Database models and wrappers
β βββ helper/ # Custom Streamlit components and helpers
β βββ iframe_loader/ # HTML/JS assets for iframe rendering
β βββ pages/ # Streamlit page modules (e.g., home, login, prediction)
β βββ utils/ # Utility functions (auth, routing, etc.)
Explore our latest AI-driven research on exoplanet detection and data visualization. Below are two short demo videos showcasing ExoVisionβs data processing and prediction systems in action.
KeplerFPTC.mp4
KeplerFPT2C.mp4
π§ Kepler-FPT combines deep learning with astrophysical insights to uncover hidden worlds beyond our solar system.
- High Recall & Accuracy (~90% for metadata, >85% for lightcurves) β fewer missed candidates.
- User-Friendly: Simple UI for predictions, uploads, search/export history.
- Interactive: Realistic 3D orbital viewer for deeper insights.
- Efficient & Secure: Async worker queue, GPU acceleration, authentication, HTTPS.
- Extensible: Support for custom model training and experimentation.
The platform democratizes exoplanet research by lowering barriers to entry:
- Researchers β rapid prototyping and exploration.
- Educators β classroom-friendly simulations.
- Students & citizen scientists β accessible tools for discovery.
Our focus on high recall addresses the "needle-in-a-haystack" challenge, ensuring rare planetary candidates are not overlooked.
- Languages: Python (ML backend), JavaScript (Three.js frontend)
- Frameworks: Streamlit (UI), PyTorch (PatchTST), scikit-learn, LightGBM, XGBoost
- Data Tools: Pandas, NumPy, PyArrow, Astropy
- Deployment: Docker, Celery/RabbitMQ, Nginx, GPU VPS
- Other Tools: Git, Jupyter, Pickle/Joblib
- Combines ensemble tree models (tabular) with transformer models (time-series) in one platform.
- Real-time 3D visualization brings planetary systems to life.
- User-oriented workflows (prediction history, custom training) make research collaborative.
- PatchTST patching handles noisy flux data with minimal feature engineering.
- Scalability: Efficient GPU-based processing for billions of flux points.
- Usability: Streamlit UI for non-experts, tutorials for new users.
- Ethics & Security: Bias mitigation (SMOTE), authentication, privacy compliance.
- Performance Trade-off: Prioritized recall over precision.
- Team Collaboration: Modular code for parallel development.
- Real-time TESS data streaming for live candidate detection.
- Expanded citizen science features for open participation.
- Multi-class classification expansion with more nuanced planetary states.
π Making exoplanet research accessible, interactive, and collaborative for everyone.
