Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ewaste-fastapi

A FastAPI-powered app for detecting & classifying electronic waste (e-waste) using YOLO deep learning.
Upload photos of devices and get instant detection—with bounding boxes!


Streamlit App Link(Without FastAPI):https://ewaste-fastapi-mre8zdpysgevmnnvhregdu.streamlit.app/

🚀 Features

  • FastAPI Backend: Blazing-fast, modern API.
  • 🖼 YOLO Detection: Deep learning to spot e-waste in your pics.
  • 📤 Easy Upload: Drag & drop or API-ready.
  • 🔲 Visual Results: Returned images are automatically annotated.
  • 🗃 REST API: Connect with your own workflows.
  • 📝 Swagger Docs: Instant API playground (/docs).

📦 Setup & Installation

Requirements

  • Python 3.8+
  • FastAPI, Uvicorn
  • Pillow, Numpy
  • Pydantic
  • Ultralytics YOLO
# Get the code
git clone https://github.com/Dexter0013/ewaste-fastapi.git
cd ewaste-fastapi

# Optional: virtual environment
python -m venv venv
source venv/bin/activate

# Install reqs
pip install -r requirements.txt

▶️ Running the App

uvicorn main:app --host 0.0.0.0 --port 8000

🖼 Usage

Upload an Image

  • Endpoint: POST /predict
  • Data: file (image)
curl -F "file=@your-image.jpg" http://localhost:8000/predict --output detected.jpg
  • 🔳 Gets you: Image with e-waste items highlighted!

📁 Project Structure

ewaste-fastapi/
│
├── main.py           # API app & endpoints
├── Model/best.pt     # Model & image helpers
├── Static            # Website template
├── requirements.txt
└── README.md

🛠 Customization

  • Change the YOLO model? Simply swap the weights in your project folder.
  • New classes? Retrain. (Use your dataset if needed.)

🍀 License

Released under the MIT License.


🤝 Contributing

Pull requests and feedback welcome!


💬 Contact

Use GitHub Issues or start a thread in Discussions.


About

A FastAPI-based web application for detecting and classifying electronic waste (e-waste) using a YOLO deep learning model. Users can upload images of electronic devices, and the app will identify and highlight items

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages