Skip to content

About

AI-Assisted Civic Waste Reporting and Response System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

♻️ CleanSight AI

AI-Assisted Civic Waste Reporting and Response System

A smart civic reporting platform that helps citizens report waste incidents and helps municipal officers review, prioritize, group, map, and manage reports.

Python · Streamlit · Gemini · Supabase · PostgreSQL · Folium

AI supports decision-making. Final municipal decisions remain with human officers.


✨ Overview

CleanSight AI improves the way civic waste incidents are reported and reviewed.

Citizens can upload an image, provide a description and location, and receive AI-assisted analysis before submitting the report.

Municipal officers can then review reports, correct AI-generated information, identify priority incidents, manage related reports, view incidents on a map, and export report data.


🚀 Key Features

🧑 Citizen

  • Report waste as a guest or signed-in user
  • Upload waste images
  • Add a simple everyday address
  • Use GPS/current location
  • Add landmarks and descriptions
  • Run AI-assisted waste analysis
  • Review the generated analysis
  • Submit reports to the municipality

🏢 Municipal Officer

  • Secure municipal sign-in
  • Dashboard with submitted reports
  • Search and filtering
  • Interactive report map
  • Review AI-generated analysis
  • Correct report information
  • Add municipal notes
  • Update report status
  • Detect and group related reports
  • Export report data as CSV

🤖 AI-Assisted Analysis

CleanSight AI uses Google Gemini multimodal AI to analyse uploaded waste images.

The analysis can include:

  • waste type
  • estimated waste volume
  • visible hazards
  • hazard score
  • road accessibility
  • recommended collection vehicle
  • AI confidence

The AI output is treated as decision support, not as a final municipal decision.


⚡ Priority Calculation

The current priority score considers:

Factor Weight
Hazard 70%
Waste Volume 30%

Priority levels:

Score >= 75  → HIGH
Score >= 45  → MEDIUM
Otherwise    → LOW

🔗 Related Report Handling

Potentially related or duplicate reports are handled on the municipal side.

Municipal officers can:

  • compare nearby reports
  • group reports belonging to the same incident
  • mark reports as separate
  • remove reports from an existing group

Original citizen reports are always preserved.


📸 Screenshots

Click a section below to view its screenshots.

🏠 Landing Page
CleanSight-AI-·-Streamlit (12)
🧑 Citizen Reporting

Upload Waste Image

CleanSight-AI-·-Streamlit (1)

Location

CleanSight-AI-·-Streamlit (4)

AI Analysis

CleanSight-AI-·-Streamlit (5) CleanSight-AI-·-Streamlit (7)

Review & Submit

CleanSight-AI-·-Streamlit (8) CleanSight-AI-·-Streamlit (9) CleanSight-AI-·-Streamlit (10)
🏢 Municipal Dashboard

Dashboard

CleanSight-AI-·-Streamlit (11)
🔐 Authentication

Sign In

CleanSight-AI-·-Streamlit (13)

Sign Up

CleanSight-AI-·-Streamlit (14)

🔑 Demo Access

Citizen

Citizens can use the guest reporting option or create an account through the application.

Municipal Officer

Use the following account to access the municipal demonstration dashboard.

Municipal Email:    [email protected]
Password:           municipal123

🏗️ Architecture

Citizen / Municipal Browser
            │
            ▼
      Streamlit App
       /         \
      ▼           ▼
  Supabase      Gemini
 Auth / DB      Multimodal AI
 Storage
      │
      ▼
 PostgreSQL

Main Flow

Citizen uploads report
        ↓
AI analyses waste image
        ↓
CleanSight AI calculates priority
        ↓
Citizen reviews and submits
        ↓
Report stored in Supabase
        ↓
Municipal officer reviews
        ↓
Officer confirms or corrects report

Current report lifecycle:

SUBMITTED → REVIEWED

Future versions may extend this to:

SUBMITTED → REVIEWED → ASSIGNED → IN PROGRESS → COMPLETED

🧰 Technology Stack

Area Technology
Web Application Streamlit
Programming Language Python
AI Google Gemini Multimodal
Backend Supabase
Database PostgreSQL
Authentication Supabase Auth
Storage Supabase Storage
Mapping Folium
Geocoding Geopy
Data Processing Pandas
Image Processing Pillow
Deployment Streamlit Community Cloud
Source Control GitHub

📁 Project Structure

CleanSight-AI/
│
├── app.py
├── citizen_view.py
├── municipal_view.py
├── requirements.txt
├── README.md
├── .gitignore
│
├── auth/
│   ├── sign_in.py
│   └── sign_up.py
│
├── services/
│   ├── supabase_service.py
│   ├── auth_service.py
│   ├── ai_service.py
│   ├── location_service.py
│   └── report_service.py
│
├── assets/
│   └── cleansight_logo.png
│
└── docs/
    └── screenshots/

🚀 Local Setup

1. Clone the repository

git clone YOUR_GITHUB_REPOSITORY_URL
cd CleanSight-AI

2. Create a virtual environment

python -m venv venv
.\venv\Scripts\Activate.ps1

3. Install dependencies

python -m pip install -r requirements.txt

4. Add Streamlit secrets

Create:

.streamlit/secrets.toml

Add:

GEMINI_API_KEY = "your-gemini-api-key"
SUPABASE_URL = "your-supabase-url"
SUPABASE_KEY = "your-supabase-key"

5. Run CleanSight AI

python -m streamlit run app.py

🔐 Security

Never commit API keys, passwords, .env files, or Streamlit secrets to GitHub.

Recommended .gitignore:

venv/
.venv/

__pycache__/
*.pyc

secrets.toml

.env
.env.*

.vscode/
.idea/

.DS_Store
Thumbs.db

Municipal accounts should be assigned the appropriate role through a controlled administrative process.


⚠️ Current Limitations

  • AI analysis may occasionally be incorrect or uncertain.
  • AI confidence is not a calibrated probability.
  • Sri Lankan address matching may sometimes be inconsistent.
  • Related-report detection currently relies mainly on location and time.
  • The current lifecycle primarily uses SUBMITTED and REVIEWED.
  • The system is an MVP and requires further production security and evaluation.

🛣️ Future Improvements

Planned improvements include:

  • stronger role-based security
  • improved Sri Lankan location handling
  • image/text similarity for duplicate detection
  • expanded incident lifecycle
  • audit history
  • municipal assignment
  • route optimisation
  • waste hotspot analytics
  • collection tracking and ETA prediction

📌 Disclaimer

CleanSight AI is an AI-assisted civic reporting and municipal decision-support system.

AI-generated information may contain errors and should be reviewed by municipal officers before being treated as verified information.


📄 License

This project is licensed under the MIT License.

See LICENSE for details.


♻️ CleanSight AI

Smarter reporting. Clearer municipal decisions. Cleaner communities.

About

AI-Assisted Civic Waste Reporting and Response System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages