flow_segmenter.segmenter.SegmenterYolo

class flow_segmenter.segmenter.SegmenterYolo(config)[source]

YOLO-based Segmenter.

Parameters:

config (SegmenterConfig) – SegmenterConfig instance with model names, options, and YOLO-specific arguments.

__init__(config)[source]
Parameters:

config (SegmenterConfig)

Return type:

None

Methods

__init__(config)

get_batchsize(batch_sizes)

Method to get the batch size of the model :param batch_sizes: List of batch sizes or a single batch size int :return: Batch size of the model

segment(image[, xml_etree])

Segment an image using the loaded YOLO model.

segment_dataset(dataset[, new_column_name])

Segment a HuggingFace dataset with the loaded model.