YOLOv12n model for wastewater treatment filament identification
API Status: Online
/health
Health check - returns API and model status
/classes
List all 19 filament class names
/model/info
Detailed model information
/predict
Run filament detection on an image
{
"image": "<base64_encoded_image>",
"conf": 0.2,
"iou": 0.4
}
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | string | Yes | - | Base64-encoded image |
conf | float | No | 0.2 | Confidence threshold (0-1) |
iou | float | No | 0.4 | IoU threshold for NMS (0-1) |
{
"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
}
}
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")
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}'
YOLO Filament Detection API v1.0 | Nyad Labs