classify_api module
ClassifyApi
Parameters
api_client=None
Methods
classify_image
Classify an image
Test out a trained impulse (using a posted image).
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
image: pydantic.types.StrictStr
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.test_pretrained_model_response.TestPretrainedModelResponse
classify_sample
Classify sample (deprecated)
This API is deprecated, use classifySampleV2 instead (/v1/api/{projectId}/classify/v2/{sampleId}
). Classify a complete file against the current impulse. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and classify for every window that is extracted.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
include_debug_info: Annotated[pydantic.types.StrictBool | None, FieldInfo(default=PydanticUndefined, description='Whether to return the debug information from FOMO classification.', extra={})] = None
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.classify_sample_response.ClassifySampleResponse
classify_sample_by_learn_block
Classify sample by learn block
This API is deprecated, use classifySampleByLearnBlockV2 (/v1/api/{projectId}/classify/anomaly-gmm/v2/{blockId}/{sampleId}
) instead. Classify a complete file against the specified learn block. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and classify for every window that is extracted.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
block_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Block ID', extra={})]
**kwargs
Return
edgeimpulse_api.models.classify_sample_response.ClassifySampleResponse
classify_sample_by_learn_block_v2
Classify sample by learn block
Classify a complete file against the specified learn block. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and classify for every window that is extracted. Depending on the size of your file, whether your sample is resampled, and whether the result is cached you'll get either the result or a job back. If you receive a job, then wait for the completion of the job, and then call this function again to receive the results. The unoptimized (float32) model is used by default, and classification with an optimized (int8) model can be slower.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
block_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Block ID', extra={})]
variant: Annotated[edgeimpulse_api.models.keras_model_variant_enum.KerasModelVariantEnum | None, FieldInfo(default=PydanticUndefined, description='Keras model variant', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.classify_sample_v2200_response.ClassifySampleV2200Response
classify_sample_for_variants
Classify sample for the given set of variants
Classify a complete file against the current impulse, for all given variants. Depending on the size of your file and whether the sample is resampled, you may get a job ID in the response.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
variants: Annotated[pydantic.types.StrictStr, FieldInfo(default=Ellipsis, description='List of keras model variants, given as a JSON string', extra={})]
include_debug_info: Annotated[pydantic.types.StrictBool | None, FieldInfo(default=PydanticUndefined, description='Whether to return the debug information from FOMO classification.', extra={})] = None
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.classify_sample_for_variants200_response.ClassifySampleForVariants200Response
classify_sample_v2
Classify sample
Classify a complete file against the current impulse. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and classify for every window that is extracted. Depending on the size of your file, whether your sample is resampled, and whether the result is cached you'll get either the result or a job back. If you receive a job, then wait for the completion of the job, and then call this function again to receive the results. The unoptimized (float32) model is used by default, and classification with an optimized (int8) model can be slower.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
include_debug_info: Annotated[pydantic.types.StrictBool | None, FieldInfo(default=PydanticUndefined, description='Whether to return the debug information from FOMO classification.', extra={})] = None
variant: Annotated[edgeimpulse_api.models.keras_model_variant_enum.KerasModelVariantEnum | None, FieldInfo(default=PydanticUndefined, description='Keras model variant', extra={})] = None
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.classify_sample_v2200_response.ClassifySampleV2200Response
get_classify_job_result
Classify job result
Get classify job result, containing the result for the complete testing dataset.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
feature_explorer_only: Annotated[pydantic.types.StrictBool | None, FieldInfo(default=PydanticUndefined, description='Whether to get only the classification results relevant to the feature explorer.', extra={})] = None
variant: Annotated[edgeimpulse_api.models.keras_model_variant_enum.KerasModelVariantEnum | None, FieldInfo(default=PydanticUndefined, description='Keras model variant', extra={})] = None
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.classify_job_response.ClassifyJobResponse
get_classify_job_result_page
Single page of a classify job result
Get classify job result, containing the predictions for a given page.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
limit: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Maximum number of results', extra={})] = None
offset: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.', extra={})] = None
variant: Annotated[edgeimpulse_api.models.keras_model_variant_enum.KerasModelVariantEnum | None, FieldInfo(default=PydanticUndefined, description='Keras model variant', extra={})] = None
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.classify_job_response_page.ClassifyJobResponsePage
get_sample_window_from_cache
Get a window of raw sample features from cache, after a live classification job has completed.
Get raw sample features for a particular window. This is only available after a live classification job has completed and raw features have been cached.
Parameters
self
project_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]
sample_id: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]
window_index: Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample window index', extra={})]
impulse_id: Annotated[pydantic.types.StrictInt | None, FieldInfo(default=PydanticUndefined, description='Impulse ID. If this is unset then the default impulse is used.', extra={})] = None
**kwargs
Return
edgeimpulse_api.models.get_sample_response.GetSampleResponse
Last updated