Skip to content

rishabhmohatta/Yolov7_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Object Detection Project - FastAPI + Streamlit + YOLOv7

πŸ“Œ Project Overview

This project demonstrates a full-stack AI solution with:

  • Backend: FastAPI service providing an /infer endpoint for object detection using YOLOv7-tiny.
  • Frontend: Streamlit app to upload images and visualize inference results.
  • Deployment: Both services containerized with Docker and orchestrated via Docker Compose.

πŸ› οΈ Technologies Used

  • Python 3
  • FastAPI (backend REST API)
  • Streamlit (frontend UI)
  • YOLOv7-tiny (pretrained AI model)
  • Docker & Docker Compose

πŸ“‚ Project Structure

Projectrestapi/

  • │── backend-aiservice/
  • β”‚ β”œβ”€β”€ app.py
  • β”‚ β”œβ”€β”€ requirements.txt
  • β”‚ β”œβ”€β”€ Dockerfile
  • β”‚ └── yolov7-tiny.pt
  • β”‚
  • │── frontend-uiservice/
  • β”‚ β”œβ”€β”€ app.py
  • β”‚ β”œβ”€β”€ requirements.txt
  • β”‚ └── Dockerfile
  • β”‚
  • │── docker-compose.yaml

STEP-BY-STEP IMPLEMENTATION

  • Backend (FastAPI):

    • Implements /infer endpoint for image inference.
    • Loads YOLOv7-tiny model and returns detections.
    • Run: uvicorn app:app --host 0.0.0.0 --port 8000
  • Frontend (Streamlit):

    • UI with file uploader.
    • Sends images to backend /infer endpoint.
    • Displays results.
    • Runs on port 8501.
  • Docker & Compose:

    • Each service has its own Dockerfile.
    • docker-compose.yaml defines services and network.
    • Frontend connects to backend using AI_BASE_URL env var.

HOW TO RUN

-Prerequisites:

  • Install Docker and Docker Compose.

Work TO Do:

  • Optimizing model with onnx or TRT
  • Creating own yolov7 class Rather than using yolov7 github
  • Optimizing UI define for multiple images

REFERENCES

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published