<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLObjectDetector/DataSource/directoryWithImagesAndJsonAnnotation(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML16MLObjectDetectorV10DataSourceO36directoryWithImagesAndJsonAnnotationyAE10Foundation3URLV_tcAEmF"
  },
  "title" : "MLObjectDetector.DataSource.directoryWithImagesAndJsonAnnotation(at:)"
}
-->

# MLObjectDetector.DataSource.directoryWithImagesAndJsonAnnotation(at:)

An object-detector data source you create by selecting a directory that contains image files and exactly
one JSON annotation file.

```
case directoryWithImagesAndJsonAnnotation(at: URL)
```

## Parameters

`directoryWithImagesAndJsonAnnotation`

The location of a directory that contains exactly one JSON
annotation file and all the image files the JSON file’s annotations refer to.

---

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)