YOLO Filament Detection API

YOLOv12n model for wastewater treatment filament identification

API Status: Online

Quick Test

Endpoints

GET/health

Health check - returns API and model status

GET/classes

List all 19 filament class names

GET/model/info

Detailed model information

POST/predict

Run filament detection on an image

Prediction Request

Request Format

{
  "image": "<base64_encoded_image>",
  "conf": 0.2,
  "iou": 0.4
}

Parameters

ParameterTypeRequiredDefaultDescription
imagestringYes-Base64-encoded image
conffloatNo0.2Confidence threshold (0-1)
ioufloatNo0.4IoU threshold for NMS (0-1)

Response Format

{
  "success": true,
  "request_id": "7fdac296",
  "detections": {
    "num_detections": 3,
    "boxes": [[x1, y1, x2, y2], ...],
    "scores": [0.85, 0.72, 0.65],
    "labels": [7, 8, 5],
    "class_names": ["Thiothrix", "Type0041", "Nocardia"]
  },
  "timing": {
    "decode_seconds": 0.015,
    "inference_seconds": 2.1,
    "total_seconds": 2.12
  }
}

Limits

20 MB
Max file size
5 min
Request timeout

Example: Python

import requests
import base64

with open('image.jpg', 'rb') as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    'https://yolo-filament-model-api--calebnyad.replit.app/predict',
    json={'image': image_b64, 'conf': 0.2, 'iou': 0.4}
)

result = response.json()
print(f"Found {result['detections']['num_detections']} filaments")

Example: cURL

curl -X POST https://yolo-filament-model-api--calebnyad.replit.app/predict \
  -H "Content-Type: application/json" \
  -d '{"image": "'$(base64 -i image.jpg)'", "conf": 0.2, "iou": 0.4}'

Filament Classes (19)

0Beggiab
1Hhydrossis
2Irrelevant
3Mparviecella
4Nlimicola
5Nocardia
6Snatans
7Thiothrix
8Type0041
9Type0092
10Type0211
11Type021N
12Type0411
13Type0581
14Type0675
15Type0803
16Type0914
17Type1701
18Type1851

YOLO Filament Detection API v1.0 | Nyad Labs