HW

hari8749/waste_analysis

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars Качество 51 Тренд 4

A full-stack web application that classifies waste from images using deep learning (SegFormer + ResNet18), generates recycling guidance via a RAG pipeline (FAISS + Groq LLM), and plots reports on an...

Обзор

A full-stack web application that classifies waste from images using deep learning (SegFormer + ResNet18), generates recycling guidance via a RAG pipeline (FAISS + Groq LLM), and plots reports on an interactive map. - Image upload with drag-and-drop - Waste classification (plastic, metal, glass, paper, other) - AI-generated segmentation overlay - RAG recycling guide from a PDF knowledge base (FAISS + Groq) - Interactive map with historical waste reports (MongoDB Atlas) - AI chat assistant for follow-up questions - Manual location entry with geocoding fallback The segment-anything package installs from GitHub. Requires git to be on your PATH. Edit .env and fill in: - MONGO_URI — your MongoDB Atlas connection string - MONGO_DB_NAME — database name (default: waste_classification) - GROQ_API_KEY — your Groq API key Download SAM weights from: https://github.

README

Показан фрагмент оригинального README. Открыть оригинал.

EcoVision — Waste Classification & Mapping

A full-stack web application that classifies waste from images using deep learning (SegFormer + ResNet18), generates recycling guidance via a RAG pipeline (FAISS + Groq LLM), and plots reports on an interactive map.


Features

  • Image upload with drag-and-drop
  • Waste classification (plastic, metal, glass, paper, other)
  • AI-generated segmentation overlay
  • RAG recycling guide from a PDF knowledge base (FAISS + Groq)
  • Interactive map with historical waste reports (MongoDB Atlas)
  • AI chat assistant for follow-up questions
  • Manual location entry with geocoding fallback

Prerequisites

Requirement Version
Python 3.10 or 3.11
pip latest
MongoDB Atlas free tier is fine
Groq API key free at console.groq.com

Local Setup

1. Clone / unzip the project

cd ecovision

2. Create a virtual environment

python -m venv venv
source venv/bin/activate      # Linux / Mac
venv\Scripts\activate         # Windows

3. Install dependencies

pip install -r requirements.txt

Note: The segment-anything package installs from GitHub. Requires git to be on your PATH.

4. Configure environment variables

cp .env.example .env

Edit .env and fill in:

  • MONGO_URI — your MongoDB Atlas connection string
  • MONGO_DB_NAME — database name (default: waste_classification)
  • GROQ_API_KEY — your Groq API key

5. Add model weights

Place the following files in the project root:

File Description
resnet_best.pth ResNet18 waste classifier
segformer_best.pth SegFormer segmentation model
sam_vit_b_01ec64.pth SAM (optional — for segmentation masks)

Download SAM weights from: https://github.com/facebookresearch/segment-anything#model-checkpoints

6. Add RAG knowledge base PDFs (optional)

Place recycling-related PDF files in:

backend/rag/data/

The app will automatically index them on first startup and cache the FAISS index to backend/rag/cache/.

7. Run the server

python -m uvicorn backend.main:app --host 0.0.0.0 --port 5000 --reload

Open your browser at: http://localhost:5000


Project Structure

ecovision/
├── backend/
│   ├── main.py                  # FastAPI app & routes
│   ├── db/
│   │   └── database.py          # MongoDB connection
│   ├── models/
│   │   └── inference.py         # SegFormer + ResNet18 + SAM pipeline
│   ├── services/
│   │   ├── processing.py        # Recyclability & cleanliness scoring
│   │   └── rag_service.py       # FAISS retrieval + Groq generation
│   └── rag/
│       ├── data/                # PDF knowledge base files
│       └── cache/               # FAISS index cache (auto-generated)
├── frontend/
│   ├── index.html
│   ├── css/
│   │   ├── style.css
│   │   └── components.css
│   └── js/
│       ├── api.js               # API calls
Открыть полный README на GitHub

Рекомендуемые инструменты

Попробуйте другой запрос или уберите фильтр.

Установка

npx skillfish add hari8749/waste_analysis
Новичок в MCP? Начните с руководства на mcpskill.org →