BoundingBox

@objc(BoundingBox)
public class BoundingBox : NSObject

BoundingBox Contains coordinates to draw bounding boxes on images as predicted directly by the model. However, because of cropping or resizing done to accomadate model size constraints, the default values may not map to coordinates in your view. Use the toCGRect functions to convert bounding box coordinates to fit the image.

  • Declaration

    Swift

    public let yMin: Double
  • Declaration

    Swift

    public let xMin: Double
  • Declaration

    Swift

    public let yMax: Double
  • Declaration

    Swift

    public let xMax: Double
  • Declaration

    Swift

    @objc(initWithYMin:xMin:yMax:xMax:)
    public init(yMin: Double, xMin: Double, yMax: Double, xMax: Double)
  • Declaration

    Swift

    public init(fromAnchor anchor: Anchor)
  • Declaration

    Swift

    public init(from rect: CGRect)
  • Declaration

    Swift

    @objc(imgHeight:imgWidth:)
    public func toCGRect(imgHeight: Double, imgWidth: Double) -> CGRect
  • Declaration

    Swift

    @objc(imgHeight:imgWidth:xOffset:yOffset:)
    public func toCGRect(imgHeight: Double, imgWidth: Double, xOffset: Double, yOffset: Double)
      -> CGRect
  • Scale object result by size.

    Declaration

    Swift

    public func scaledBy(_ size: CGSize) -> CGRect

    Parameters

    size

    Size to scale result from

    Return Value

    CGRect of scaled bounding box.