classify_api module

ClassifyApi

class edgeimpulse_api.api.classify_api.ClassifyApi(
		api_client=None
)

Parameters

  • api_client=None

Methods

classify_sample

edgeimpulse_api.api.classify_api.classify_sample(
		self,
		project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})],
		include_debug_info: typing_extensions.Annotated[Optional[pydantic.types.StrictBool], FieldInfo(default=PydanticUndefined, description='Whether to return the debug information from FOMO classification.', extra={})] = None,
		**kwargs
)> edgeimpulse_api.models.classify_sample_response.ClassifySampleResponse

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: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]

  • include_debug_info: typing_extensions.Annotated[Optional[pydantic.types.StrictBool], FieldInfo(default=PydanticUndefined, description='Whether to return the debug information from FOMO classification.', extra={})] = None

  • **kwargs

Return

edgeimpulse_api.models.classify_sample_response.ClassifySampleResponse

classify_sample_by_learn_block

edgeimpulse_api.api.classify_api.classify_sample_by_learn_block(
		self,
		project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})],
		block_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Block ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.classify_sample_response.ClassifySampleResponse

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: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]

  • block_id: typing_extensions.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

edgeimpulse_api.api.classify_api.classify_sample_by_learn_block_v2(
		self,
		project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})],
		block_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Block ID', extra={})],
		variant: typing_extensions.Annotated[Optional[edgeimpulse_api.models.keras_model_variant_enum.KerasModelVariantEnum], FieldInfo(default=PydanticUndefined, description='Keras model variant', extra={})] = None,
		**kwargs
)> edgeimpulse_api.models.classify_sample_v2200_response.ClassifySampleV2200Response

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: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]