UNPKG

@huggingface/tasks

Version:
37 lines (36 loc) 1.24 kB
{ "$id": "/inference/schemas/image-classification/input.json", "$schema": "http://json-schema.org/draft-06/schema#", "description": "Inputs for Image Classification inference", "title": "ImageClassificationInput", "type": "object", "properties": { "inputs": { "type": "string", "description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload.", "comment": "type=binary" }, "parameters": { "description": "Additional inference parameters for Image Classification", "$ref": "#/$defs/ImageClassificationParameters" } }, "$defs": { "ImageClassificationParameters": { "title": "ImageClassificationParameters", "type": "object", "properties": { "function_to_apply": { "title": "ImageClassificationOutputTransform", "$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform", "description": "The function to apply to the model outputs in order to retrieve the scores." }, "top_k": { "type": "integer", "description": "When specified, limits the output to the top K most probable classes." } } } }, "required": ["inputs"] }