morefaat69's picture
Upload 6 files
5d8af3c verified
|
Raw
History Blame Contribute Delete
822 Bytes
---
title: AI Detection API
emoji: 🎯
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
---
# AI Detection API 🎯
FastAPI app for detecting **persons** and **statues** in images using YOLOv8.
## Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/` | Health check |
| GET | `/docs` | Swagger UI |
| POST | `/predict-image` | Upload image and get detections |
## Usage
```bash
curl -X POST "https://YOUR-SPACE-URL/predict-image" \
-H "accept: application/json" \
-F "file=@your_image.jpg"
```
## Response
```json
{
"total_count": 2,
"persons": 1,
"statues": 1,
"output_image": "https://YOUR-SPACE-URL/uploads/output_image.jpg",
"detections": [
{
"type": "person",
"confidence": 0.92,
"bbox": [100, 50, 300, 400]
}
]
}
```