data_juicer.ops.mapper.image_tagging_mapper module

class data_juicer.ops.mapper.image_tagging_mapper.ImageTaggingMapper(tag_field_name: str = 'image_tags', *args, **kwargs)[source]

Bases: Mapper

Mapper to generate image tags.

__init__(tag_field_name: str = 'image_tags', *args, **kwargs)[source]

Initialization method. :param tag_field_name: the field name to store the tags. It’s

“image_tags” in default.

Parameters:
  • args – extra args

  • kwargs – extra args

process_single(sample, rank=None, context=False)[source]

For sample level, sample –> sample

Parameters:

sample – sample to process

Returns:

processed sample