dataeval.types.SourceIndex¶
- class dataeval.types.SourceIndex¶
The indices of the source item, target and channel.
- target¶
Index of the box/target within the source item. - None: References item-level data - int: References a specific target/detection within the item (0-indexed per item) For Object Detection datasets, this maps to the target_index in Metadata.
- Type:¶
int | None
- classmethod from_string(s)¶
Construct a SourceIndex from a human-readable string.
- Parameters:¶
- s : str¶
String in the format “item”, “item/target”, or “item/-/channel”, “item/target/channel” Use “-” to represent None for the target field.
- Return type:¶
Examples
>>> SourceIndex.from_string("0") SourceIndex(0) >>> SourceIndex.from_string("0/3") SourceIndex(0, 3) >>> SourceIndex.from_string("0/-/1") SourceIndex(0, None, 1) >>> SourceIndex.from_string("0/3/1") SourceIndex(0, 3, 1)