Segments
Segments are how we define an event location in the SensiML Toolkit. They contain the start and end location of the event and the Label for the event
Examples:
from sensiml.datamanager.label_relationship import Segment, SegmentSet
# to see a list of segments associated with a capture
segment_set = SegmentSet(client._connection, client._project, capture)
print(segment_set.segments)
# To create a new segment
segment = Segment(client._connection, project, capture, segmenter, label, label_value)
segment.sample_start = 100
segment.sample_end = 1000
segment.insert()
Copyright 2017-2024 SensiML Corporation
This file is part of SensiML™ Piccolo AI™.
SensiML Piccolo AI is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
SensiML Piccolo AI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with SensiML Piccolo AI. If not, see <https://www.gnu.org/licenses/>.
- class sensiml.datamanager.label_relationship.Segment(connection: Connection, project: Project, capture: Capture, segmenter: Optional[Segmenter] = None, label: Optional[Label] = None, label_value: Optional[LabelValue] = None)
Base class for a label object.
- delete() Response
Calls the REST API and deletes the object from the server.
- insert() Response
Calls the REST API and inserts a metadata object onto the server using the local object’s properties.
- refresh() Response
Calls the REST API and populates the local object’s properties from the server.
- property sample_end: int
The index of the last sample of the label
- property sample_start: int
The index of the first sample of the label
- property segmenter: str
The index of the last sample of the label
- update() Response
Calls the REST API and updates the object on the server.
- property uuid: str
Auto generated unique identifier for the metadata object