vak.prep.frame_classification.make_splits.Sample#

class vak.prep.frame_classification.make_splits.Sample(source_id: int, source_path: str, frame_labels_npy_path: str, sample_id_vec: ndarray, inds_in_sample_vec: ndarray)[source]#

Bases: object

Dataclass representing one sample in a frame classification dataset.

Used to add paths for arrays from the sample to a dataset_df, and to build the sample_ids vector and inds_in_sample vector for the entire dataset.

source_id#

Integer ID number used for sorting.

Type:

int

frames_path#

The path to the input to the model \(x\) after it has been moved, copied, or created from a source_path. Path will be written relative to dataset_path. We preserve the original paths as metadata, and consider the files in the split to contain frames, regardless of the source domain of the data.

Type:

str

frame_labels_npy_path#

Path to frame labels, relative to dataset_path.

Type:

str

sample_id_vec#

Sample ID vector for this sample.

Type:

numpy.ndarray

inds_in_sample_vec#

Indices within sample.

Type:

numpy.ndarray

__init__(source_id: int, source_path: str, frame_labels_npy_path: str, sample_id_vec: ndarray, inds_in_sample_vec: ndarray) None#

Method generated by attrs for class Sample.

Methods

__init__(source_id, source_path, ...)

Method generated by attrs for class Sample.

Attributes