MLKitObjectDetectionCommon Framework Reference

  • MLKObjectDetectorMode defines two constants, singleImage and stream, to specify how the object detector operates.

  • singleImage mode returns results only after both tracking and detection are complete.

  • stream mode processes tracking and detection concurrently, returning tracker results promptly while detection might still be ongoing.

Constants

The following constants are available globally.

  • In single image mode, the results are returned when both tracker and detector are finished.

    Declaration

    Swift

    static let singleImage: ObjectDetectorMode
  • In stream mode, tracker and detector run in parallel. The results are returned when tracker processing is finished. Detection may still be in progress at that time.

    Declaration

    Swift

    static let stream: ObjectDetectorMode