{"id":49515213,"url":"https://github.com/pedrol2b/react-native-vision-camera-mlkit","last_synced_at":"2026-05-01T21:35:45.289Z","repository":{"id":242452739,"uuid":"801233578","full_name":"pedrol2b/react-native-vision-camera-mlkit","owner":"pedrol2b","description":"A powerful React Native Vision Camera plugin delivering high-performance Google ML Kit frame processor features—including text recognition (OCR), face detection, barcode scanning, pose detection, and more. Seamlessly bridges native ML Kit capabilities for real-time, on-device computer vision in your React Native apps.","archived":false,"fork":false,"pushed_at":"2026-02-04T01:03:08.000Z","size":7039,"stargazers_count":45,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-12T04:55:59.761Z","etag":null,"topics":["android","barcode","barcode-scanner","camera","computer-vision","face-detection","frame-processor","google-ml-kit","image-processing","ios","machine-learning","mlkit","native-module","ocr","pose-detection","react-native","react-native-module","text-detection","vision","vision-camera"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-vision-camera-mlkit","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedrol2b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"pedrol2b","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-05-15T20:51:32.000Z","updated_at":"2026-03-09T19:10:34.000Z","dependencies_parsed_at":"2024-06-03T05:17:14.029Z","dependency_job_id":"f5a21557-4d68-4b76-94bc-def5ed950d4c","html_url":"https://github.com/pedrol2b/react-native-vision-camera-mlkit","commit_stats":null,"previous_names":["pedrol2b/react-native-vision-camera-mlkit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pedrol2b/react-native-vision-camera-mlkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrol2b%2Freact-native-vision-camera-mlkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrol2b%2Freact-native-vision-camera-mlkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrol2b%2Freact-native-vision-camera-mlkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrol2b%2Freact-native-vision-camera-mlkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrol2b","download_url":"https://codeload.github.com/pedrol2b/react-native-vision-camera-mlkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrol2b%2Freact-native-vision-camera-mlkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32514005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","barcode","barcode-scanner","camera","computer-vision","face-detection","frame-processor","google-ml-kit","image-processing","ios","machine-learning","mlkit","native-module","ocr","pose-detection","react-native","react-native-module","text-detection","vision","vision-camera"],"created_at":"2026-05-01T21:35:45.166Z","updated_at":"2026-05-01T21:35:45.246Z","avatar_url":"https://github.com/pedrol2b.png","language":"TypeScript","funding_links":["https://github.com/sponsors/pedrol2b"],"categories":[],"sub_categories":[],"readme":"# react-native-vision-camera-mlkit\n\n\u003ca href=\"https://youtube.com/shorts/Wtp-Ji18bWE?feature=share\"\u003e\n  \u003cimg\n    src=\"docs/static/img/example.gif\"\n    align=\"right\"\n    width=\"35%\"\n    alt=\"example\"\n  /\u003e\n\u003c/a\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![NPM Version][npm-version-shield]][npm-version-url]\n\nA [React Native Vision Camera](https://github.com/mrousavy/react-native-vision-camera) plugin that exposes high-performance [Google ML Kit](https://developers.google.com/ml-kit) [frame processor](https://react-native-vision-camera.com/docs/guides/frame-processors) features such as text recognition (OCR), face detection, barcode scanning, pose detection, and more.\n\n\u003e The example app is intentionally heavy and demo-focused. For integration details, follow the documentation below.\n\n## Requirements\n\n- iOS 12+ and Android SDK 21+\n- [react-native-vision-camera](https://www.npmjs.com/package/react-native-vision-camera)\n- [react-native-worklets-core](https://www.npmjs.com/package/react-native-worklets-core)\n\nInstall Vision Camera (React Native):\n\n```sh\nnpm i react-native-vision-camera\ncd ios \u0026\u0026 pod install\n```\n\nInstall Worklets Core:\n\n```sh\nnpm i react-native-worklets-core\n# or\nyarn add react-native-worklets-core\n```\n\nAdd the Babel plugin in `babel.config.js`:\n\n```js\nmodule.exports = {\n  plugins: [['react-native-worklets-core/plugin']],\n};\n```\n\n\u003e For Expo, follow the Vision Camera guide: [react-native-vision-camera.com/docs/guides](https://react-native-vision-camera.com/docs/guides)\n\n## Installation\n\n```sh\nnpm install react-native-vision-camera-mlkit\n# or\nyarn add react-native-vision-camera-mlkit\n\ncd ios \u0026\u0026 pod install\n```\n\n## ML Kit Models Installation (Selective)\n\nBy default, all ML Kit features are enabled. You can selectively include only the models you need to reduce binary size.\n\n### Android (Gradle)\n\nIn your app's `android/build.gradle` (root project), add:\n\n```gradle\next[\"react-native-vision-camera-mlkit\"] = [\n  mlkit: [\n    textRecognition: true,\n    textRecognitionChinese: false,\n    textRecognitionDevanagari: false,\n    textRecognitionJapanese: false,\n    textRecognitionKorean: false,\n    faceDetection: false,\n    faceMeshDetection: false,\n    poseDetection: false,\n    poseDetectionAccurate: false,\n    selfieSegmentation: false,\n    subjectSegmentation: false,\n    documentScanner: false,\n    barcodeScanning: true,\n    imageLabeling: false,\n    objectDetection: false,\n    digitalInkRecognition: false,\n  ]\n]\n```\n\n### iOS (Podfile)\n\nIn your `ios/Podfile`, add a configuration hash before `target`:\n\n```ruby\n$VisionCameraMLKit = {\n  'textRecognition' =\u003e true,\n  'textRecognitionChinese' =\u003e false,\n  'textRecognitionDevanagari' =\u003e false,\n  'textRecognitionJapanese' =\u003e false,\n  'textRecognitionKorean' =\u003e false,\n  'faceDetection' =\u003e false,\n  'poseDetection' =\u003e false,\n  'poseDetectionAccurate' =\u003e false,\n  'selfieSegmentation' =\u003e false,\n  'barcodeScanning' =\u003e true,\n  'imageLabeling' =\u003e false,\n  'objectDetection' =\u003e false,\n  'digitalInkRecognition' =\u003e false,\n}\n```\n\nAndroid-only keys: `faceMeshDetection`, `subjectSegmentation`, `documentScanner`.\n\n## Usage\n\n### Text Recognition (Frame Processor)\n\n```ts\nimport {\n  useFrameProcessor,\n  runAsync,\n  runAtTargetFps,\n} from 'react-native-vision-camera';\nimport { useTextRecognition } from 'react-native-vision-camera-mlkit';\n\nconst { textRecognition } = useTextRecognition({\n  language: 'LATIN',\n  scaleFactor: 1,\n  invertColors: false,\n});\n\nconst frameProcessor = useFrameProcessor(\n  (frame) =\u003e {\n    'worklet';\n\n    runAtTargetFps(10, () =\u003e {\n      'worklet';\n      runAsync(frame, () =\u003e {\n        'worklet';\n        const result = textRecognition(frame, {\n          outputOrientation: 'portrait',\n        });\n        console.log(result.text);\n      });\n    });\n  },\n  [textRecognition]\n);\n```\n\n`TextRecognitionOptions`:\n\n- `language?: 'LATIN' | 'CHINESE' | 'DEVANAGARI' | 'JAPANESE' | 'KOREAN'`\n- `scaleFactor?: number` (0.9-1.0)\n- `invertColors?: boolean`\n- `frameProcessInterval?: number` (deprecated, use `runAtTargetFps`)\n\n`TextRecognitionArguments`:\n\n- `outputOrientation?: 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right'` (iOS only)\n\n### Image Processing (Static Images)\n\nUse `processImageTextRecognition` to analyze a file path or URI without the camera (for example, images picked from the gallery).\n\n```ts\nimport { processImageTextRecognition } from 'react-native-vision-camera-mlkit';\n\nconst result = await processImageTextRecognition(imageUri, {\n  language: 'LATIN',\n  orientation: 'portrait',\n  invertColors: false,\n});\n\nconsole.log(result.blocks);\n```\n\n`TextRecognitionImageOptions`:\n\n- `language?: 'LATIN' | 'CHINESE' | 'DEVANAGARI' | 'JAPANESE' | 'KOREAN'`\n- `orientation?: 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right'`\n- `invertColors?: boolean`\n\nThe native bridge normalizes URIs (`file://` is removed on iOS and added on Android if missing). Supported formats: JPEG, PNG, WebP.\n\n### Feature Utilities\n\nThe package also exposes helpers from the plugin factory:\n\n```ts\nimport {\n  getFeatureErrorMessage,\n  isFeatureAvailable,\n  assertFeatureAvailable,\n  getAvailableFeatures,\n} from 'react-native-vision-camera-mlkit';\n```\n\n- `getAvailableFeatures(): MLKitFeature[]`\n- `isFeatureAvailable(feature: MLKitFeature): boolean`\n- `assertFeatureAvailable(feature: MLKitFeature): void`\n- `getFeatureErrorMessage(feature: MLKitFeature): string`\n\n### Error Handling\n\nFrame processors throw a setup error when the feature is not enabled in Gradle/Podfile. For static image processing, the following error strings are exported:\n\n- `IMAGE_NOT_FOUND_ERROR`\n- `INVALID_URI_ERROR`\n- `IMAGE_PROCESSING_FAILED_ERROR`\n- `UNSUPPORTED_IMAGE_FORMAT_ERROR`\n\nUse the feature helpers to provide user-friendly configuration hints:\n\n```ts\nimport {\n  assertFeatureAvailable,\n  MLKIT_FEATURE_KEYS,\n} from 'react-native-vision-camera-mlkit';\n\nassertFeatureAvailable(MLKIT_FEATURE_KEYS.TEXT_RECOGNITION);\n```\n\n## Performance\n\n- Follow the Vision Camera [performance guide](https://react-native-vision-camera.com/docs/guides/performance)\n- Prefer `runAsync(...)` for heavy ML work to keep the frame processor responsive.\n- Use `runAtTargetFps(...)` to throttle processing instead of `frameProcessInterval`.\n\n## iOS Orientation Notes (Text Recognition)\n\niOS camera sensors are fixed in landscape orientation. The frame buffer stays landscape-shaped even when the UI rotates, so ML Kit needs an explicit orientation hint to rotate text correctly. On iOS, pass `outputOrientation` to `textRecognition(frame, { outputOrientation })` so ML Kit can map the buffer to upright text. Android handles rotation automatically.\n\n### ⚠️ iOS Simulator (Apple Silicon) – Heads-up\n\nOn Apple Silicon Macs, building for the **iOS Simulator (arm64)** may fail after installing this package.\n\nThis is a **known limitation of Google ML Kit**, which does not currently ship an `arm64-simulator` slice for some iOS frameworks.\nThe library works correctly on **physical iOS devices** and on the **iOS Simulator when running under Rosetta**.\n\n## Google ML Kit Vision Features Roadmap\n\n| #   | Feature                           | Status                                     | Platform                                          |\n| --- | --------------------------------- | ------------------------------------------ | ------------------------------------------------- |\n| 0   | **Text recognition v2**           | [![complete][complete]][complete]          | [![android][android]][android] [![ios][ios]][ios] |\n| 1   | **Face detection**                | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n| 2   | **Face mesh detection**           | [![in-progress][in-progress]][in-progress] | [![android][android]][android]                    |\n| 3   | **Pose detection**                | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n| 4   | **Selfie segmentation**           | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n| 5   | **Subject segmentation**          | [![in-progress][in-progress]][in-progress] | [![android][android]][android]                    |\n| 6   | **Document scanner**              | [![in-progress][in-progress]][in-progress] | [![android][android]][android]                    |\n| 7   | **Barcode scanning**              | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n| 8   | **Image labeling**                | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n| 9   | **Object detection and tracking** | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n| 10  | **Digital ink recognition**       | [![in-progress][in-progress]][in-progress] | [![android][android]][android] [![ios][ios]][ios] |\n\n## Sponsor on GitHub\n\nIf this project helps you, please consider [sponsoring its development](https://github.com/sponsors/pedrol2b)\n\nreact-native-vision-camera-mlkit is provided as is and maintained in my free time.\n\nIf you’re integrating this library into a production app, consider funding the project.\n\n[complete]: https://img.shields.io/badge/COMPLETE-5E5CE6\n[in-progress]: https://img.shields.io/badge/IN%20PROGRESS-FFD60A\n\n[android]: https://img.shields.io/badge/ANDROID-3DDC84\n[ios]: https://img.shields.io/badge/IOS-0A84FF\n\n[contributors-shield]: https://img.shields.io/github/contributors/pedrol2b/react-native-vision-camera-mlkit.svg?style=for-the-badge\n[contributors-url]: https://github.com/pedrol2b/react-native-vision-camera-mlkit/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/pedrol2b/react-native-vision-camera-mlkit.svg?style=for-the-badge\n[forks-url]: https://github.com/pedrol2b/react-native-vision-camera-mlkit/network/members\n[stars-shield]: https://img.shields.io/github/stars/pedrol2b/react-native-vision-camera-mlkit.svg?style=for-the-badge\n[stars-url]: https://github.com/pedrol2b/react-native-vision-camera-mlkit/stargazers\n[issues-shield]: https://img.shields.io/github/issues/pedrol2b/react-native-vision-camera-mlkit.svg?style=for-the-badge\n[issues-url]: https://github.com/pedrol2b/react-native-vision-camera-mlkit/issues\n[license-shield]: https://img.shields.io/github/license/pedrol2b/react-native-vision-camera-mlkit.svg?style=for-the-badge\n[license-url]: https://github.com/pedrol2b/react-native-vision-camera-mlkit/blob/main/LICENSE\n[npm-version-shield]: https://img.shields.io/npm/v/react-native-vision-camera-mlkit.svg?style=for-the-badge\n[npm-version-url]: https://www.npmjs.com/package/react-native-vision-camera-mlkit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrol2b%2Freact-native-vision-camera-mlkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrol2b%2Freact-native-vision-camera-mlkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrol2b%2Freact-native-vision-camera-mlkit/lists"}