숙련된 ML 개발자이며 ML Kit에서 기본 제공하는 모델이 요구사항에 맞지 않는 경우 ML Kit와 함께 커스텀 TensorFlow Lite 모델을 사용할 수 있습니다.
Firebase를 사용해 TensorFlow Lite 모델을 호스팅하거나 앱과 함께 패키징합니다. 그런 다음 ML Kit SDK를 사용하여 커스텀 모델에 가장 적합한 버전으로 추론을 수행합니다.
Firebase로 모델을 호스팅하는 경우 ML Kit가 자동으로 사용자를 최신 버전으로 업데이트합니다.
Firebase로 모델을 호스팅하여 앱의 바이너리 크기를 줄이고 앱에서 항상 최신 모델 버전을 사용하도록 합니다.
기기별 ML 추론
ML Kit SDK로 커스텀 TensorFlow Lite 모델을 실행하여 iOS 또는 Android 앱에서 추론을 수행합니다. 모델을 앱과 번들로 묶거나 클라우드에서 호스팅할 수 있으며 두 방식을 함께 사용해도 됩니다.
자동 모델 대체
여러 모델 소스를 지정합니다. 클라우드 호스팅 모델을 사용할 수 없는 경우 로컬에 저장된 모델을 사용합니다.
자동 모델 업데이트
사용자 기기가 유휴 상태이거나 충전 중이거나 Wi-Fi에 연결되는 등 앱이 모델의 새 버전을 자동으로 다운로드하는 조건을 구성합니다.
구현 경로
TensorFlow 모델 학습
TensorFlow를 사용하여 커스텀 모델을 제작하고 학습시킵니다. 또는 비슷한 문제를 해결하는 기존 모델을 다시 학습시킵니다.
TensorFlow Lite 개발자 가이드를 참조하세요.
모델을 TensorFlow Lite로 변환
그래프를 고정한 다음 TOCO(TensorFlow Optimizing Converter)를 사용하여 모델을 표준 TensorFlow 형식에서 TensorFlow Lite로 변환합니다. TensorFlow Lite 개발자 가이드를 참조하세요.
Firebase로 TensorFlow Lite 모델 호스팅
선택사항: Firebase로 TensorFlow Lite 모델을 호스팅하고 앱에 ML Kit SDK를 포함하면 ML Kit가 사용자의 모델을 최신 버전으로 유지합니다. 사용자 기기가 유휴 상태이거나 충전 중이거나 Wi-Fi에 연결될 때 자동으로 모델 업데이트를 다운로드하도록 ML Kit를 구성할 수 있습니다.
추론에 TensorFlow Lite 모델 사용
iOS 또는 Android 앱에서 ML Kit의 커스텀 모델 API를 사용하여 Firebase에서 호스팅하거나 앱과 번들로 묶인 모델로 추론을 수행합니다.
[[["이해하기 쉬움","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-09-03(UTC)"],[],[],null,["Custom Models \nplat_ios plat_android \nIf you're an experienced ML developer and ML Kit's pre-built models don't\nmeet your needs, you can use a custom\n[TensorFlow Lite](//www.tensorflow.org/lite/) model with\nML Kit.\n\nHost your TensorFlow Lite models using Firebase or package them with your app.\nThen, use the ML Kit SDK to perform inference using the best-available\nversion of your custom model.\nIf you host your model with Firebase, ML Kit automatically updates your users\nwith the latest version.\n\n[iOS](/docs/ml-kit/ios/use-custom-models)\n[Android](/docs/ml-kit/android/use-custom-models)\n| This is a beta release of ML Kit for Firebase. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.\n\nKey capabilities\n\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| TensorFlow Lite model hosting | Host your models using Firebase to reduce your app's binary size and to make sure your app is always using the most recent version available of your model |\n| On-device ML inference | Perform inference in an iOS or Android app by using the ML Kit SDK to run your custom TensorFlow Lite model. The model can be bundled with the app, hosted in the Cloud, or both. |\n| Automatic model fallback | Specify multiple model sources; use a locally-stored model when the Cloud-hosted model is unavailable |\n| Automatic model updates | Configure the conditions under which your app automatically downloads new versions of your model: when the user's device is idle, is charging, or has a Wi-Fi connection |\n\nImplementation path\n\n|---|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | **Train your TensorFlow model** | Build and train a custom model using TensorFlow. Or, re-train an existing model that solves a problem similar to what you want to achieve. See the TensorFlow Lite [Developer Guide](//www.tensorflow.org/mobile/tflite/devguide). |\n| | **Convert the model to TensorFlow Lite** | Convert your model from standard TensorFlow format to TensorFlow Lite by freezing the graph, and then using the TensorFlow Optimizing Converter (TOCO). See the TensorFlow Lite [Developer Guide](//www.tensorflow.org/mobile/tflite/devguide). |\n| | **Host your TensorFlow Lite model with Firebase** | Optional: When you host your TensorFlow Lite model with Firebase and include the ML Kit SDK in your app, ML Kit keeps your users up to date with the latest version of your model. You can configure ML Kit to automatically download model updates when the user's device is idle or charging, or has a Wi-Fi connection. |\n| | **Use the TensorFlow Lite model for inference** | Use ML Kit's custom model APIs in your iOS or Android app to perform inference with your Firebase-hosted or app-bundled model. |"]]