yolo_v8face.YoloV8faceConverter

Inheritance diagram of YoloV8faceConverter

YoloV8faceConverter inheritance diagram

class savant.converter.yolo_v8face.YoloV8faceConverter(confidence_threshold=0.6, nms_iou_threshold=0.5, **kwargs)

YOLOv8face output to bbox and landmarks converter.

__call__(*output_layers, model, roi)

Converts detector output layer tensor to bbox tensor and additional attributes (landmarks).

Parameters:
  • output_layers (ndarray) – Output layer tensor

  • model (ComplexModel) – Model definition, required parameters: input tensor shape, maintain_aspect_ratio

  • roi (Tuple[float, float, float, float]) – [left, top, width, height] of the rectangle on which the model infers

Returns:

a combination of BaseObjectModelOutputConverter and BaseAttributeModelOutputConverter outputs:

  • BBox tensor (class_id, confidence, xc, yc, width, height, [angle]) offset by roi upper left and scaled by roi width and height,

  • list of attributes values with confidences (attr_name, value, confidence)

Return type:

Tuple[ndarray, List[List[Tuple[str, Any, float]]]] | None

tensor_format: TensorFormat = 0

Set to CuPy to get the output_layers tensors in the converter call on the GPU as a cupy.ndarray. Or set to NumPy to get tensors on the host as a numpy.ndarray.