객체 감지 및 추적
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.

ML Kit의 기기 내 객체 감지 및 추적 API를 사용하면 이미지 또는 실시간 카메라 피드에서 객체를 감지하고 추적할 수 있습니다.
원하는 경우 API에 기본 제공되는 대략적인 분류기를 사용하거나 자체 커스텀 이미지 분류 모델을 사용하여 감지된 객체를 분류할 수 있습니다. 자세한 내용은 커스텀 TensorFlow Lite 모델 사용을 참조하세요.
객체 감지 및 추적은 기기에서 실행되므로 시각적 검색 파이프라인의 프런트엔드로도 잘 작동합니다. 객체를 감지하고 필터링한 후 Cloud Vision 제품 검색과 같은 클라우드 백엔드에 전달할 수 있습니다.
iOS
Android
주요 기능
- 빠른 객체 감지 및 추적
이미지에서 객체를 인식하고 위치를 가져옵니다. 연속된 이미지 프레임에서 객체를 추적합니다.
- 최적화된 기기 내 모델
객체 감지 및 추적 모델은 휴대기기에 최적화되어 있으며 저사양 기기에서도 실시간 애플리케이션에서 사용하도록 고안되었습니다.
- 주요 객체 감지
이미지에서 가장 눈에 띄는 객체를 자동으로 판별합니다.
- 대략적인 분류: 객체를 광범위한 카테고리로 분류하여 관심 없는 객체를 필터링할 수 있습니다. 가정용품, 패션 상품, 식품, 식물, 장소 등의 카테고리가 지원됩니다.
- 커스텀 모델을 사용한 분류
고유한 커스텀 이미지 분류 모델을 사용하여 특정 객체 카테고리를 식별하거나 필터링합니다. 이미지의 배경을 제외하여 커스텀 모델의 성능을 개선합니다.
결과 예시
여러 이미지에서 가장 눈에 띄는 객체 추적
아래 예는 ML Kit에서 제공하는 기본 대략적인 분류 기준을 사용하여 연속된 3개 프레임의 추적 데이터를 보여줍니다.
 |
추적 ID |
0 |
경계 |
(95, 45), (496, 45), (496, 240), (95, 240) |
카테고리 |
장소 |
분류 신뢰도 |
0.9296875 |
|
 |
추적 ID |
0 |
경계 |
(84, 46), (478, 46), (478, 247), (84, 247) |
카테고리 |
장소 |
분류 신뢰도 |
0.8710938 |
|
 |
추적 ID |
0 |
경계 |
(53, 45), (519, 45), (519, 240), (53, 240) |
카테고리 |
장소 |
분류 신뢰도 |
0.8828125 |
|
사진: 크리스찬 페레르 [CC BY-SA 4.0]
정적 이미지의 여러 객체
아래 예는 ML Kit에서 제공하는 기본 대략적인 분류 기준을 사용하여 이미지에서 인식된 4개 객체의 데이터를 보여줍니다.

객체 0 |
경계 |
(1, 97), (332, 97), (332, 332), (1, 332) |
카테고리 |
FASHION_GOOD |
분류 신뢰도 |
0.95703125 |
Object 1 |
경계 |
(186, 80), (337, 80), (337, 226), (186, 226) |
카테고리 |
FASHION_GOOD |
분류 신뢰도 |
0.84375 |
Object 2 |
경계 |
(296, 80), (472, 80), (472, 388), (296, 388) |
카테고리 |
FASHION_GOOD |
분류 신뢰도 |
0.94921875 |
Object 3 |
경계 |
(439, 83), (615, 83), (615, 306), (439, 306) |
카테고리 |
FASHION_GOOD |
분류 신뢰도 |
0.9375 |
커스텀 TensorFlow Lite 모델 사용
기본적인 대략적인 분류 기준은 5가지 카테고리로 구축되어 감지된 객체에 관한 제한된 정보를 제공합니다. 예를 들어 꽃의 종이나 음식의 종류를 구분하는 모델과 같이 더 좁은 범위의 개념 영역을 자세히 포괄하는 보다 전문화된 분류 기준 모델이 필요할 수 있습니다.
이 API를 사용하면 다양한 소스의 커스텀 이미지 분류 모델을 지원하여 특정 사용 사례에 맞게 조정할 수 있습니다. 자세한 내용은 ML Kit를 사용한 커스텀 모델을 참조하세요. 커스텀 모델은 앱과 번들로 묶거나 Firebase 머신러닝의 모델 배포 서비스를 사용하여 클라우드에서 동적으로 다운로드할 수 있습니다.
iOS
Android
필요한 경우 객체 감지 및 추적은 이중 선형 이미지 크기 조정 및 확장을 사용하여 기본 모델의 요구사항에 맞게 입력 이미지 크기 및 가로세로 비율을 조정합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003eML Kit's on-device API enables detection and tracking of objects within images or live camera feeds, working efficiently even on lower-end mobile devices.\u003c/p\u003e\n"],["\u003cp\u003eIt offers optional object classification using a built-in coarse classifier or your own custom TensorFlow Lite model for more specialized categorization.\u003c/p\u003e\n"],["\u003cp\u003eThe API can identify the most prominent object in an image and track it across frames, making it suitable for visual search applications.\u003c/p\u003e\n"],["\u003cp\u003eCustom models can be integrated to classify objects into specific categories, enhancing the functionality for tailored use cases.\u003c/p\u003e\n"],["\u003cp\u003eInput images are automatically preprocessed to fit model requirements, using bilinear scaling and stretching if necessary.\u003c/p\u003e\n"]]],["ML Kit's API enables on-device object detection and tracking in images or live feeds, optionally classifying them. It features fast detection, an optimized model for mobile, and prominent object identification. Objects can be classified into broad categories or with custom models. The API supports custom image classification models, including ones dynamically downloaded. Detected objects are tracked across frames, and the system adjusts input image size and aspect ratio as needed.\n"],null,["With ML Kit's on-device object detection and tracking API, you can detect\nand track objects in an image or live camera feed.\n\nOptionally, you can classify detected objects, either by using the coarse\nclassifier built into the API, or using your own custom image classification\nmodel. See [Using a custom TensorFlow Lite model](#custom-tflite) for more\ninformation.\n\nBecause object detection and tracking happens on the device, it works well as\nthe front end of the visual search pipeline. After you detect and filter\nobjects, you can pass them to a cloud backend, such as\n[Cloud Vision Product Search](https://cloud.google.com/vision/product-search/docs/).\n\n[iOS](/ml-kit/vision/object-detection/ios)\n[Android](/ml-kit/vision/object-detection/android)\n\nKey capabilities\n\n- **Fast object detection and tracking** Detect objects and get their locations in the image. Track objects across successive image frames.\n- **Optimized on-device model** The object detection and tracking model is optimized for mobile devices and intended for use in real-time applications, even on lower-end devices.\n- **Prominent object detection** Automatically determine the most prominent object in an image.\n- **Coarse classification** Classify objects into broad categories, which you can use to filter out objects you're not interested in. The following categories are supported: home goods, fashion goods, food, plants, and places.\n- **Classification with a custom model** Use your own custom image classification model to identify or filter specific object categories. Make your custom model perform better by leaving out background of the image.\n\nExample results\n\nTracking the most prominent object across images\n\nThe example below shows the tracking data from three successive frames with the\ndefault coarse classifier provided by ML Kit.\n\n|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | |---------------------------|--------------------------------------------| | Tracking ID | 0 | | Bounds | (95, 45), (496, 45), (496, 240), (95, 240) | | Category | PLACE | | Classification confidence | 0.9296875 | |\n| | |---------------------------|--------------------------------------------| | Tracking ID | 0 | | Bounds | (84, 46), (478, 46), (478, 247), (84, 247) | | Category | PLACE | | Classification confidence | 0.8710938 | |\n| | |---------------------------|--------------------------------------------| | Tracking ID | 0 | | Bounds | (53, 45), (519, 45), (519, 240), (53, 240) | | Category | PLACE | | Classification confidence | 0.8828125 | |\n\nPhoto: Christian Ferrer \\[CC BY-SA 4.0\\]\n\nMultiple objects in a static image\n\nThe example below shows the data for the four objects detected in the image with\nthe default coarse classifier provided by ML Kit.\n\n| Object 0 ||\n|---------------------------|----------------------------------------------|\n| Bounds | (1, 97), (332, 97), (332, 332), (1, 332) |\n| Category | FASHION_GOOD |\n| Classification confidence | 0.95703125 |\n| Bounds | (186, 80), (337, 80), (337, 226), (186, 226) |\n| Category | FASHION_GOOD |\n| Classification confidence | 0.84375 |\n| Bounds | (296, 80), (472, 80), (472, 388), (296, 388) |\n| Category | FASHION_GOOD |\n| Classification confidence | 0.94921875 |\n| Bounds | (439, 83), (615, 83), (615, 306), (439, 306) |\n| Category | FASHION_GOOD |\n| Classification confidence | 0.9375 |\n\nUsing a custom TensorFlow Lite model\n\nThe default coarse classifier is built for five categories, providing limited\ninformation about the detected objects. You might need a more specialized\nclassifier model that covers a narrower domain of concepts in more detail;\nfor example, a model to distinguish between species of flowers or types of\nfood.\n\nThis API lets you tailor to a particular use case by by supporting custom image\nclassification models from a wide range of sources. Please refer to\n[Custom models with ML Kit](/ml-kit/custom-models) to learn more. Custom models\ncan be bundled with your app or dynamically downloaded from the cloud using\nFirebase Machine Learning's Model deployment service.\n\n[iOS](/ml-kit/vision/object-detection/custom-models/ios)\n[Android](/ml-kit/vision/object-detection/custom-models/android)\n\nInput image preprocessing\n\nIf needed, object detection and tracking uses bilinear image scaling and\nstretching to adjust the input image size and aspect ratio so that they fit the\nrequirements of the underlying model."]]