
hari8749/waste_analysis
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
ディープラーニング(SegFormer + ResNet18)を使用して画像から廃棄物を分類し、RAGパイプライン(FAISS + Groq LLM)を介してリサイクルガイダンスを生成し、レポートをプロット...
概要
ディープラーニング(SegFormer + ResNet18)を使用して画像から廃棄物を分類し、RAGパイプライン(FAISS + Groq LLM)を介してリサイクルガイダンスを生成し、インタラクティブマップにレポートをプロットします。 - ドラッグアンドドロップによる画像のアップロード - 廃棄物分類(プラスチック、金属、ガラス、紙など) - AI生成セグメンテーションオーバーレイ - RAGのPDFナレッジベース(FAISS + Groq)のリサイクルガイド - 歴史廃棄物レポート(MongoDBアトラス)とインタラクティブマップ - フォローアップ質問のためのAIチャットアシスタント - 地理的コーディングフォールバックによる手動位置エントリ GitHubからセグメンテーションパッケージをインストールします。 あなたのPATHにあるためにgitを要求して下さい。 .env の編集と入力: - MONGO URI — MongoDB Atlas の接続文字列 - MONGO DB NAME — データベース名 (デフォルト: Waste classification) - GROQ API KEY — Groq API キー — SAM の重量をダウンロード: https://github.
概要(AI 翻訳)
ディープラーニング(SegFormer + ResNet18)を使用して画像から廃棄物を分類し、RAGパイプライン(FAISS + Groq LLM)を介してリサイクルガイダンスを生成し、インタラクティブマップにレポートをプロットします。
お問い合わせ
##特徴
- ドラッグアンドドロップで画像アップロード
- 廃棄物分類(プラスチック、金属、ガラス、紙、その他)
- AI生成されたセグメンテーションオーバーレイ
- PDFナレッジベース(FAISS + Groq)からRAGリサイクルガイド
- 歴史的廃棄物レポート(MongoDBアトラス)によるインタラクティブマップ
- フォローアップ質問のためのAIチャットアシスタント
- ジオコーディングフォールバックの手動位置エントリ
お問い合わせ
前提条件
| 条件 | バージョン | お問い合わせ | パイソン | 3.10 または 3.11 | | プライバシーポリシー | | モンゴDB アトラス | 無料ティア | | Groq API キー | コンソールで無料 |
お問い合わせ
ローカルセットアップ
##1. クローン/解凍
##2. 仮想環境を作成する
##3. 依存関係のインストール
注記:
segment-anything] パッケージは GitHub からインストールします。gitが PATH にある必要があります。
##4. 環境変数の設定
[.envを編集し、入力します。
- [
MONGO_URI— MongoDBアトラス接続文字列 - [
MONGO_DB_NAME— データベース名 (デフォルト: [waste_classification]))
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
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-anythingpackage installs from GitHub. Requiresgitto be on your PATH.
4. Configure environment variables
cp .env.example .env
Edit .env and fill in:
MONGO_URI— your MongoDB Atlas connection stringMONGO_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
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add hari8749/waste_analysis