Checking API status...

Model Information

Detection Settings

25%
45%

Model Details

Model Type YOLOv5
Total Species -
Device -
Model Size 33k Images

Upload & Test

+

Drag image here or click to browse

PNG, JPG, JPEG up to 10MB

Try Sample Images

Detection Results

Annotated Image

Annotated results will appear here

API Documentation

POST https://seamo-ai-fishapi.hf.space/api/v1/detect Live
691 Species
Comprehensive marine life detection
~2 seconds
Fast AI-powered processing
Precise Locations
Bounding boxes with confidence scores
Annotated Images
Visual results with species labels
cURL Request
# Easy one-liner with automatic base64 conversion
curl -X POST "https://seamo-ai-fishapi.hf.space/api/v1/detect" \
  -H "Content-Type: application/json" \
  -d "{
    \"image\": \"$(base64 -i your_image.jpg | tr -d '\n')\",
    \"confidence_threshold\": 0.25,
    \"iou_threshold\": 0.45,
    \"return_annotated_image\": true
  }"
Python Request
import requests
import base64

url = "https://seamo-ai-fishapi.hf.space/api/v1/detect"

# Read and encode image
with open("your_image.jpg", "rb") as f:
    image_data = base64.b64encode(f.read()).decode()

payload = {
    "image": image_data,
    "confidence_threshold": 0.25,
    "iou_threshold": 0.45,
    "return_annotated_image": True
}

response = requests.post(url, json=payload)
result = response.json()

print(f"Found {len(result['detections'])} species")
for detection in result['detections']:
    print(f"- {detection['class_name']}: {detection['confidence']:.2%}")
JavaScript Request
// Convert file to base64
function fileToBase64(file) {
    return new Promise((resolve, reject) => {
        const reader = new FileReader();
        reader.onload = () => resolve(reader.result.split(',')[1]);
        reader.onerror = reject;
        reader.readAsDataURL(file);
    });
}

const imageBase64 = await fileToBase64(fileInput.files[0]);

const payload = {
    image: imageBase64,
    confidence_threshold: 0.25,
    iou_threshold: 0.45,
    return_annotated_image: true
};

fetch('https://seamo-ai-fishapi.hf.space/api/v1/detect', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
    console.log(`Found ${data.detections.length} species`);
    data.detections.forEach(detection => {
        console.log(`${detection.class_name}: ${(detection.confidence * 100).toFixed(1)}%`);
    });
})
.catch(error => console.error('Error:', error));
C# Request
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

var client = new HttpClient();

// Read and encode image
var imageBytes = File.ReadAllBytes("your_image.jpg");
var imageBase64 = Convert.ToBase64String(imageBytes);

var payload = new {
    image = imageBase64,
    confidence_threshold = 0.25,
    iou_threshold = 0.45,
    return_annotated_image = true
};

var json = JsonConvert.SerializeObject(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");

var response = await client.PostAsync(
    "https://seamo-ai-fishapi.hf.space/api/v1/detect",
    content
);

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
Example API Response
Actual response from testing with a marine image - detected 8 marine species in 1.79 seconds:
Sebastolobus (Rockfish) 86.7%
Octocorallia (Soft Coral) 69.7%
Psolus squamatus (Sea Cucumber) 66.3%
JSON Response
{
  "detections": [
    {
      "class_id": 3,
      "class_name": "Sebastolobus",
      "confidence": 0.8674,
      "bbox": {
        "x": 179.4, "y": 282.2,
        "width": 129.7, "height": 71.0
      }
    },
    {
      "class_id": 16,
      "class_name": "Octocorallia",
      "confidence": 0.6969,
      "bbox": { /* coordinates */ }
    }
    // ... 6 more detections
  ],
  "annotated_image": "base64_encoded_image_with_boxes",
  "processing_time": 1.79,
  "model_info": {
    "model_name": "marina-benthic-33k",
    "total_classes": 691,
    "device": "cpu"
  },
  "image_dimensions": {
    "width": 714, "height": 486
  }
}