Phenology/Code/Supervised_learning/resnet/specs/1-phenology-classifier/contracts/api.yaml
2025-11-06 14:16:49 +01:00

60 lines
1.6 KiB
YAML

openapi: 3.0.3
info:
title: ResNet Phenology Classifier API
version: 1.0.0
description: API for classifying plant images by phenological phase using ResNet model
paths:
/classify:
post:
summary: Classify a plant image
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: Plant image file (JPEG/PNG)
required:
- image
responses:
'200':
description: Classification result
content:
application/json:
schema:
type: object
properties:
phase:
type: string
description: Predicted phenological phase
confidence:
type: number
format: float
description: Confidence score (0-1)
probabilities:
type: object
description: Probabilities for all phases
additionalProperties:
type: number
format: float
'400':
description: Invalid input
'500':
description: Server error
components:
schemas:
ClassificationResult:
type: object
properties:
phase:
type: string
confidence:
type: number
probabilities:
type: object