Skip to content

NebulAI is a web app that generates realistic galaxy images using a Conditional GAN (cGAN) guided by K-Means clustering. Users can explore and generate galaxies based on learned visual categories through an interactive React + Django interface.

License

Notifications You must be signed in to change notification settings

ourahma/NebulAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 NebulAI - Synthetic Galaxy Image Generator

NebulAI is a full-stack web application built with Django (backend) and React (frontend) that allows users to generate synthetic galaxy images using a combined K-Means and Conditional GAN (cGAN) approach. This project provides an intuitive interface for exploring AI-generated astronomical content.


Features

  • Secure authentication (JWT) with Login / Signup pages
  • Galaxy image generation powered by K-Means + cGAN
  • Smooth user interface built with React
  • Django REST API for backend logic
  • On-demand download of generated images
  • Image voting (like,dislike)

Screenshots

Login Page

Login


Signup Page

Signup


Home Page (Image Generation)

Users can generate synthetic galaxies without necessarly signing in but only vote when use signs in.

Home

Image Generation & Evaluation

  • User Interaction

    • After clicking the Generate button, a synthetic galaxy image is produced using the CGAN+KMeans model and rendered on the screen. Users can then:

      • Like or Dislike the generated image
      • Download the image manually
      • Re-generate a new variation if unsatisfied with the current one
  • Model Evaluation – FID & KID Metrics

    To assess the quality of generated images, two evaluation metrics are computed:

    • FID: Fréchet Inception Distance
    • KID: Kernel Inception Distance

    Metric Interpretation:

    • A KID score close to 0 indicates that the generated images are perceptually similar to real images — this is the desired outcome.
    • The FID score is relatively high, which is expected given the small and limited training dataset.
    • As such, KID is a more trustworthy indicator of model performance in this specific case.

Further Reading:
Kernel Inception Distance (KID) – Original Paper by Bińkowski et al. (2018)

images

Dashboard (Admin Only)

The dashboard provides a quick overview of user interactions and image generation statistics and it is displayed only for authenticated users with admin privileges.:

  • Total Generated Images: Displays the count of all images generated.
  • Liked & Disliked Images: Shows how many images have been liked or disliked, helping track user preferences.
  • Generation History: A log of previously generated images with timestamps.

Dashboard


ML Model - KMeans + cGAN

The model pipeline includes:

  1. Clustering latent space features using K-Means.
  2. Conditioning a cGAN on cluster labels.
  3. Generating high-resolution galaxy images based on user-selected conditions.

Tech Stack

Frontend Backend ML / Deep Learning
ReactJS Django + DRF TensorFlow
Bootstrap / CSS SimpleJWT (JWT Auth) cGAN, K-Means

Video Demo

cgan.1.webm

Installation (Development)

Backend (Django)

cd backend
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Frontend (React)

cd frontend
npm install
npm run dev

Authentication

JWT (via SimpleJWT) is used to:

  • Create access and refresh tokens
  • Protect private routes (dashboard, generation)
  • Assign admin roles for privileged access

Authors


License

This project is open-source under the MIT License.

About

NebulAI is a web app that generates realistic galaxy images using a Conditional GAN (cGAN) guided by K-Means clustering. Users can explore and generate galaxies based on learned visual categories through an interactive React + Django interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published