data_juicer.ops.mapper.image_detection_yolo_mapper module

class data_juicer.ops.mapper.image_detection_yolo_mapper.ImageDetectionYoloMapper(imgsz=640, conf=0.05, iou=0.5, model_path='yolo11n.pt', *args, **kwargs)[源代码]

基类:Mapper

Perform object detection (with YOLO) on images and return the bounding boxes and class labels.

__init__(imgsz=640, conf=0.05, iou=0.5, model_path='yolo11n.pt', *args, **kwargs)[源代码]

Initialization method.

参数:
  • imgsz -- resolution for image resizing

  • conf -- confidence score threshold

  • iou -- IoU (Intersection over Union) score threshold

  • model_path -- the path to the YOLO model.

process_single(sample, rank=None, context=False)[源代码]

For sample level, sample --> sample

参数:

sample -- sample to process

返回:

processed sample