data_juicer.ops.mapper.detect_character_attributes_mapper module

class data_juicer.ops.mapper.detect_character_attributes_mapper.DetectCharacterAttributesMapper(detect_character_locations_mapper_args: Dict | None = {}, *args, **kwargs)[源代码]

基类:Mapper

Takes an image, a caption, and main character names as input to extract the characters' attributes.

__init__(detect_character_locations_mapper_args: Dict | None = {}, *args, **kwargs)[源代码]

Initialization method.

参数:

detect_character_locations_mapper_args -- Arguments for detect_character_locations_mapper_args. Controls the threshold for locating the main character. Default empty dict will use fixed values: default mllm_mapper_args, default image_text_matching_filter_args, yoloe_path="yoloe-11l-seg.pt", iou_threshold=0.7, matching_score_threshold=0.4,

process_single(samples, rank=None)[源代码]

For sample level, sample --> sample

参数:

sample -- sample to process

返回:

processed sample