Skip to content

cheffelo/yolo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO Object Detection API

A FastAPI service that exposes a YOLOv8 object detection model behind authenticated endpoints. Upload an image and get back detected objects with bounding boxes, class names, and confidence scores.

Endpoints

All detection endpoints require a Bearer token via the Authorization header.

Method Path Auth Description
GET /health No Health check
POST /detect Yes Detect all objects in an image
POST /detect/classes Yes Detect objects, optionally filtering by class

Prerequisites

  • Python 3.13+
  • uv - Python package manager
  • Docker - required by takk to build and run services

Getting Started

1. Install dependencies

uv sync

2. Generate environment config

uv run takk dotenv

This generates a .env file with the required configuration, including API_BEARER_TOKEN and service URLs resolved by takk.

3. Build and run the application

uv run takk up

This builds the Docker image and starts the API. The health check at /health is used to verify the service is ready.

Development

Running integration tests

uv run takk test

This starts the application (if not already running), resolves service URLs and secrets, then runs the integration test suite against the live API.

Project structure

project.py          # Takk project definition (services, settings)
src/
  app.py            # FastAPI application with YOLO model and auth
  settings.py       # Pydantic settings for test configuration
tests/
  test_api.py       # Integration tests for all endpoints

Learn more

About

An API that exposes a YOLO model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages