data package

Sample

class edgeimpulse.experimental.data.Sample(
		data: io.BufferedIOBase,
		filename: Optional[str= None,
		category: Optional[Literal['training''testing''anomaly''split']] = 'split',
		label: Optional[str= None,
		bounding_boxes: Optional[Sequence[dict]] = None,
		metadata: Optional[dict= None,
		sample_id: Optional[int= None,
		structured_labels: Optional[Sequence[dict]] = None
)

Wrapper class for sample data, labels, and associated metadata.

Sample data should be contained in a file or file-like object, for example, as the return from open(..., "rb"). The upload_samples() function expects Sample objects as input.

Parameters

  • data: io.BufferedIOBase

  • filename: Optional[str] = None

  • category: Optional[Literal['training', 'testing', 'anomaly', 'split']] = 'split'

  • label: Optional[str] = None

  • bounding_boxes: Optional[Sequence[dict]] = None

  • metadata: Optional[dict] = None

  • sample_id: Optional[int] = None

  • structured_labels: Optional[Sequence[dict]] = None

Class variables

  • bounding_boxes: Optional[Sequence[dict]]

  • category: Optional[Literal['training', 'testing', 'anomaly', 'split']]

  • data: io.BufferedIOBase

  • filename: Optional[str]

  • label: Optional[str]

  • metadata: Optional[dict]

  • sample_id: Optional[int]

  • structured_labels: Optional[Sequence[dict]]

delete_all_samples

edgeimpulse.experimental.data.delete_all_samples(
		category: Optional[str= None,
		api_key: Optional[str= None,
		timeout_sec: Optional[float= None
)> Optional[edgeimpulse_api.models.generic_api_response.GenericApiResponse]

Delete all samples in a given category.

If category is set to None, all samples in the project are deleted.

Parameters

  • category: Optional[str] = None

  • api_key: Optional[str] = None

  • timeout_sec: Optional[float] = None

Return

Optional[edgeimpulse_api.models.generic_api_response.GenericApiResponse]

delete_sample_by_id

edgeimpulse.experimental.data.delete_sample_by_id(
		sample_id: int,
		api_key: Optional[str= None,
		timeout_sec: Optional[float= None
)> Optional[edgeimpulse_api.models.generic_api_response.GenericApiResponse]

Delete a particular sample from a project given the sample ID.

Parameters

  • sample_id: int

  • api_key: Optional[str] = None

  • timeout_sec: Optional[float] = None

Return

Optional[edgeimpulse_api.models.generic_api_response.GenericApiResponse]

delete_samples_by_filename