Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-CLS Service

FastAPI 微服务,基于 YOLOv8 识别图片中的校园常见失物并返回前三个标签。分类集合是从 COCO-80 精选并重命名的英文标签,聚焦校园场景。

当前默认的标签清单:

  • backpack
  • umbrella
  • shoulder bag or wallet
  • luggage or suitcase
  • ball or sports gear
  • water bottle or thermos
  • tumbler
  • cup
  • laptop
  • mouse
  • presentation clicker or remote
  • keyboard
  • phone or tablet
  • notebook or campus card
  • watch or desk clock
  • stationery (scissors-like)
  • plush toy
  • toiletry (toothbrush)

Getting Started

  1. Create a virtual environment

    python3 -m venv .venv
    source .venv/bin/activate
  2. Install dependencies

    pip install -r requirements.txt
  3. Download the YOLOv8s weights

    mkdir -p models
    curl -L -o models/yolov8s.pt https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s.pt
  4. Start the service

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

    You can also run python main.py to launch Uvicorn directly.

API Overview

  • GET /health – Returns { "status": "ok" }.
  • POST /predict-category – Accepts a single image file and returns its top-3 labels.
  • POST /predict-category-batch – Accepts 1–3 image files and returns the top-3 labels for each image.

All responses return the English COCO-80 labels alongside the normalised confidences.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages