<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLBoundingBoxUnits",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML18MLBoundingBoxUnitsO"
  },
  "title" : "MLBoundingBoxUnits"
}
-->

# MLBoundingBoxUnits

The units a bounding box annotation uses to define its position and size.

```
enum MLBoundingBoxUnits
```

## Overview

All bounding box annotations in an annotation file must use the same units
for their coordinates and size. See
[`MLObjectDetector.AnnotationType.boundingBox(units:origin:anchor:)`](/documentation/CreateML/MLObjectDetector/AnnotationType/boundingBox(units:origin:anchor:)).

## Topics

### Designating units

[`case pixel`](/documentation/CreateML/MLBoundingBoxUnits/pixel)

A unit of measurement in pixels for an image.

[`case normalized`](/documentation/CreateML/MLBoundingBoxUnits/normalized)

A unit of measurement as a portion of an image’s overall width or
height.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)