A recognition version implements a specification: this is the link between a specification and a neural network.
Attribute
Type
Attributes
Description
id
int
read-only
The ID of the recognition version.
spec_id
int
immutable
network_id
int
immutable
post_processings
immutable
spec_name
string
read-only
network_name
string
read-only
update_date
string
read-only
Date time (ISO 8601 format) of the creation specification version.
Post-processing
The fields of this object are mutually exclusive: you must specify exactly one of them.
Attribute
Type
Description
classification
detection
Classification post-processing
Attribute
Type
Description
thresholds
array(float)
A list of threshold for each label of the recognition specification. The label will be considered present if its score is greater than the threshold. The length of this array must exactly match the length of the labels field of the parent labels specification and the i-th threshold will be matched to the i-th label.
Detection post-processing
You must specify exactly one of the anchored_output, direct_output or yolo_output fields. When we specify an expected tensor size in the description of those fields, we omit the first dimension of the tensor (i.e. the batch size).
Attribute
Type
Description
thresholds
array(float)
A list of threshold for each label of the recognition specification. The label will be considered present if its score is greater than the threshold. The length of this array must exactly match the length of the labels field of the parent labels specification and the i-th threshold will be matched to the i-th label.
nms_threshold
float
The Jaccard index threshold that will be applied to NMS to decide if two boxes of the same label represent the same object.
{"id": 1,"spec_id": 42,"spec_name": "hot-dog VS not hot-dog classifier","network_id": 123,"network_name": "hot-dog VS not hot-dog classifier","update_date": "2018-03-09T18:30:43.404610Z","post_processings": [{"classification": {"output_tensor":"inception_v3/logits/predictions","thresholds": [0.5,0.5 ] } }]}
List versions
Definition
Get the list of existing recognition versions.
# To access all your versions, use:GEThttps://api.deepomatic.com/v0.7/recognition/versions# To access versions attached to a given recognition spec, use:GEThttps://api.deepomatic.com/v0.7/recognition/specs/{SPEC_ID}/versions
import osfrom deepomatic.api.client import Clientclient =Client(api_key=os.getenv('DEEPOMATIC_API_KEY'))# To access all your versions, use:client.RecognitionVersion.list()# To access versions attached to a given recognition spec, use:client.RecognitionSpec.retrieve({SPEC_ID}).versions()
Code sample
# To access all your versions:curlhttps://api.deepomatic.com/v0.7/recognition/versions \-H "X-API-KEY: ${DEEPOMATIC_API_KEY}"# To access versions attached to a given recognition spec, use:curlhttps://api.deepomatic.com/v0.7/recognition/specs/42/versions \-H "X-API-KEY: ${DEEPOMATIC_API_KEY}"
import osfrom deepomatic.api.client import Clientclient =Client(api_key=os.getenv('DEEPOMATIC_API_KEY'))# To access all your versions, use:for version in client.RecognitionVersion.list():print(version)# To access versions attached to a given recognition spec, use:for version in client.RecognitionSpec.retrieve(42).versions():print(version)
Response
A paginated list of responses.
Attribute
Type
Description
count
int
The total number of results.
next
string
The URL to the next page.
previous
string
The URL to the previous page.
results
JSON
{"count": 2,"next": null,"previous": null,"results": [ {"id":1,"spec_id":42,"spec_name":"hot-dog VS not hot-dog classifier","network_id":123,"network_name":"hot-dog VS not hot-dog classifier","update_date":"2018-03-09T18:30:43.404610Z" },... ]}
Run inference on this specification version. This endpoint returns a task ID. Please refer to the Specification Inference to have a comprehensive list of the inference request arguments and response.
The object that defines some network specific adjustments like the output tensor, some thresholds, etc. The length of this array must exactly match the length of the outputs field of the parent specification and the i-th post-processing will be matched to the i-th output.
The name of the corresponding to spec_id. This is convenient for display purposes.
The name of the corresponding to network_id. This is convenient for display purposes.
A post-processing of type classification for an output of type .
A post-processing of type detection for an output of type .
The ID of the parent .
The ID of the which will cary on the computation.
The that defines some network specific adjustments like the output tensor, some thresholds, etc. The length of this array must exactly match the length of the outputs field of the parent specification and the i-th post-processing will be matched to the i-th output.
array()
A list of your . Please note that the post_processings field is not present.