{"id":23081463,"url":"https://github.com/jaroslawkrol/vision-camera-realtime-object-detection","last_synced_at":"2025-08-15T23:31:23.923Z","repository":{"id":68576694,"uuid":"604328352","full_name":"jaroslawkrol/vision-camera-realtime-object-detection","owner":"jaroslawkrol","description":"VisionCamera Frame Processor Plugin to detect objects using TensorFlow Lite Task Vision","archived":false,"fork":false,"pushed_at":"2023-03-02T22:32:08.000Z","size":21792,"stargazers_count":111,"open_issues_count":6,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-29T23:39:57.117Z","etag":null,"topics":["ml","object-detection","react-native","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/jaroslawkrol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2023-02-20T20:34:48.000Z","updated_at":"2025-06-06T10:04:32.000Z","dependencies_parsed_at":"2023-03-11T03:56:56.253Z","dependency_job_id":null,"html_url":"https://github.com/jaroslawkrol/vision-camera-realtime-object-detection","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"7f5bc94edb3cfeb84e771c82e658168592ea6af2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jaroslawkrol/vision-camera-realtime-object-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaroslawkrol%2Fvision-camera-realtime-object-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaroslawkrol%2Fvision-camera-realtime-object-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaroslawkrol%2Fvision-camera-realtime-object-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaroslawkrol%2Fvision-camera-realtime-object-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaroslawkrol","download_url":"https://codeload.github.com/jaroslawkrol/vision-camera-realtime-object-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaroslawkrol%2Fvision-camera-realtime-object-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270644764,"owners_count":24621332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"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":["ml","object-detection","react-native","tensorflow"],"created_at":"2024-12-16T13:52:37.088Z","updated_at":"2025-08-15T23:31:23.332Z","avatar_url":"https://github.com/jaroslawkrol.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"right\"\u003e\n\u003cimg align=\"right\" src=\"https://github.com/jaroslawkrol/vision-camera-realtime-object-detection/blob/chore/demo/vc_rod_demo.gif?raw=true\" height=\"550\"\u003e\n\u003c/div\u003e\n\n\u003ch1\u003eReact Native\u003cbr /\u003eRealtime Object Detection\u003cbr/\u003e\u003c/h1\u003e\n\n:camera: [VisionCamera](https://github.com/mrousavy/react-native-vision-camera) Frame Processor Plugin for object detection using [TensorFlow Lite Task Vision](https://www.tensorflow.org/lite/inference_with_metadata/task_library/object_detector).\n\nWith this library, you can use the benefits of Machine Learning in your React Native app without a single line of native code. [Create your own model](https://www.tensorflow.org/lite/models/modify/model_maker/object_detection) or find and use one commonly available on [TFHub](https://tfhub.dev/). Implement the solution in a few simple steps:\n\n## Minimum requirements​\n\n* `react-native` \u003e= 0.71.3 \n* `react-native-reanimated` \u003e= 2.14.4\n* `react-native-vision-camera` \u003e= 2.15.4\n\nYou can find the model structure requirements [here](https://www.tensorflow.org/lite/examples/object_detection/overview#model_description)\n\n## Installation\n\nInstall the required packages in your React Native project:\n\n```shell script\nnpm install --save vision-camera-realtime-object-detection  \n# or yarn \nyarn add vision-camera-realtime-object-detection\n```\n\nIf you're on a Mac and developing for iOS, you need to install the pods (via Cocoapods) to complete the linking.\n```shell script\nnpx pod-install\n```\n\nAdd this to your `babel.config.js`\n```\n[\n  'react-native-reanimated/plugin',\n  {\n    globals: ['__detectObjects'],\n  },\n]\n```\n---\n:bangbang: Make sure you correctly setup `react-native-reanimated` and insert as a first line of your `index.tsx`\n\n```js\nimport 'react-native-reanimated'\n```\n\n## Usage\n### Step 1\n\nTo add your custom TensorFlow Lite model to your app, copy your `*.tflite` file to your `asset/model` directory\n\n    ...\n    |-- assets\n        |-- images\n        |-- fonts\n        |-- model\n            |-- your_custom_model.tflite\n    |-- src\n        |-- App.tsx\n    ...\n### Step 2\n\nAdd to your `react-native.config.js`\n```js\n...\n \"assets\": [\n    \"./assets/model/\",\n  ]\n```\nand run command: \n```shell script\nnpx react-native-asset\n```\n\n### Step 3\n:tada: Use Realtime Object Deteciton in your own component!\n```js\nimport { DetectedObject, detectObjects, FrameProcessorConfig } from 'vision-camera-realtime-object-detection';\n\n// ...\n\nconst frameProcessorConfig: FrameProcessorConfig = {\n    modelFile: 'your_custom_model.tflite', // \u003c!-- name and extension of your model\n    scoreThreshold: 0.5,\n};\n\nconst frameProcessor = useFrameProcessor((frame) =\u003e {\n  'worklet';\n\n  const detectedObjects: DetectedObject[] = detectObjects(frame, frameProcessorConfig);\n}, []);\n\nreturn (\n  \u003cCamera\n    device={device}\n    isActive={true}\n    frameProcessorFps={5}\n    frameProcessor={frameProcessor}\n  /\u003e);\n```\n\n## Types\n\n### FrameProcessorConfig\n\nUse the configuration interface to customize the library on your own. In it you can find the following properties:\n\n| Prop | Type | Mandatory | Default | Note |\n|:---|:---:|:---:|:---:|:---|\n| `modelFile` | `string` | ✔ | -  | The name and extension of your custom TensorFlow Lite model (f.e. `model.tflite`) \n| `scoreThreshold` | `number` | - | 0.3  | (between 0 and 1) Cut-off threshold below which you will discard detection result\n| `maxResults` | `number` | - | 1 | Maximum number of top-scored detection results to return. \n| `numThreads` | `number` | - | 1 | the number of threads to be used for TFLite ops that support multi-threading when running inference with CPU. \n\n---\n\n### DetectedObject\n\n`detectObjects` method returns a list of detected objects in the lens in the following form\n\n| Prop | Type | Note |\n|:---|:---:|:---|\n| `labels` | `ObjectLabel[]` | An array of labels to match the detected object\n| `top` | `number` | (percentage: between 0 and 1) absolute position of the detected object's top edge relative to the frame \n| `left` | `number` | (percentage: between 0 and 1) absolute position of the detected object's left edge relative to the frame \n| `width` | `number` | (percentage: between 0 and 1) width of the detected object relative to the frame \n| `height` | `number` | (percentage: between 0 and 1) height of the detected object's top edge relative to the frame \n\n### ObjectLabel\n\n| Prop | Type | Note |\n|:---|:---:|:---|\n| `label` | `string` | label matching the detected object\n| `confidence` | `number` | a number between 0 and 1 that indicates confidence that the object of above type was genuinely detected\n\n## Before the release of version 1.0.0 \n\nList of tasks to be implemented: \n\n- [ ] Adjusting to **VisionCamera V3** (the future version intends to rewrite frame processors and introduces exciting new features, like: drawing on frame in a Frame Processor using RN Skia)\n- [ ] CPU and NNAPI delegates for Android\n- [ ] GPU and Core ML delegates for IOS\n- [ ] Clean up native code\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaroslawkrol%2Fvision-camera-realtime-object-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaroslawkrol%2Fvision-camera-realtime-object-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaroslawkrol%2Fvision-camera-realtime-object-detection/lists"}