├── .editorconfig
├── .gitattributes
├── .github
├── actions
│ └── setup
│ │ └── action.yml
└── workflows
│ └── ci.yml
├── .gitignore
├── .nvmrc
├── .watchmanconfig
├── .yarnrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── Retrain_EfficientDet_for_the_React_Native_with_TensorFlow_Lite_Model_Maker.ipynb
├── android
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── visioncamerarealtimeobjectdetection
│ ├── RealtimeObjectDetectionProcessorPluginPackage.kt
│ └── realtimeobjectdetectionprocessor
│ └── RealtimeObjectDetectionProcessorPlugin.kt
├── babel.config.js
├── example
├── .bundle
│ └── config
├── .node-version
├── .ruby-version
├── .watchmanconfig
├── Gemfile
├── android
│ ├── app
│ │ ├── build.gradle
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── visioncamerarealtimeobjectdetectionexample
│ │ │ │ └── ReactNativeFlipper.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── visioncamerarealtimeobjectdetectionexample
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── rn_edit_text_material.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── release
│ │ │ └── java
│ │ │ └── com
│ │ │ └── visioncamerarealtimeobjectdetectionexample
│ │ │ └── ReactNativeFlipper.java
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
│ ├── .xcode.env
│ ├── File.swift
│ ├── Podfile
│ ├── Podfile.lock
│ ├── VisionCameraRealtimeObjectDetectionExample-Bridging-Header.h
│ ├── VisionCameraRealtimeObjectDetectionExample.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── VisionCameraRealtimeObjectDetectionExample.xcscheme
│ ├── VisionCameraRealtimeObjectDetectionExample.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── VisionCameraRealtimeObjectDetectionExample
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.mm
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── main.m
│ └── VisionCameraRealtimeObjectDetectionExampleTests
│ │ ├── Info.plist
│ │ └── VisionCameraRealtimeObjectDetectionExampleTests.m
├── metro.config.js
├── package-lock.json
├── package.json
├── react-native.config.js
└── src
│ ├── App.tsx
│ ├── components
│ ├── LoadingView
│ │ └── index.tsx
│ ├── ObjectDetector
│ │ └── index.tsx
│ └── PermissionDenied
│ │ └── index.tsx
│ └── hooks
│ └── useCameraPermission.tsx
├── ios
├── RealtimeObjectDetectionProcessor
│ └── RealtimeObjectDetectionProcessor.m
└── VisionCameraRealtimeObjectDetection.xcodeproj
│ └── project.pbxproj
├── lefthook.yml
├── package-lock.json
├── package.json
├── scripts
└── bootstrap.js
├── src
├── __tests__
│ └── index.test.tsx
└── index.tsx
├── tsconfig.build.json
├── tsconfig.json
├── vc_rod_demo.gif
└── vision-camera-realtime-object-detection.podspec
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 |
9 | indent_style = space
10 | indent_size = 2
11 |
12 | end_of_line = lf
13 | charset = utf-8
14 | trim_trailing_whitespace = true
15 | insert_final_newline = true
16 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 | # specific for windows script files
3 | *.bat text eol=crlf
--------------------------------------------------------------------------------
/.github/actions/setup/action.yml:
--------------------------------------------------------------------------------
1 | name: Setup
2 | description: Setup Node.js and install dependencies
3 |
4 | runs:
5 | using: composite
6 | steps:
7 | - name: Setup Node.js
8 | uses: actions/setup-node@v3
9 | with:
10 | node-version-file: .nvmrc
11 |
12 | - name: Cache dependencies
13 | id: yarn-cache
14 | uses: actions/cache@v3
15 | with:
16 | path: |
17 | **/node_modules
18 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
19 | restore-keys: |
20 | ${{ runner.os }}-yarn-
21 |
22 | - name: Install dependencies
23 | if: steps.yarn-cache.outputs.cache-hit != 'true'
24 | run: |
25 | yarn install --cwd example --frozen-lockfile
26 | yarn install --frozen-lockfile
27 | shell: bash
28 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on:
3 | push:
4 | branches:
5 | - main
6 | pull_request:
7 | branches:
8 | - main
9 |
10 | jobs:
11 | lint:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout
15 | uses: actions/checkout@v3
16 |
17 | - name: Setup
18 | uses: ./.github/actions/setup
19 |
20 | - name: Lint files
21 | run: yarn lint
22 |
23 | - name: Typecheck files
24 | run: yarn typecheck
25 |
26 | test:
27 | runs-on: ubuntu-latest
28 | steps:
29 | - name: Checkout
30 | uses: actions/checkout@v3
31 |
32 | - name: Setup
33 | uses: ./.github/actions/setup
34 |
35 | - name: Run unit tests
36 | run: yarn test --maxWorkers=2 --coverage
37 |
38 | build:
39 | runs-on: ubuntu-latest
40 | steps:
41 | - name: Checkout
42 | uses: actions/checkout@v3
43 |
44 | - name: Setup
45 | uses: ./.github/actions/setup
46 |
47 | - name: Build package
48 | run: yarn prepack
49 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # XDE
6 | .expo/
7 |
8 | # VSCode
9 | .vscode/
10 | jsconfig.json
11 |
12 | # Xcode
13 | #
14 | build/
15 | *.pbxuser
16 | !default.pbxuser
17 | *.mode1v3
18 | !default.mode1v3
19 | *.mode2v3
20 | !default.mode2v3
21 | *.perspectivev3
22 | !default.perspectivev3
23 | xcuserdata
24 | *.xccheckout
25 | *.moved-aside
26 | DerivedData
27 | *.hmap
28 | *.ipa
29 | *.xcuserstate
30 | project.xcworkspace
31 |
32 | # Android/IJ
33 | #
34 | .classpath
35 | .cxx
36 | .gradle
37 | .idea
38 | .project
39 | .settings
40 | local.properties
41 | android.iml
42 |
43 | # Cocoapods
44 | #
45 | example/ios/Pods
46 |
47 | # Ruby
48 | example/vendor/
49 |
50 | # node.js
51 | #
52 | node_modules/
53 | npm-debug.log
54 | yarn-debug.log
55 | yarn-error.log
56 |
57 | # BUCK
58 | buck-out/
59 | \.buckd/
60 | android/app/libs
61 | android/keystores/debug.keystore
62 |
63 | # Expo
64 | .expo/
65 |
66 | # Turborepo
67 | .turbo/
68 |
69 | # generated by bob
70 | lib/
71 |
72 | # custom TensorFlow model asset
73 | example/assets/model/*
74 | example/android/app/src/main/assets/custom/*
75 |
76 | example/android/link-assets-manifest.json
77 | example/ios/link-assets-manifest.json
78 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 16.18.1
2 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.yarnrc:
--------------------------------------------------------------------------------
1 | # Override Yarn command so we can automatically setup the repo on running `yarn`
2 |
3 | yarn-path "scripts/bootstrap.js"
4 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 |
2 | # Contributor Covenant Code of Conduct
3 |
4 | ## Our Pledge
5 |
6 | We as members, contributors, and leaders pledge to make participation in our
7 | community a harassment-free experience for everyone, regardless of age, body
8 | size, visible or invisible disability, ethnicity, sex characteristics, gender
9 | identity and expression, level of experience, education, socio-economic status,
10 | nationality, personal appearance, race, caste, color, religion, or sexual
11 | identity and orientation.
12 |
13 | We pledge to act and interact in ways that contribute to an open, welcoming,
14 | diverse, inclusive, and healthy community.
15 |
16 | ## Our Standards
17 |
18 | Examples of behavior that contributes to a positive environment for our
19 | community include:
20 |
21 | * Demonstrating empathy and kindness toward other people
22 | * Being respectful of differing opinions, viewpoints, and experiences
23 | * Giving and gracefully accepting constructive feedback
24 | * Accepting responsibility and apologizing to those affected by our mistakes,
25 | and learning from the experience
26 | * Focusing on what is best not just for us as individuals, but for the overall
27 | community
28 |
29 | Examples of unacceptable behavior include:
30 |
31 | * The use of sexualized language or imagery, and sexual attention or advances of
32 | any kind
33 | * Trolling, insulting or derogatory comments, and personal or political attacks
34 | * Public or private harassment
35 | * Publishing others' private information, such as a physical or email address,
36 | without their explicit permission
37 | * Other conduct which could reasonably be considered inappropriate in a
38 | professional setting
39 |
40 | ## Enforcement Responsibilities
41 |
42 | Community leaders are responsible for clarifying and enforcing our standards of
43 | acceptable behavior and will take appropriate and fair corrective action in
44 | response to any behavior that they deem inappropriate, threatening, offensive,
45 | or harmful.
46 |
47 | Community leaders have the right and responsibility to remove, edit, or reject
48 | comments, commits, code, wiki edits, issues, and other contributions that are
49 | not aligned to this Code of Conduct, and will communicate reasons for moderation
50 | decisions when appropriate.
51 |
52 | ## Scope
53 |
54 | This Code of Conduct applies within all community spaces, and also applies when
55 | an individual is officially representing the community in public spaces.
56 | Examples of representing our community include using an official e-mail address,
57 | posting via an official social media account, or acting as an appointed
58 | representative at an online or offline event.
59 |
60 | ## Enforcement
61 |
62 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
63 | reported to the community leaders responsible for enforcement at
64 | [INSERT CONTACT METHOD].
65 | All complaints will be reviewed and investigated promptly and fairly.
66 |
67 | All community leaders are obligated to respect the privacy and security of the
68 | reporter of any incident.
69 |
70 | ## Enforcement Guidelines
71 |
72 | Community leaders will follow these Community Impact Guidelines in determining
73 | the consequences for any action they deem in violation of this Code of Conduct:
74 |
75 | ### 1. Correction
76 |
77 | **Community Impact**: Use of inappropriate language or other behavior deemed
78 | unprofessional or unwelcome in the community.
79 |
80 | **Consequence**: A private, written warning from community leaders, providing
81 | clarity around the nature of the violation and an explanation of why the
82 | behavior was inappropriate. A public apology may be requested.
83 |
84 | ### 2. Warning
85 |
86 | **Community Impact**: A violation through a single incident or series of
87 | actions.
88 |
89 | **Consequence**: A warning with consequences for continued behavior. No
90 | interaction with the people involved, including unsolicited interaction with
91 | those enforcing the Code of Conduct, for a specified period of time. This
92 | includes avoiding interactions in community spaces as well as external channels
93 | like social media. Violating these terms may lead to a temporary or permanent
94 | ban.
95 |
96 | ### 3. Temporary Ban
97 |
98 | **Community Impact**: A serious violation of community standards, including
99 | sustained inappropriate behavior.
100 |
101 | **Consequence**: A temporary ban from any sort of interaction or public
102 | communication with the community for a specified period of time. No public or
103 | private interaction with the people involved, including unsolicited interaction
104 | with those enforcing the Code of Conduct, is allowed during this period.
105 | Violating these terms may lead to a permanent ban.
106 |
107 | ### 4. Permanent Ban
108 |
109 | **Community Impact**: Demonstrating a pattern of violation of community
110 | standards, including sustained inappropriate behavior, harassment of an
111 | individual, or aggression toward or disparagement of classes of individuals.
112 |
113 | **Consequence**: A permanent ban from any sort of public interaction within the
114 | community.
115 |
116 | ## Attribution
117 |
118 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119 | version 2.1, available at
120 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121 |
122 | Community Impact Guidelines were inspired by
123 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124 |
125 | For answers to common questions about this code of conduct, see the FAQ at
126 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127 | [https://www.contributor-covenant.org/translations][translations].
128 |
129 | [homepage]: https://www.contributor-covenant.org
130 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131 | [Mozilla CoC]: https://github.com/mozilla/diversity
132 | [FAQ]: https://www.contributor-covenant.org/faq
133 | [translations]: https://www.contributor-covenant.org/translations
134 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Contributions are always welcome, no matter how large or small!
4 |
5 | We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md).
6 |
7 | ## Development workflow
8 |
9 | To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
10 |
11 | ```sh
12 | yarn
13 | ```
14 |
15 | > While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
16 |
17 | While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
18 |
19 | To start the packager:
20 |
21 | ```sh
22 | yarn example start
23 | ```
24 |
25 | To run the example app on Android:
26 |
27 | ```sh
28 | yarn example android
29 | ```
30 |
31 | To run the example app on iOS:
32 |
33 | ```sh
34 | yarn example ios
35 | ```
36 |
37 | Make sure your code passes TypeScript and ESLint. Run the following to verify:
38 |
39 | ```sh
40 | yarn typecheck
41 | yarn lint
42 | ```
43 |
44 | To fix formatting errors, run the following:
45 |
46 | ```sh
47 | yarn lint --fix
48 | ```
49 |
50 | Remember to add tests for your change if possible. Run the unit tests by:
51 |
52 | ```sh
53 | yarn test
54 | ```
55 |
56 | To edit the Objective-C or Swift files, open `example/ios/VisionCameraRealtimeObjectDetectionExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > vision-camera-realtime-object-detection`.
57 |
58 | To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `vision-camera-realtime-object-detection` under `Android`.
59 |
60 |
61 | ### Commit message convention
62 |
63 | We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
64 |
65 | - `fix`: bug fixes, e.g. fix crash due to deprecated method.
66 | - `feat`: new features, e.g. add new method to the module.
67 | - `refactor`: code refactor, e.g. migrate from class components to hooks.
68 | - `docs`: changes into documentation, e.g. add usage example for the module..
69 | - `test`: adding or updating tests, e.g. add integration tests using detox.
70 | - `chore`: tooling changes, e.g. change CI config.
71 |
72 | Our pre-commit hooks verify that your commit message matches this format when committing.
73 |
74 | ### Linting and tests
75 |
76 | [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)
77 |
78 | We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
79 |
80 | Our pre-commit hooks verify that the linter and tests pass when committing.
81 |
82 | ### Publishing to npm
83 |
84 | We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc.
85 |
86 | To publish new versions, run the following:
87 |
88 | ```sh
89 | yarn release
90 | ```
91 |
92 | ### Scripts
93 |
94 | The `package.json` file contains various scripts for common tasks:
95 |
96 | - `yarn bootstrap`: setup project by installing all dependencies and pods.
97 | - `yarn typecheck`: type-check files with TypeScript.
98 | - `yarn lint`: lint files with ESLint.
99 | - `yarn test`: run unit tests with Jest.
100 | - `yarn example start`: start the Metro server for the example app.
101 | - `yarn example android`: run the example app on Android.
102 | - `yarn example ios`: run the example app on iOS.
103 |
104 | ### Sending a pull request
105 |
106 | > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
107 |
108 | When you're sending a pull request:
109 |
110 | - Prefer small pull requests focused on one change.
111 | - Verify that linters and tests are passing.
112 | - Review the documentation to make sure it looks good.
113 | - Follow the pull request template when opening a pull request.
114 | - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
115 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Jaroslaw Krol
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | React Native Realtime Object Detection
6 |
7 | :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).
8 |
9 | With 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:
10 |
11 | ## Minimum requirements
12 |
13 | * `react-native` >= 0.71.3
14 | * `react-native-reanimated` >= 2.14.4
15 | * `react-native-vision-camera` >= 2.15.4
16 |
17 | You can find the model structure requirements [here](https://www.tensorflow.org/lite/examples/object_detection/overview#model_description)
18 |
19 | ## Installation
20 |
21 | Install the required packages in your React Native project:
22 |
23 | ```shell script
24 | npm install --save vision-camera-realtime-object-detection
25 | # or yarn
26 | yarn add vision-camera-realtime-object-detection
27 | ```
28 |
29 | If you're on a Mac and developing for iOS, you need to install the pods (via Cocoapods) to complete the linking.
30 | ```shell script
31 | npx pod-install
32 | ```
33 |
34 | Add this to your `babel.config.js`
35 | ```
36 | [
37 | 'react-native-reanimated/plugin',
38 | {
39 | globals: ['__detectObjects'],
40 | },
41 | ]
42 | ```
43 | ---
44 | :bangbang: Make sure you correctly setup `react-native-reanimated` and insert as a first line of your `index.tsx`
45 |
46 | ```js
47 | import 'react-native-reanimated'
48 | ```
49 |
50 | ## Usage
51 | ### Step 1
52 |
53 | To add your custom TensorFlow Lite model to your app, copy your `*.tflite` file to your `asset/model` directory
54 |
55 | ...
56 | |-- assets
57 | |-- images
58 | |-- fonts
59 | |-- model
60 | |-- your_custom_model.tflite
61 | |-- src
62 | |-- App.tsx
63 | ...
64 | ### Step 2
65 |
66 | Add to your `react-native.config.js`
67 | ```js
68 | ...
69 | "assets": [
70 | "./assets/model/",
71 | ]
72 | ```
73 | and run command:
74 | ```shell script
75 | npx react-native-asset
76 | ```
77 |
78 | ### Step 3
79 | :tada: Use Realtime Object Deteciton in your own component!
80 | ```js
81 | import { DetectedObject, detectObjects, FrameProcessorConfig } from 'vision-camera-realtime-object-detection';
82 |
83 | // ...
84 |
85 | const frameProcessorConfig: FrameProcessorConfig = {
86 | modelFile: 'your_custom_model.tflite', //
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | VisionCameraRealtimeObjectDetectionExample
3 |
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/release/java/com/visioncamerarealtimeobjectdetectionexample/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.visioncamerarealtimeobjectdetectionexample;
8 |
9 | import android.content.Context;
10 | import com.facebook.react.ReactInstanceManager;
11 |
12 | /**
13 | * Class responsible of loading Flipper inside your React Native application. This is the release
14 | * flavor of it so it's empty as we don't want to load Flipper.
15 | */
16 | public class ReactNativeFlipper {
17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
18 | // Do nothing as we don't want to initialize Flipper on Release.
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "33.0.0"
6 | minSdkVersion = 21
7 | compileSdkVersion = 33
8 | targetSdkVersion = 33
9 | kotlinVersion = "1.6.20"
10 |
11 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
12 | ndkVersion = "23.1.7779620"
13 | }
14 | repositories {
15 | google()
16 | mavenCentral()
17 | }
18 | dependencies {
19 | classpath("com.android.tools.build:gradle:7.3.1")
20 | classpath("com.facebook.react:react-native-gradle-plugin")
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.125.0
29 |
30 | # Use this property to specify which architecture you want to build.
31 | # You can also override it from the CLI using
32 | # ./gradlew -PreactNativeArchitectures=x86_64
33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34 |
35 | # Use this property to enable support to the new architecture.
36 | # This will allow you to use TurboModules and the Fabric render in
37 | # your application. You should enable this flag either if you want
38 | # to write custom TurboModules/Fabric components OR use libraries that
39 | # are providing them.
40 | newArchEnabled=false
41 |
42 | # Use this property to enable or disable the Hermes JS engine.
43 | # If set to false, you will be using JSC instead.
44 | hermesEnabled=true
45 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84 |
85 | APP_NAME="Gradle"
86 | APP_BASE_NAME=${0##*/}
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | MAX_FD=$( ulimit -H -n ) ||
147 | warn "Could not query maximum file descriptor limit"
148 | esac
149 | case $MAX_FD in #(
150 | '' | soft) :;; #(
151 | *)
152 | ulimit -n "$MAX_FD" ||
153 | warn "Could not set maximum file descriptor limit to $MAX_FD"
154 | esac
155 | fi
156 |
157 | # Collect all arguments for the java command, stacking in reverse order:
158 | # * args from the command line
159 | # * the main class name
160 | # * -classpath
161 | # * -D...appname settings
162 | # * --module-path (only if needed)
163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164 |
165 | # For Cygwin or MSYS, switch paths to Windows format before running java
166 | if "$cygwin" || "$msys" ; then
167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169 |
170 | JAVACMD=$( cygpath --unix "$JAVACMD" )
171 |
172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
173 | for arg do
174 | if
175 | case $arg in #(
176 | -*) false ;; # don't mess with options #(
177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178 | [ -e "$t" ] ;; #(
179 | *) false ;;
180 | esac
181 | then
182 | arg=$( cygpath --path --ignore --mixed "$arg" )
183 | fi
184 | # Roll the args list around exactly as many times as the number of
185 | # args, so each arg winds up back in the position where it started, but
186 | # possibly modified.
187 | #
188 | # NB: a `for` loop captures its iteration list before it begins, so
189 | # changing the positional parameters here affects neither the number of
190 | # iterations, nor the values presented in `arg`.
191 | shift # remove old arg
192 | set -- "$@" "$arg" # push replacement arg
193 | done
194 | fi
195 |
196 | # Collect all arguments for the java command;
197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198 | # shell script including quotes and variable substitutions, so put them in
199 | # double quotes to make sure that they get re-expanded; and
200 | # * put everything else in single quotes, so that it's not re-expanded.
201 |
202 | set -- \
203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
204 | -classpath "$CLASSPATH" \
205 | org.gradle.wrapper.GradleWrapperMain \
206 | "$@"
207 |
208 | # Use "xargs" to parse quoted args.
209 | #
210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211 | #
212 | # In Bash we could simply go:
213 | #
214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215 | # set -- "${ARGS[@]}" "$@"
216 | #
217 | # but POSIX shell has neither arrays nor command substitution, so instead we
218 | # post-process each arg (as a line of input to sed) to backslash-escape any
219 | # character that might be a shell metacharacter, then use eval to reverse
220 | # that process (while maintaining the separation between arguments), and wrap
221 | # the whole thing up as a single "set" statement.
222 | #
223 | # This will of course break if any of these variables contains a newline or
224 | # an unmatched quote.
225 | #
226 |
227 | eval "set -- $(
228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229 | xargs -n1 |
230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231 | tr '\n' ' '
232 | )" '"$@"'
233 |
234 | exec "$JAVACMD" "$@"
235 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'VisionCameraRealtimeObjectDetectionExample'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/react-native-gradle-plugin')
5 |
--------------------------------------------------------------------------------
/example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "VisionCameraRealtimeObjectDetectionExample",
3 | "displayName": "VisionCameraRealtimeObjectDetectionExample"
4 | }
--------------------------------------------------------------------------------
/example/babel.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const pak = require('../package.json');
3 |
4 | module.exports = {
5 | presets: ['module:metro-react-native-babel-preset'],
6 | plugins: [
7 | [
8 | 'module-resolver',
9 | {
10 | extensions: ['.tsx', '.ts', '.js', '.json'],
11 | alias: {
12 | [pak.name]: path.join(__dirname, '..', pak.source),
13 | },
14 | },
15 | ],
16 | [
17 | 'react-native-reanimated/plugin',
18 | {
19 | globals: ['__detectObjects'],
20 | },
21 | ],
22 | ],
23 | };
24 |
--------------------------------------------------------------------------------
/example/index.js:
--------------------------------------------------------------------------------
1 | import 'react-native-reanimated';
2 | import { AppRegistry } from 'react-native';
3 | import App from './src/App';
4 | import { name as appName } from './app.json';
5 |
6 | AppRegistry.registerComponent(appName, () => App);
7 |
--------------------------------------------------------------------------------
/example/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/example/ios/File.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // VisionCameraRealtimeObjectDetectionExample
4 | //
5 |
6 | import Foundation
7 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, min_ios_version_supported
5 | prepare_react_native_project!
6 |
7 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
8 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
9 | #
10 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
11 | # ```js
12 | # module.exports = {
13 | # dependencies: {
14 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
15 | # ```
16 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
17 |
18 | linkage = ENV['USE_FRAMEWORKS']
19 | if linkage != nil
20 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
21 | use_frameworks! :linkage => linkage.to_sym
22 | end
23 |
24 | # Convert all permission pods into static libraries
25 | #pre_install do |installer|
26 | # Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
27 | #
28 | # installer.pod_targets.each do |pod|
29 | # if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
30 | # def pod.build_type;
31 | # # Uncomment the line corresponding to your CocoaPods version
32 | # Pod::BuildType.static_library # >= 1.9
33 | # # Pod::Target::BuildType.static_library # < 1.9
34 | # end
35 | # end
36 | # end
37 | #end
38 |
39 | target 'VisionCameraRealtimeObjectDetectionExample' do
40 | config = use_native_modules!
41 |
42 | # Flags change depending on the env values.
43 | flags = get_default_flags()
44 |
45 | use_react_native!(
46 | :path => config[:reactNativePath],
47 | # Hermes is now enabled by default. Disable by setting this flag to false.
48 | # Upcoming versions of React Native may rely on get_default_flags(), but
49 | # we make it explicit here to aid in the React Native upgrade process.
50 | :hermes_enabled => flags[:hermes_enabled],
51 | :fabric_enabled => flags[:fabric_enabled],
52 | # Enables Flipper.
53 | #
54 | # Note that if you have use_frameworks! enabled, Flipper will not work and
55 | # you should disable the next line.
56 | :flipper_configuration => flipper_config,
57 | # An absolute path to your application root.
58 | :app_path => "#{Pod::Config.instance.installation_root}/.."
59 | )
60 |
61 | # Pods for testing
62 | permissions_path = '../node_modules/react-native-permissions/ios'
63 | pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
64 |
65 | target 'VisionCameraRealtimeObjectDetectionExampleTests' do
66 | inherit! :complete
67 | end
68 |
69 | post_install do |installer|
70 | react_native_post_install(
71 | installer,
72 | # Set `mac_catalyst_enabled` to `true` in order to apply patches
73 | # necessary for Mac Catalyst builds
74 | :mac_catalyst_enabled => false
75 | )
76 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
77 | end
78 | end
79 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost (1.76.0)
3 | - CocoaAsyncSocket (7.6.5)
4 | - DoubleConversion (1.1.6)
5 | - FBLazyVector (0.71.3)
6 | - FBReactNativeSpec (0.71.3):
7 | - RCT-Folly (= 2021.07.22.00)
8 | - RCTRequired (= 0.71.3)
9 | - RCTTypeSafety (= 0.71.3)
10 | - React-Core (= 0.71.3)
11 | - React-jsi (= 0.71.3)
12 | - ReactCommon/turbomodule/core (= 0.71.3)
13 | - Flipper (0.125.0):
14 | - Flipper-Folly (~> 2.6)
15 | - Flipper-RSocket (~> 1.4)
16 | - Flipper-Boost-iOSX (1.76.0.1.11)
17 | - Flipper-DoubleConversion (3.2.0.1)
18 | - Flipper-Fmt (7.1.7)
19 | - Flipper-Folly (2.6.10):
20 | - Flipper-Boost-iOSX
21 | - Flipper-DoubleConversion
22 | - Flipper-Fmt (= 7.1.7)
23 | - Flipper-Glog
24 | - libevent (~> 2.1.12)
25 | - OpenSSL-Universal (= 1.1.1100)
26 | - Flipper-Glog (0.5.0.5)
27 | - Flipper-PeerTalk (0.0.4)
28 | - Flipper-RSocket (1.4.3):
29 | - Flipper-Folly (~> 2.6)
30 | - FlipperKit (0.125.0):
31 | - FlipperKit/Core (= 0.125.0)
32 | - FlipperKit/Core (0.125.0):
33 | - Flipper (~> 0.125.0)
34 | - FlipperKit/CppBridge
35 | - FlipperKit/FBCxxFollyDynamicConvert
36 | - FlipperKit/FBDefines
37 | - FlipperKit/FKPortForwarding
38 | - SocketRocket (~> 0.6.0)
39 | - FlipperKit/CppBridge (0.125.0):
40 | - Flipper (~> 0.125.0)
41 | - FlipperKit/FBCxxFollyDynamicConvert (0.125.0):
42 | - Flipper-Folly (~> 2.6)
43 | - FlipperKit/FBDefines (0.125.0)
44 | - FlipperKit/FKPortForwarding (0.125.0):
45 | - CocoaAsyncSocket (~> 7.6)
46 | - Flipper-PeerTalk (~> 0.0.4)
47 | - FlipperKit/FlipperKitHighlightOverlay (0.125.0)
48 | - FlipperKit/FlipperKitLayoutHelpers (0.125.0):
49 | - FlipperKit/Core
50 | - FlipperKit/FlipperKitHighlightOverlay
51 | - FlipperKit/FlipperKitLayoutTextSearchable
52 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0):
53 | - FlipperKit/Core
54 | - FlipperKit/FlipperKitHighlightOverlay
55 | - FlipperKit/FlipperKitLayoutHelpers
56 | - YogaKit (~> 1.18)
57 | - FlipperKit/FlipperKitLayoutPlugin (0.125.0):
58 | - FlipperKit/Core
59 | - FlipperKit/FlipperKitHighlightOverlay
60 | - FlipperKit/FlipperKitLayoutHelpers
61 | - FlipperKit/FlipperKitLayoutIOSDescriptors
62 | - FlipperKit/FlipperKitLayoutTextSearchable
63 | - YogaKit (~> 1.18)
64 | - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0)
65 | - FlipperKit/FlipperKitNetworkPlugin (0.125.0):
66 | - FlipperKit/Core
67 | - FlipperKit/FlipperKitReactPlugin (0.125.0):
68 | - FlipperKit/Core
69 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0):
70 | - FlipperKit/Core
71 | - FlipperKit/SKIOSNetworkPlugin (0.125.0):
72 | - FlipperKit/Core
73 | - FlipperKit/FlipperKitNetworkPlugin
74 | - fmt (6.2.1)
75 | - glog (0.3.5)
76 | - hermes-engine (0.71.3):
77 | - hermes-engine/Pre-built (= 0.71.3)
78 | - hermes-engine/Pre-built (0.71.3)
79 | - libevent (2.1.12)
80 | - OpenSSL-Universal (1.1.1100)
81 | - Permission-Camera (3.6.1):
82 | - RNPermissions
83 | - RCT-Folly (2021.07.22.00):
84 | - boost
85 | - DoubleConversion
86 | - fmt (~> 6.2.1)
87 | - glog
88 | - RCT-Folly/Default (= 2021.07.22.00)
89 | - RCT-Folly/Default (2021.07.22.00):
90 | - boost
91 | - DoubleConversion
92 | - fmt (~> 6.2.1)
93 | - glog
94 | - RCT-Folly/Futures (2021.07.22.00):
95 | - boost
96 | - DoubleConversion
97 | - fmt (~> 6.2.1)
98 | - glog
99 | - libevent
100 | - RCTRequired (0.71.3)
101 | - RCTTypeSafety (0.71.3):
102 | - FBLazyVector (= 0.71.3)
103 | - RCTRequired (= 0.71.3)
104 | - React-Core (= 0.71.3)
105 | - React (0.71.3):
106 | - React-Core (= 0.71.3)
107 | - React-Core/DevSupport (= 0.71.3)
108 | - React-Core/RCTWebSocket (= 0.71.3)
109 | - React-RCTActionSheet (= 0.71.3)
110 | - React-RCTAnimation (= 0.71.3)
111 | - React-RCTBlob (= 0.71.3)
112 | - React-RCTImage (= 0.71.3)
113 | - React-RCTLinking (= 0.71.3)
114 | - React-RCTNetwork (= 0.71.3)
115 | - React-RCTSettings (= 0.71.3)
116 | - React-RCTText (= 0.71.3)
117 | - React-RCTVibration (= 0.71.3)
118 | - React-callinvoker (0.71.3)
119 | - React-Codegen (0.71.3):
120 | - FBReactNativeSpec
121 | - hermes-engine
122 | - RCT-Folly
123 | - RCTRequired
124 | - RCTTypeSafety
125 | - React-Core
126 | - React-jsi
127 | - React-jsiexecutor
128 | - ReactCommon/turbomodule/bridging
129 | - ReactCommon/turbomodule/core
130 | - React-Core (0.71.3):
131 | - glog
132 | - hermes-engine
133 | - RCT-Folly (= 2021.07.22.00)
134 | - React-Core/Default (= 0.71.3)
135 | - React-cxxreact (= 0.71.3)
136 | - React-hermes
137 | - React-jsi (= 0.71.3)
138 | - React-jsiexecutor (= 0.71.3)
139 | - React-perflogger (= 0.71.3)
140 | - Yoga
141 | - React-Core/CoreModulesHeaders (0.71.3):
142 | - glog
143 | - hermes-engine
144 | - RCT-Folly (= 2021.07.22.00)
145 | - React-Core/Default
146 | - React-cxxreact (= 0.71.3)
147 | - React-hermes
148 | - React-jsi (= 0.71.3)
149 | - React-jsiexecutor (= 0.71.3)
150 | - React-perflogger (= 0.71.3)
151 | - Yoga
152 | - React-Core/Default (0.71.3):
153 | - glog
154 | - hermes-engine
155 | - RCT-Folly (= 2021.07.22.00)
156 | - React-cxxreact (= 0.71.3)
157 | - React-hermes
158 | - React-jsi (= 0.71.3)
159 | - React-jsiexecutor (= 0.71.3)
160 | - React-perflogger (= 0.71.3)
161 | - Yoga
162 | - React-Core/DevSupport (0.71.3):
163 | - glog
164 | - hermes-engine
165 | - RCT-Folly (= 2021.07.22.00)
166 | - React-Core/Default (= 0.71.3)
167 | - React-Core/RCTWebSocket (= 0.71.3)
168 | - React-cxxreact (= 0.71.3)
169 | - React-hermes
170 | - React-jsi (= 0.71.3)
171 | - React-jsiexecutor (= 0.71.3)
172 | - React-jsinspector (= 0.71.3)
173 | - React-perflogger (= 0.71.3)
174 | - Yoga
175 | - React-Core/RCTActionSheetHeaders (0.71.3):
176 | - glog
177 | - hermes-engine
178 | - RCT-Folly (= 2021.07.22.00)
179 | - React-Core/Default
180 | - React-cxxreact (= 0.71.3)
181 | - React-hermes
182 | - React-jsi (= 0.71.3)
183 | - React-jsiexecutor (= 0.71.3)
184 | - React-perflogger (= 0.71.3)
185 | - Yoga
186 | - React-Core/RCTAnimationHeaders (0.71.3):
187 | - glog
188 | - hermes-engine
189 | - RCT-Folly (= 2021.07.22.00)
190 | - React-Core/Default
191 | - React-cxxreact (= 0.71.3)
192 | - React-hermes
193 | - React-jsi (= 0.71.3)
194 | - React-jsiexecutor (= 0.71.3)
195 | - React-perflogger (= 0.71.3)
196 | - Yoga
197 | - React-Core/RCTBlobHeaders (0.71.3):
198 | - glog
199 | - hermes-engine
200 | - RCT-Folly (= 2021.07.22.00)
201 | - React-Core/Default
202 | - React-cxxreact (= 0.71.3)
203 | - React-hermes
204 | - React-jsi (= 0.71.3)
205 | - React-jsiexecutor (= 0.71.3)
206 | - React-perflogger (= 0.71.3)
207 | - Yoga
208 | - React-Core/RCTImageHeaders (0.71.3):
209 | - glog
210 | - hermes-engine
211 | - RCT-Folly (= 2021.07.22.00)
212 | - React-Core/Default
213 | - React-cxxreact (= 0.71.3)
214 | - React-hermes
215 | - React-jsi (= 0.71.3)
216 | - React-jsiexecutor (= 0.71.3)
217 | - React-perflogger (= 0.71.3)
218 | - Yoga
219 | - React-Core/RCTLinkingHeaders (0.71.3):
220 | - glog
221 | - hermes-engine
222 | - RCT-Folly (= 2021.07.22.00)
223 | - React-Core/Default
224 | - React-cxxreact (= 0.71.3)
225 | - React-hermes
226 | - React-jsi (= 0.71.3)
227 | - React-jsiexecutor (= 0.71.3)
228 | - React-perflogger (= 0.71.3)
229 | - Yoga
230 | - React-Core/RCTNetworkHeaders (0.71.3):
231 | - glog
232 | - hermes-engine
233 | - RCT-Folly (= 2021.07.22.00)
234 | - React-Core/Default
235 | - React-cxxreact (= 0.71.3)
236 | - React-hermes
237 | - React-jsi (= 0.71.3)
238 | - React-jsiexecutor (= 0.71.3)
239 | - React-perflogger (= 0.71.3)
240 | - Yoga
241 | - React-Core/RCTSettingsHeaders (0.71.3):
242 | - glog
243 | - hermes-engine
244 | - RCT-Folly (= 2021.07.22.00)
245 | - React-Core/Default
246 | - React-cxxreact (= 0.71.3)
247 | - React-hermes
248 | - React-jsi (= 0.71.3)
249 | - React-jsiexecutor (= 0.71.3)
250 | - React-perflogger (= 0.71.3)
251 | - Yoga
252 | - React-Core/RCTTextHeaders (0.71.3):
253 | - glog
254 | - hermes-engine
255 | - RCT-Folly (= 2021.07.22.00)
256 | - React-Core/Default
257 | - React-cxxreact (= 0.71.3)
258 | - React-hermes
259 | - React-jsi (= 0.71.3)
260 | - React-jsiexecutor (= 0.71.3)
261 | - React-perflogger (= 0.71.3)
262 | - Yoga
263 | - React-Core/RCTVibrationHeaders (0.71.3):
264 | - glog
265 | - hermes-engine
266 | - RCT-Folly (= 2021.07.22.00)
267 | - React-Core/Default
268 | - React-cxxreact (= 0.71.3)
269 | - React-hermes
270 | - React-jsi (= 0.71.3)
271 | - React-jsiexecutor (= 0.71.3)
272 | - React-perflogger (= 0.71.3)
273 | - Yoga
274 | - React-Core/RCTWebSocket (0.71.3):
275 | - glog
276 | - hermes-engine
277 | - RCT-Folly (= 2021.07.22.00)
278 | - React-Core/Default (= 0.71.3)
279 | - React-cxxreact (= 0.71.3)
280 | - React-hermes
281 | - React-jsi (= 0.71.3)
282 | - React-jsiexecutor (= 0.71.3)
283 | - React-perflogger (= 0.71.3)
284 | - Yoga
285 | - React-CoreModules (0.71.3):
286 | - RCT-Folly (= 2021.07.22.00)
287 | - RCTTypeSafety (= 0.71.3)
288 | - React-Codegen (= 0.71.3)
289 | - React-Core/CoreModulesHeaders (= 0.71.3)
290 | - React-jsi (= 0.71.3)
291 | - React-RCTBlob
292 | - React-RCTImage (= 0.71.3)
293 | - ReactCommon/turbomodule/core (= 0.71.3)
294 | - React-cxxreact (0.71.3):
295 | - boost (= 1.76.0)
296 | - DoubleConversion
297 | - glog
298 | - hermes-engine
299 | - RCT-Folly (= 2021.07.22.00)
300 | - React-callinvoker (= 0.71.3)
301 | - React-jsi (= 0.71.3)
302 | - React-jsinspector (= 0.71.3)
303 | - React-logger (= 0.71.3)
304 | - React-perflogger (= 0.71.3)
305 | - React-runtimeexecutor (= 0.71.3)
306 | - React-hermes (0.71.3):
307 | - DoubleConversion
308 | - glog
309 | - hermes-engine
310 | - RCT-Folly (= 2021.07.22.00)
311 | - RCT-Folly/Futures (= 2021.07.22.00)
312 | - React-cxxreact (= 0.71.3)
313 | - React-jsi
314 | - React-jsiexecutor (= 0.71.3)
315 | - React-jsinspector (= 0.71.3)
316 | - React-perflogger (= 0.71.3)
317 | - React-jsi (0.71.3):
318 | - boost (= 1.76.0)
319 | - DoubleConversion
320 | - glog
321 | - hermes-engine
322 | - RCT-Folly (= 2021.07.22.00)
323 | - React-jsiexecutor (0.71.3):
324 | - DoubleConversion
325 | - glog
326 | - hermes-engine
327 | - RCT-Folly (= 2021.07.22.00)
328 | - React-cxxreact (= 0.71.3)
329 | - React-jsi (= 0.71.3)
330 | - React-perflogger (= 0.71.3)
331 | - React-jsinspector (0.71.3)
332 | - React-logger (0.71.3):
333 | - glog
334 | - React-perflogger (0.71.3)
335 | - React-RCTActionSheet (0.71.3):
336 | - React-Core/RCTActionSheetHeaders (= 0.71.3)
337 | - React-RCTAnimation (0.71.3):
338 | - RCT-Folly (= 2021.07.22.00)
339 | - RCTTypeSafety (= 0.71.3)
340 | - React-Codegen (= 0.71.3)
341 | - React-Core/RCTAnimationHeaders (= 0.71.3)
342 | - React-jsi (= 0.71.3)
343 | - ReactCommon/turbomodule/core (= 0.71.3)
344 | - React-RCTAppDelegate (0.71.3):
345 | - RCT-Folly
346 | - RCTRequired
347 | - RCTTypeSafety
348 | - React-Core
349 | - ReactCommon/turbomodule/core
350 | - React-RCTBlob (0.71.3):
351 | - hermes-engine
352 | - RCT-Folly (= 2021.07.22.00)
353 | - React-Codegen (= 0.71.3)
354 | - React-Core/RCTBlobHeaders (= 0.71.3)
355 | - React-Core/RCTWebSocket (= 0.71.3)
356 | - React-jsi (= 0.71.3)
357 | - React-RCTNetwork (= 0.71.3)
358 | - ReactCommon/turbomodule/core (= 0.71.3)
359 | - React-RCTImage (0.71.3):
360 | - RCT-Folly (= 2021.07.22.00)
361 | - RCTTypeSafety (= 0.71.3)
362 | - React-Codegen (= 0.71.3)
363 | - React-Core/RCTImageHeaders (= 0.71.3)
364 | - React-jsi (= 0.71.3)
365 | - React-RCTNetwork (= 0.71.3)
366 | - ReactCommon/turbomodule/core (= 0.71.3)
367 | - React-RCTLinking (0.71.3):
368 | - React-Codegen (= 0.71.3)
369 | - React-Core/RCTLinkingHeaders (= 0.71.3)
370 | - React-jsi (= 0.71.3)
371 | - ReactCommon/turbomodule/core (= 0.71.3)
372 | - React-RCTNetwork (0.71.3):
373 | - RCT-Folly (= 2021.07.22.00)
374 | - RCTTypeSafety (= 0.71.3)
375 | - React-Codegen (= 0.71.3)
376 | - React-Core/RCTNetworkHeaders (= 0.71.3)
377 | - React-jsi (= 0.71.3)
378 | - ReactCommon/turbomodule/core (= 0.71.3)
379 | - React-RCTSettings (0.71.3):
380 | - RCT-Folly (= 2021.07.22.00)
381 | - RCTTypeSafety (= 0.71.3)
382 | - React-Codegen (= 0.71.3)
383 | - React-Core/RCTSettingsHeaders (= 0.71.3)
384 | - React-jsi (= 0.71.3)
385 | - ReactCommon/turbomodule/core (= 0.71.3)
386 | - React-RCTText (0.71.3):
387 | - React-Core/RCTTextHeaders (= 0.71.3)
388 | - React-RCTVibration (0.71.3):
389 | - RCT-Folly (= 2021.07.22.00)
390 | - React-Codegen (= 0.71.3)
391 | - React-Core/RCTVibrationHeaders (= 0.71.3)
392 | - React-jsi (= 0.71.3)
393 | - ReactCommon/turbomodule/core (= 0.71.3)
394 | - React-runtimeexecutor (0.71.3):
395 | - React-jsi (= 0.71.3)
396 | - ReactCommon/turbomodule/bridging (0.71.3):
397 | - DoubleConversion
398 | - glog
399 | - hermes-engine
400 | - RCT-Folly (= 2021.07.22.00)
401 | - React-callinvoker (= 0.71.3)
402 | - React-Core (= 0.71.3)
403 | - React-cxxreact (= 0.71.3)
404 | - React-jsi (= 0.71.3)
405 | - React-logger (= 0.71.3)
406 | - React-perflogger (= 0.71.3)
407 | - ReactCommon/turbomodule/core (0.71.3):
408 | - DoubleConversion
409 | - glog
410 | - hermes-engine
411 | - RCT-Folly (= 2021.07.22.00)
412 | - React-callinvoker (= 0.71.3)
413 | - React-Core (= 0.71.3)
414 | - React-cxxreact (= 0.71.3)
415 | - React-jsi (= 0.71.3)
416 | - React-logger (= 0.71.3)
417 | - React-perflogger (= 0.71.3)
418 | - RNPermissions (3.6.1):
419 | - React-Core
420 | - RNReanimated (2.14.4):
421 | - DoubleConversion
422 | - FBLazyVector
423 | - FBReactNativeSpec
424 | - glog
425 | - RCT-Folly
426 | - RCTRequired
427 | - RCTTypeSafety
428 | - React-callinvoker
429 | - React-Core
430 | - React-Core/DevSupport
431 | - React-Core/RCTWebSocket
432 | - React-CoreModules
433 | - React-cxxreact
434 | - React-jsi
435 | - React-jsiexecutor
436 | - React-jsinspector
437 | - React-RCTActionSheet
438 | - React-RCTAnimation
439 | - React-RCTBlob
440 | - React-RCTImage
441 | - React-RCTLinking
442 | - React-RCTNetwork
443 | - React-RCTSettings
444 | - React-RCTText
445 | - ReactCommon/turbomodule/core
446 | - Yoga
447 | - SocketRocket (0.6.0)
448 | - TensorFlowLiteTaskVision (0.4.3)
449 | - vision-camera-realtime-object-detection (0.3.0):
450 | - React-Core
451 | - TensorFlowLiteTaskVision
452 | - VisionCamera (2.15.4):
453 | - React
454 | - React-callinvoker
455 | - React-Core
456 | - Yoga (1.14.0)
457 | - YogaKit (1.18.1):
458 | - Yoga (~> 1.14)
459 |
460 | DEPENDENCIES:
461 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
462 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
463 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
464 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
465 | - Flipper (= 0.125.0)
466 | - Flipper-Boost-iOSX (= 1.76.0.1.11)
467 | - Flipper-DoubleConversion (= 3.2.0.1)
468 | - Flipper-Fmt (= 7.1.7)
469 | - Flipper-Folly (= 2.6.10)
470 | - Flipper-Glog (= 0.5.0.5)
471 | - Flipper-PeerTalk (= 0.0.4)
472 | - Flipper-RSocket (= 1.4.3)
473 | - FlipperKit (= 0.125.0)
474 | - FlipperKit/Core (= 0.125.0)
475 | - FlipperKit/CppBridge (= 0.125.0)
476 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0)
477 | - FlipperKit/FBDefines (= 0.125.0)
478 | - FlipperKit/FKPortForwarding (= 0.125.0)
479 | - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0)
480 | - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0)
481 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0)
482 | - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0)
483 | - FlipperKit/FlipperKitReactPlugin (= 0.125.0)
484 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
485 | - FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
486 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
487 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
488 | - libevent (~> 2.1.12)
489 | - OpenSSL-Universal (= 1.1.1100)
490 | - Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`)
491 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
492 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
493 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
494 | - React (from `../node_modules/react-native/`)
495 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
496 | - React-Codegen (from `build/generated/ios`)
497 | - React-Core (from `../node_modules/react-native/`)
498 | - React-Core/DevSupport (from `../node_modules/react-native/`)
499 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
500 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
501 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
502 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
503 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
504 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
505 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
506 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
507 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
508 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
509 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
510 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)
511 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
512 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
513 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
514 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
515 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
516 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
517 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
518 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
519 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
520 | - RNPermissions (from `../node_modules/react-native-permissions`)
521 | - RNReanimated (from `../node_modules/react-native-reanimated`)
522 | - vision-camera-realtime-object-detection (from `../..`)
523 | - VisionCamera (from `../node_modules/react-native-vision-camera`)
524 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
525 |
526 | SPEC REPOS:
527 | trunk:
528 | - CocoaAsyncSocket
529 | - Flipper
530 | - Flipper-Boost-iOSX
531 | - Flipper-DoubleConversion
532 | - Flipper-Fmt
533 | - Flipper-Folly
534 | - Flipper-Glog
535 | - Flipper-PeerTalk
536 | - Flipper-RSocket
537 | - FlipperKit
538 | - fmt
539 | - libevent
540 | - OpenSSL-Universal
541 | - SocketRocket
542 | - TensorFlowLiteTaskVision
543 | - YogaKit
544 |
545 | EXTERNAL SOURCES:
546 | boost:
547 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
548 | DoubleConversion:
549 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
550 | FBLazyVector:
551 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
552 | FBReactNativeSpec:
553 | :path: "../node_modules/react-native/React/FBReactNativeSpec"
554 | glog:
555 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
556 | hermes-engine:
557 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
558 | Permission-Camera:
559 | :path: "../node_modules/react-native-permissions/ios/Camera"
560 | RCT-Folly:
561 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
562 | RCTRequired:
563 | :path: "../node_modules/react-native/Libraries/RCTRequired"
564 | RCTTypeSafety:
565 | :path: "../node_modules/react-native/Libraries/TypeSafety"
566 | React:
567 | :path: "../node_modules/react-native/"
568 | React-callinvoker:
569 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
570 | React-Codegen:
571 | :path: build/generated/ios
572 | React-Core:
573 | :path: "../node_modules/react-native/"
574 | React-CoreModules:
575 | :path: "../node_modules/react-native/React/CoreModules"
576 | React-cxxreact:
577 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
578 | React-hermes:
579 | :path: "../node_modules/react-native/ReactCommon/hermes"
580 | React-jsi:
581 | :path: "../node_modules/react-native/ReactCommon/jsi"
582 | React-jsiexecutor:
583 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
584 | React-jsinspector:
585 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
586 | React-logger:
587 | :path: "../node_modules/react-native/ReactCommon/logger"
588 | React-perflogger:
589 | :path: "../node_modules/react-native/ReactCommon/reactperflogger"
590 | React-RCTActionSheet:
591 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
592 | React-RCTAnimation:
593 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
594 | React-RCTAppDelegate:
595 | :path: "../node_modules/react-native/Libraries/AppDelegate"
596 | React-RCTBlob:
597 | :path: "../node_modules/react-native/Libraries/Blob"
598 | React-RCTImage:
599 | :path: "../node_modules/react-native/Libraries/Image"
600 | React-RCTLinking:
601 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
602 | React-RCTNetwork:
603 | :path: "../node_modules/react-native/Libraries/Network"
604 | React-RCTSettings:
605 | :path: "../node_modules/react-native/Libraries/Settings"
606 | React-RCTText:
607 | :path: "../node_modules/react-native/Libraries/Text"
608 | React-RCTVibration:
609 | :path: "../node_modules/react-native/Libraries/Vibration"
610 | React-runtimeexecutor:
611 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
612 | ReactCommon:
613 | :path: "../node_modules/react-native/ReactCommon"
614 | RNPermissions:
615 | :path: "../node_modules/react-native-permissions"
616 | RNReanimated:
617 | :path: "../node_modules/react-native-reanimated"
618 | vision-camera-realtime-object-detection:
619 | :path: "../.."
620 | VisionCamera:
621 | :path: "../node_modules/react-native-vision-camera"
622 | Yoga:
623 | :path: "../node_modules/react-native/ReactCommon/yoga"
624 |
625 | SPEC CHECKSUMS:
626 | boost: 57d2868c099736d80fcd648bf211b4431e51a558
627 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
628 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
629 | FBLazyVector: 60195509584153283780abdac5569feffb8f08cc
630 | FBReactNativeSpec: 9c191fb58d06dc05ab5559a5505fc32139e9e4a2
631 | Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
632 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
633 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
634 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
635 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
636 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
637 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
638 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
639 | FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
640 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
641 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
642 | hermes-engine: 38bfe887e456b33b697187570a08de33969f5db7
643 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
644 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
645 | Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
646 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
647 | RCTRequired: bec48f07daf7bcdc2655a0cde84e07d24d2a9e2a
648 | RCTTypeSafety: 171394eebacf71e1cfad79dbfae7ee8fc16ca80a
649 | React: d7433ccb6a8c36e4cbed59a73c0700fc83c3e98a
650 | React-callinvoker: 15f165009bd22ae829b2b600e50bcc98076ce4b8
651 | React-Codegen: b5910000eaf1e0c2f47d29be6f82f5f1264420d7
652 | React-Core: b6f2f78d580a90b83fd7b0d1c6911c799f6eac82
653 | React-CoreModules: e0cbc1a4f4f3f60e23c476fef7ab37be363ea8c1
654 | React-cxxreact: c87f3f124b2117d00d410b35f16c2257e25e50fa
655 | React-hermes: c64ca6bdf16a7069773103c9bedaf30ec90ab38f
656 | React-jsi: 39729361645568e238081b3b3180fbad803f25a4
657 | React-jsiexecutor: 515b703d23ffadeac7687bc2d12fb08b90f0aaa1
658 | React-jsinspector: 9f7c9137605e72ca0343db4cea88006cb94856dd
659 | React-logger: 957e5dc96d9dbffc6e0f15e0ee4d2b42829ff207
660 | React-perflogger: af8a3d31546077f42d729b949925cc4549f14def
661 | React-RCTActionSheet: 57cc5adfefbaaf0aae2cf7e10bccd746f2903673
662 | React-RCTAnimation: 11c61e94da700c4dc915cf134513764d87fc5e2b
663 | React-RCTAppDelegate: c3980adeaadcfd6cb495532e928b36ac6db3c14a
664 | React-RCTBlob: ccc5049d742b41971141415ca86b83b201495695
665 | React-RCTImage: 7a9226b0944f1e76e8e01e35a9245c2477cdbabb
666 | React-RCTLinking: bbe8cc582046a9c04f79c235b73c93700263e8b4
667 | React-RCTNetwork: fc2ca322159dc54e06508d4f5c3e934da63dc013
668 | React-RCTSettings: f1e9db2cdf946426d3f2b210e4ff4ce0f0d842ef
669 | React-RCTText: 1c41dd57e5d742b1396b4eeb251851ce7ff0fca1
670 | React-RCTVibration: 5199a180d04873366a83855de55ac33ce60fe4d5
671 | React-runtimeexecutor: 7bf0dafc7b727d93c8cb94eb00a9d3753c446c3e
672 | ReactCommon: 6f65ea5b7d84deb9e386f670dd11ce499ded7b40
673 | RNPermissions: dcdb7b99796bbeda6975a6e79ad519c41b251b1c
674 | RNReanimated: cc5e3aa479cb9170bcccf8204291a6950a3be128
675 | SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
676 | TensorFlowLiteTaskVision: 125d5b49d325ba2cf3938454da5f74a1cbfe0552
677 | vision-camera-realtime-object-detection: c3a9fab4cbfcaf40683cddbe7a288ef2788bb539
678 | VisionCamera: c6356b309f7b8e185b7be2e703ec67bb35acf345
679 | Yoga: 5ed1699acbba8863755998a4245daa200ff3817b
680 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
681 |
682 | PODFILE CHECKSUM: 8cfe3ef4fc2479a8cb647797b4b2d966ec9abc27
683 |
684 | COCOAPODS: 1.10.1
685 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.m */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14 | 3D06205CB3467253F64A37CC /* libPods-VisionCameraRealtimeObjectDetectionExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 114901553BFB5A046B3E2EAA /* libPods-VisionCameraRealtimeObjectDetectionExample.a */; };
15 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
16 | 92040DB1035EEF7FED988466 /* libPods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B10E3F3BE4CB759E89FD8E56 /* libPods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.a */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
25 | remoteInfo = VisionCameraRealtimeObjectDetectionExample;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | 00E356EE1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VisionCameraRealtimeObjectDetectionExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | 00E356F21AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VisionCameraRealtimeObjectDetectionExampleTests.m; sourceTree = ""; };
33 | 0C1B6D8B922444ADAC2EF124 /* lite-model_yolo-v5-tflite_tflite_model_1.tflite */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "lite-model_yolo-v5-tflite_tflite_model_1.tflite"; path = "../assets/model/lite-model_yolo-v5-tflite_tflite_model_1.tflite"; sourceTree = ""; };
34 | 114901553BFB5A046B3E2EAA /* libPods-VisionCameraRealtimeObjectDetectionExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraRealtimeObjectDetectionExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 13B07F961A680F5B00A75B9A /* VisionCameraRealtimeObjectDetectionExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VisionCameraRealtimeObjectDetectionExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
36 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = VisionCameraRealtimeObjectDetectionExample/AppDelegate.h; sourceTree = ""; };
37 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = VisionCameraRealtimeObjectDetectionExample/AppDelegate.mm; sourceTree = ""; };
38 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VisionCameraRealtimeObjectDetectionExample/Images.xcassets; sourceTree = ""; };
39 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VisionCameraRealtimeObjectDetectionExample/Info.plist; sourceTree = ""; };
40 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = VisionCameraRealtimeObjectDetectionExample/main.m; sourceTree = ""; };
41 | 1B4796C89DDFD40C7D284D70 /* Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.debug.xcconfig"; sourceTree = ""; };
42 | 40C44D456015AC07814FD75C /* Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.release.xcconfig"; path = "Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.release.xcconfig"; sourceTree = ""; };
43 | 41425887412EDDF71410E311 /* Pods-VisionCameraRealtimeObjectDetectionExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraRealtimeObjectDetectionExample.debug.xcconfig"; path = "Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample.debug.xcconfig"; sourceTree = ""; };
44 | 58041736526C40F3839679C0 /* detect.tflite */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = detect.tflite; path = ../assets/model/detect.tflite; sourceTree = ""; };
45 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = VisionCameraRealtimeObjectDetectionExample/LaunchScreen.storyboard; sourceTree = ""; };
46 | 9ABB0012D599464DB3A16904 /* model_2.tflite */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = model_2.tflite; path = ../assets/model/model_2.tflite; sourceTree = ""; };
47 | B10E3F3BE4CB759E89FD8E56 /* libPods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
48 | D0CCD4BBBDE995D6F19ABE06 /* Pods-VisionCameraRealtimeObjectDetectionExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraRealtimeObjectDetectionExample.release.xcconfig"; path = "Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample.release.xcconfig"; sourceTree = ""; };
49 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | 92040DB1035EEF7FED988466 /* libPods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.a in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 3D06205CB3467253F64A37CC /* libPods-VisionCameraRealtimeObjectDetectionExample.a in Frameworks */,
66 | );
67 | runOnlyForDeploymentPostprocessing = 0;
68 | };
69 | /* End PBXFrameworksBuildPhase section */
70 |
71 | /* Begin PBXGroup section */
72 | 00E356EF1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests */ = {
73 | isa = PBXGroup;
74 | children = (
75 | 00E356F21AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.m */,
76 | 00E356F01AD99517003FC87E /* Supporting Files */,
77 | );
78 | path = VisionCameraRealtimeObjectDetectionExampleTests;
79 | sourceTree = "";
80 | };
81 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 00E356F11AD99517003FC87E /* Info.plist */,
85 | );
86 | name = "Supporting Files";
87 | sourceTree = "";
88 | };
89 | 0ED46F017A604D728A8736E1 /* Resources */ = {
90 | isa = PBXGroup;
91 | children = (
92 | 9ABB0012D599464DB3A16904 /* model_2.tflite */,
93 | 0C1B6D8B922444ADAC2EF124 /* lite-model_yolo-v5-tflite_tflite_model_1.tflite */,
94 | 58041736526C40F3839679C0 /* detect.tflite */,
95 | );
96 | name = Resources;
97 | sourceTree = "";
98 | };
99 | 13B07FAE1A68108700A75B9A /* VisionCameraRealtimeObjectDetectionExample */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
103 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
104 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
105 | 13B07FB61A68108700A75B9A /* Info.plist */,
106 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
107 | 13B07FB71A68108700A75B9A /* main.m */,
108 | );
109 | name = VisionCameraRealtimeObjectDetectionExample;
110 | sourceTree = "";
111 | };
112 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
113 | isa = PBXGroup;
114 | children = (
115 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
116 | 114901553BFB5A046B3E2EAA /* libPods-VisionCameraRealtimeObjectDetectionExample.a */,
117 | B10E3F3BE4CB759E89FD8E56 /* libPods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.a */,
118 | );
119 | name = Frameworks;
120 | sourceTree = "";
121 | };
122 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
123 | isa = PBXGroup;
124 | children = (
125 | );
126 | name = Libraries;
127 | sourceTree = "";
128 | };
129 | 83CBB9F61A601CBA00E9B192 = {
130 | isa = PBXGroup;
131 | children = (
132 | 13B07FAE1A68108700A75B9A /* VisionCameraRealtimeObjectDetectionExample */,
133 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
134 | 00E356EF1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests */,
135 | 83CBBA001A601CBA00E9B192 /* Products */,
136 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
137 | BBD78D7AC51CEA395F1C20DB /* Pods */,
138 | 0ED46F017A604D728A8736E1 /* Resources */,
139 | );
140 | indentWidth = 2;
141 | sourceTree = "";
142 | tabWidth = 2;
143 | usesTabs = 0;
144 | };
145 | 83CBBA001A601CBA00E9B192 /* Products */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 13B07F961A680F5B00A75B9A /* VisionCameraRealtimeObjectDetectionExample.app */,
149 | 00E356EE1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.xctest */,
150 | );
151 | name = Products;
152 | sourceTree = "";
153 | };
154 | BBD78D7AC51CEA395F1C20DB /* Pods */ = {
155 | isa = PBXGroup;
156 | children = (
157 | 41425887412EDDF71410E311 /* Pods-VisionCameraRealtimeObjectDetectionExample.debug.xcconfig */,
158 | D0CCD4BBBDE995D6F19ABE06 /* Pods-VisionCameraRealtimeObjectDetectionExample.release.xcconfig */,
159 | 1B4796C89DDFD40C7D284D70 /* Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.debug.xcconfig */,
160 | 40C44D456015AC07814FD75C /* Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.release.xcconfig */,
161 | );
162 | path = Pods;
163 | sourceTree = "";
164 | };
165 | /* End PBXGroup section */
166 |
167 | /* Begin PBXNativeTarget section */
168 | 00E356ED1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests */ = {
169 | isa = PBXNativeTarget;
170 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "VisionCameraRealtimeObjectDetectionExampleTests" */;
171 | buildPhases = (
172 | BE5F1D0077259F00ECBF0827 /* [CP] Check Pods Manifest.lock */,
173 | 00E356EA1AD99517003FC87E /* Sources */,
174 | 00E356EB1AD99517003FC87E /* Frameworks */,
175 | 00E356EC1AD99517003FC87E /* Resources */,
176 | 1190AB25B3763C9F506A2BF0 /* [CP] Embed Pods Frameworks */,
177 | F41C051A6BBA274EF1CDDBE4 /* [CP] Copy Pods Resources */,
178 | );
179 | buildRules = (
180 | );
181 | dependencies = (
182 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
183 | );
184 | name = VisionCameraRealtimeObjectDetectionExampleTests;
185 | productName = VisionCameraRealtimeObjectDetectionExampleTests;
186 | productReference = 00E356EE1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.xctest */;
187 | productType = "com.apple.product-type.bundle.unit-test";
188 | };
189 | 13B07F861A680F5B00A75B9A /* VisionCameraRealtimeObjectDetectionExample */ = {
190 | isa = PBXNativeTarget;
191 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VisionCameraRealtimeObjectDetectionExample" */;
192 | buildPhases = (
193 | 123530F5605974416381C9AB /* [CP] Check Pods Manifest.lock */,
194 | FD10A7F022414F080027D42C /* Start Packager */,
195 | 13B07F871A680F5B00A75B9A /* Sources */,
196 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
197 | 13B07F8E1A680F5B00A75B9A /* Resources */,
198 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
199 | 8BA7DBFE16C4B8A543A455B4 /* [CP] Embed Pods Frameworks */,
200 | 8B42730BB6374F67A2B59FDC /* [CP] Copy Pods Resources */,
201 | );
202 | buildRules = (
203 | );
204 | dependencies = (
205 | );
206 | name = VisionCameraRealtimeObjectDetectionExample;
207 | productName = VisionCameraRealtimeObjectDetectionExample;
208 | productReference = 13B07F961A680F5B00A75B9A /* VisionCameraRealtimeObjectDetectionExample.app */;
209 | productType = "com.apple.product-type.application";
210 | };
211 | /* End PBXNativeTarget section */
212 |
213 | /* Begin PBXProject section */
214 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
215 | isa = PBXProject;
216 | attributes = {
217 | LastUpgradeCheck = 1210;
218 | TargetAttributes = {
219 | 00E356ED1AD99517003FC87E = {
220 | CreatedOnToolsVersion = 6.2;
221 | TestTargetID = 13B07F861A680F5B00A75B9A;
222 | };
223 | 13B07F861A680F5B00A75B9A = {
224 | LastSwiftMigration = 1120;
225 | };
226 | };
227 | };
228 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VisionCameraRealtimeObjectDetectionExample" */;
229 | compatibilityVersion = "Xcode 12.0";
230 | developmentRegion = en;
231 | hasScannedForEncodings = 0;
232 | knownRegions = (
233 | en,
234 | Base,
235 | );
236 | mainGroup = 83CBB9F61A601CBA00E9B192;
237 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
238 | projectDirPath = "";
239 | projectRoot = "";
240 | targets = (
241 | 13B07F861A680F5B00A75B9A /* VisionCameraRealtimeObjectDetectionExample */,
242 | 00E356ED1AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests */,
243 | );
244 | };
245 | /* End PBXProject section */
246 |
247 | /* Begin PBXResourcesBuildPhase section */
248 | 00E356EC1AD99517003FC87E /* Resources */ = {
249 | isa = PBXResourcesBuildPhase;
250 | buildActionMask = 2147483647;
251 | files = (
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | };
255 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
260 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | };
264 | /* End PBXResourcesBuildPhase section */
265 |
266 | /* Begin PBXShellScriptBuildPhase section */
267 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
268 | isa = PBXShellScriptBuildPhase;
269 | buildActionMask = 2147483647;
270 | files = (
271 | );
272 | inputPaths = (
273 | "$(SRCROOT)/.xcode.env.local",
274 | "$(SRCROOT)/.xcode.env",
275 | );
276 | name = "Bundle React Native code and images";
277 | outputPaths = (
278 | );
279 | runOnlyForDeploymentPostprocessing = 0;
280 | shellPath = /bin/sh;
281 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
282 | };
283 | 1190AB25B3763C9F506A2BF0 /* [CP] Embed Pods Frameworks */ = {
284 | isa = PBXShellScriptBuildPhase;
285 | buildActionMask = 2147483647;
286 | files = (
287 | );
288 | inputFileListPaths = (
289 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
290 | );
291 | name = "[CP] Embed Pods Frameworks";
292 | outputFileListPaths = (
293 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
294 | );
295 | runOnlyForDeploymentPostprocessing = 0;
296 | shellPath = /bin/sh;
297 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-frameworks.sh\"\n";
298 | showEnvVarsInLog = 0;
299 | };
300 | 123530F5605974416381C9AB /* [CP] Check Pods Manifest.lock */ = {
301 | isa = PBXShellScriptBuildPhase;
302 | buildActionMask = 2147483647;
303 | files = (
304 | );
305 | inputFileListPaths = (
306 | );
307 | inputPaths = (
308 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
309 | "${PODS_ROOT}/Manifest.lock",
310 | );
311 | name = "[CP] Check Pods Manifest.lock";
312 | outputFileListPaths = (
313 | );
314 | outputPaths = (
315 | "$(DERIVED_FILE_DIR)/Pods-VisionCameraRealtimeObjectDetectionExample-checkManifestLockResult.txt",
316 | );
317 | runOnlyForDeploymentPostprocessing = 0;
318 | shellPath = /bin/sh;
319 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
320 | showEnvVarsInLog = 0;
321 | };
322 | 8B42730BB6374F67A2B59FDC /* [CP] Copy Pods Resources */ = {
323 | isa = PBXShellScriptBuildPhase;
324 | buildActionMask = 2147483647;
325 | files = (
326 | );
327 | inputFileListPaths = (
328 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample-resources-${CONFIGURATION}-input-files.xcfilelist",
329 | );
330 | name = "[CP] Copy Pods Resources";
331 | outputFileListPaths = (
332 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample-resources-${CONFIGURATION}-output-files.xcfilelist",
333 | );
334 | runOnlyForDeploymentPostprocessing = 0;
335 | shellPath = /bin/sh;
336 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample-resources.sh\"\n";
337 | showEnvVarsInLog = 0;
338 | };
339 | 8BA7DBFE16C4B8A543A455B4 /* [CP] Embed Pods Frameworks */ = {
340 | isa = PBXShellScriptBuildPhase;
341 | buildActionMask = 2147483647;
342 | files = (
343 | );
344 | inputFileListPaths = (
345 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
346 | );
347 | name = "[CP] Embed Pods Frameworks";
348 | outputFileListPaths = (
349 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
350 | );
351 | runOnlyForDeploymentPostprocessing = 0;
352 | shellPath = /bin/sh;
353 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample/Pods-VisionCameraRealtimeObjectDetectionExample-frameworks.sh\"\n";
354 | showEnvVarsInLog = 0;
355 | };
356 | BE5F1D0077259F00ECBF0827 /* [CP] Check Pods Manifest.lock */ = {
357 | isa = PBXShellScriptBuildPhase;
358 | buildActionMask = 2147483647;
359 | files = (
360 | );
361 | inputFileListPaths = (
362 | );
363 | inputPaths = (
364 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
365 | "${PODS_ROOT}/Manifest.lock",
366 | );
367 | name = "[CP] Check Pods Manifest.lock";
368 | outputFileListPaths = (
369 | );
370 | outputPaths = (
371 | "$(DERIVED_FILE_DIR)/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-checkManifestLockResult.txt",
372 | );
373 | runOnlyForDeploymentPostprocessing = 0;
374 | shellPath = /bin/sh;
375 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
376 | showEnvVarsInLog = 0;
377 | };
378 | F41C051A6BBA274EF1CDDBE4 /* [CP] Copy Pods Resources */ = {
379 | isa = PBXShellScriptBuildPhase;
380 | buildActionMask = 2147483647;
381 | files = (
382 | );
383 | inputFileListPaths = (
384 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist",
385 | );
386 | name = "[CP] Copy Pods Resources";
387 | outputFileListPaths = (
388 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist",
389 | );
390 | runOnlyForDeploymentPostprocessing = 0;
391 | shellPath = /bin/sh;
392 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests/Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests-resources.sh\"\n";
393 | showEnvVarsInLog = 0;
394 | };
395 | FD10A7F022414F080027D42C /* Start Packager */ = {
396 | isa = PBXShellScriptBuildPhase;
397 | buildActionMask = 2147483647;
398 | files = (
399 | );
400 | inputFileListPaths = (
401 | );
402 | inputPaths = (
403 | );
404 | name = "Start Packager";
405 | outputFileListPaths = (
406 | );
407 | outputPaths = (
408 | );
409 | runOnlyForDeploymentPostprocessing = 0;
410 | shellPath = /bin/sh;
411 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
412 | showEnvVarsInLog = 0;
413 | };
414 | /* End PBXShellScriptBuildPhase section */
415 |
416 | /* Begin PBXSourcesBuildPhase section */
417 | 00E356EA1AD99517003FC87E /* Sources */ = {
418 | isa = PBXSourcesBuildPhase;
419 | buildActionMask = 2147483647;
420 | files = (
421 | 00E356F31AD99517003FC87E /* VisionCameraRealtimeObjectDetectionExampleTests.m in Sources */,
422 | );
423 | runOnlyForDeploymentPostprocessing = 0;
424 | };
425 | 13B07F871A680F5B00A75B9A /* Sources */ = {
426 | isa = PBXSourcesBuildPhase;
427 | buildActionMask = 2147483647;
428 | files = (
429 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
430 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
431 | );
432 | runOnlyForDeploymentPostprocessing = 0;
433 | };
434 | /* End PBXSourcesBuildPhase section */
435 |
436 | /* Begin PBXTargetDependency section */
437 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
438 | isa = PBXTargetDependency;
439 | target = 13B07F861A680F5B00A75B9A /* VisionCameraRealtimeObjectDetectionExample */;
440 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
441 | };
442 | /* End PBXTargetDependency section */
443 |
444 | /* Begin XCBuildConfiguration section */
445 | 00E356F61AD99517003FC87E /* Debug */ = {
446 | isa = XCBuildConfiguration;
447 | baseConfigurationReference = 1B4796C89DDFD40C7D284D70 /* Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.debug.xcconfig */;
448 | buildSettings = {
449 | BUNDLE_LOADER = "$(TEST_HOST)";
450 | GCC_PREPROCESSOR_DEFINITIONS = (
451 | "DEBUG=1",
452 | "$(inherited)",
453 | );
454 | INFOPLIST_FILE = VisionCameraRealtimeObjectDetectionExampleTests/Info.plist;
455 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
456 | LD_RUNPATH_SEARCH_PATHS = (
457 | "$(inherited)",
458 | "@executable_path/Frameworks",
459 | "@loader_path/Frameworks",
460 | );
461 | OTHER_LDFLAGS = (
462 | "-ObjC",
463 | "-lc++",
464 | "$(inherited)",
465 | );
466 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
467 | PRODUCT_NAME = "$(TARGET_NAME)";
468 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VisionCameraRealtimeObjectDetectionExample.app/VisionCameraRealtimeObjectDetectionExample";
469 | };
470 | name = Debug;
471 | };
472 | 00E356F71AD99517003FC87E /* Release */ = {
473 | isa = XCBuildConfiguration;
474 | baseConfigurationReference = 40C44D456015AC07814FD75C /* Pods-VisionCameraRealtimeObjectDetectionExample-VisionCameraRealtimeObjectDetectionExampleTests.release.xcconfig */;
475 | buildSettings = {
476 | BUNDLE_LOADER = "$(TEST_HOST)";
477 | COPY_PHASE_STRIP = NO;
478 | INFOPLIST_FILE = VisionCameraRealtimeObjectDetectionExampleTests/Info.plist;
479 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
480 | LD_RUNPATH_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "@executable_path/Frameworks",
483 | "@loader_path/Frameworks",
484 | );
485 | OTHER_LDFLAGS = (
486 | "-ObjC",
487 | "-lc++",
488 | "$(inherited)",
489 | );
490 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
491 | PRODUCT_NAME = "$(TARGET_NAME)";
492 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VisionCameraRealtimeObjectDetectionExample.app/VisionCameraRealtimeObjectDetectionExample";
493 | };
494 | name = Release;
495 | };
496 | 13B07F941A680F5B00A75B9A /* Debug */ = {
497 | isa = XCBuildConfiguration;
498 | baseConfigurationReference = 41425887412EDDF71410E311 /* Pods-VisionCameraRealtimeObjectDetectionExample.debug.xcconfig */;
499 | buildSettings = {
500 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
501 | CLANG_ENABLE_MODULES = YES;
502 | CURRENT_PROJECT_VERSION = 1;
503 | DEVELOPMENT_TEAM = P4RM732245;
504 | ENABLE_BITCODE = NO;
505 | INFOPLIST_FILE = VisionCameraRealtimeObjectDetectionExample/Info.plist;
506 | LD_RUNPATH_SEARCH_PATHS = (
507 | "$(inherited)",
508 | "@executable_path/Frameworks",
509 | );
510 | MARKETING_VERSION = 1.0;
511 | OTHER_LDFLAGS = (
512 | "$(inherited)",
513 | "-ObjC",
514 | "-lc++",
515 | );
516 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
517 | PRODUCT_NAME = VisionCameraRealtimeObjectDetectionExample;
518 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
519 | SWIFT_VERSION = 5.0;
520 | VERSIONING_SYSTEM = "apple-generic";
521 | };
522 | name = Debug;
523 | };
524 | 13B07F951A680F5B00A75B9A /* Release */ = {
525 | isa = XCBuildConfiguration;
526 | baseConfigurationReference = D0CCD4BBBDE995D6F19ABE06 /* Pods-VisionCameraRealtimeObjectDetectionExample.release.xcconfig */;
527 | buildSettings = {
528 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
529 | CLANG_ENABLE_MODULES = YES;
530 | CURRENT_PROJECT_VERSION = 1;
531 | DEVELOPMENT_TEAM = P4RM732245;
532 | INFOPLIST_FILE = VisionCameraRealtimeObjectDetectionExample/Info.plist;
533 | LD_RUNPATH_SEARCH_PATHS = (
534 | "$(inherited)",
535 | "@executable_path/Frameworks",
536 | );
537 | MARKETING_VERSION = 1.0;
538 | OTHER_LDFLAGS = (
539 | "$(inherited)",
540 | "-ObjC",
541 | "-lc++",
542 | );
543 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
544 | PRODUCT_NAME = VisionCameraRealtimeObjectDetectionExample;
545 | SWIFT_VERSION = 5.0;
546 | VERSIONING_SYSTEM = "apple-generic";
547 | };
548 | name = Release;
549 | };
550 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
551 | isa = XCBuildConfiguration;
552 | buildSettings = {
553 | ALWAYS_SEARCH_USER_PATHS = NO;
554 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
555 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
556 | CLANG_CXX_LIBRARY = "libc++";
557 | CLANG_ENABLE_MODULES = YES;
558 | CLANG_ENABLE_OBJC_ARC = YES;
559 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
560 | CLANG_WARN_BOOL_CONVERSION = YES;
561 | CLANG_WARN_COMMA = YES;
562 | CLANG_WARN_CONSTANT_CONVERSION = YES;
563 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
564 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
565 | CLANG_WARN_EMPTY_BODY = YES;
566 | CLANG_WARN_ENUM_CONVERSION = YES;
567 | CLANG_WARN_INFINITE_RECURSION = YES;
568 | CLANG_WARN_INT_CONVERSION = YES;
569 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
570 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
571 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
572 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
573 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
574 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
575 | CLANG_WARN_STRICT_PROTOTYPES = YES;
576 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
577 | CLANG_WARN_UNREACHABLE_CODE = YES;
578 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
579 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
580 | COPY_PHASE_STRIP = NO;
581 | ENABLE_STRICT_OBJC_MSGSEND = YES;
582 | ENABLE_TESTABILITY = YES;
583 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
584 | GCC_C_LANGUAGE_STANDARD = gnu99;
585 | GCC_DYNAMIC_NO_PIC = NO;
586 | GCC_NO_COMMON_BLOCKS = YES;
587 | GCC_OPTIMIZATION_LEVEL = 0;
588 | GCC_PREPROCESSOR_DEFINITIONS = (
589 | "DEBUG=1",
590 | "$(inherited)",
591 | );
592 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
593 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
594 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
595 | GCC_WARN_UNDECLARED_SELECTOR = YES;
596 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
597 | GCC_WARN_UNUSED_FUNCTION = YES;
598 | GCC_WARN_UNUSED_VARIABLE = YES;
599 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
600 | LD_RUNPATH_SEARCH_PATHS = (
601 | /usr/lib/swift,
602 | "$(inherited)",
603 | );
604 | LIBRARY_SEARCH_PATHS = (
605 | "\"$(SDKROOT)/usr/lib/swift\"",
606 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
607 | "\"$(inherited)\"",
608 | );
609 | MTL_ENABLE_DEBUG_INFO = YES;
610 | ONLY_ACTIVE_ARCH = YES;
611 | OTHER_CPLUSPLUSFLAGS = (
612 | "$(OTHER_CFLAGS)",
613 | "-DFOLLY_NO_CONFIG",
614 | "-DFOLLY_MOBILE=1",
615 | "-DFOLLY_USE_LIBCPP=1",
616 | );
617 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
618 | SDKROOT = iphoneos;
619 | };
620 | name = Debug;
621 | };
622 | 83CBBA211A601CBA00E9B192 /* Release */ = {
623 | isa = XCBuildConfiguration;
624 | buildSettings = {
625 | ALWAYS_SEARCH_USER_PATHS = NO;
626 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
627 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
628 | CLANG_CXX_LIBRARY = "libc++";
629 | CLANG_ENABLE_MODULES = YES;
630 | CLANG_ENABLE_OBJC_ARC = YES;
631 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
632 | CLANG_WARN_BOOL_CONVERSION = YES;
633 | CLANG_WARN_COMMA = YES;
634 | CLANG_WARN_CONSTANT_CONVERSION = YES;
635 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
636 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
637 | CLANG_WARN_EMPTY_BODY = YES;
638 | CLANG_WARN_ENUM_CONVERSION = YES;
639 | CLANG_WARN_INFINITE_RECURSION = YES;
640 | CLANG_WARN_INT_CONVERSION = YES;
641 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
642 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
643 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
644 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
645 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
646 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
647 | CLANG_WARN_STRICT_PROTOTYPES = YES;
648 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
649 | CLANG_WARN_UNREACHABLE_CODE = YES;
650 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
651 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
652 | COPY_PHASE_STRIP = YES;
653 | ENABLE_NS_ASSERTIONS = NO;
654 | ENABLE_STRICT_OBJC_MSGSEND = YES;
655 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
656 | GCC_C_LANGUAGE_STANDARD = gnu99;
657 | GCC_NO_COMMON_BLOCKS = YES;
658 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
659 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
660 | GCC_WARN_UNDECLARED_SELECTOR = YES;
661 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
662 | GCC_WARN_UNUSED_FUNCTION = YES;
663 | GCC_WARN_UNUSED_VARIABLE = YES;
664 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
665 | LD_RUNPATH_SEARCH_PATHS = (
666 | /usr/lib/swift,
667 | "$(inherited)",
668 | );
669 | LIBRARY_SEARCH_PATHS = (
670 | "\"$(SDKROOT)/usr/lib/swift\"",
671 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
672 | "\"$(inherited)\"",
673 | );
674 | MTL_ENABLE_DEBUG_INFO = NO;
675 | OTHER_CPLUSPLUSFLAGS = (
676 | "$(OTHER_CFLAGS)",
677 | "-DFOLLY_NO_CONFIG",
678 | "-DFOLLY_MOBILE=1",
679 | "-DFOLLY_USE_LIBCPP=1",
680 | );
681 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
682 | SDKROOT = iphoneos;
683 | VALIDATE_PRODUCT = YES;
684 | };
685 | name = Release;
686 | };
687 | /* End XCBuildConfiguration section */
688 |
689 | /* Begin XCConfigurationList section */
690 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "VisionCameraRealtimeObjectDetectionExampleTests" */ = {
691 | isa = XCConfigurationList;
692 | buildConfigurations = (
693 | 00E356F61AD99517003FC87E /* Debug */,
694 | 00E356F71AD99517003FC87E /* Release */,
695 | );
696 | defaultConfigurationIsVisible = 0;
697 | defaultConfigurationName = Release;
698 | };
699 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VisionCameraRealtimeObjectDetectionExample" */ = {
700 | isa = XCConfigurationList;
701 | buildConfigurations = (
702 | 13B07F941A680F5B00A75B9A /* Debug */,
703 | 13B07F951A680F5B00A75B9A /* Release */,
704 | );
705 | defaultConfigurationIsVisible = 0;
706 | defaultConfigurationName = Release;
707 | };
708 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VisionCameraRealtimeObjectDetectionExample" */ = {
709 | isa = XCConfigurationList;
710 | buildConfigurations = (
711 | 83CBBA201A601CBA00E9B192 /* Debug */,
712 | 83CBBA211A601CBA00E9B192 /* Release */,
713 | );
714 | defaultConfigurationIsVisible = 0;
715 | defaultConfigurationName = Release;
716 | };
717 | /* End XCConfigurationList section */
718 | };
719 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
720 | }
721 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample.xcodeproj/xcshareddata/xcschemes/VisionCameraRealtimeObjectDetectionExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"VisionCameraRealtimeObjectDetectionExample";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | #if DEBUG
20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
21 | #else
22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23 | #endif
24 | }
25 |
26 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
27 | ///
28 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
29 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
30 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
31 | - (BOOL)concurrentRootEnabled
32 | {
33 | return true;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | VisionCameraRealtimeObjectDetectionExample
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(CURRENT_PROJECT_VERSION)
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSExceptionDomains
30 |
31 | localhost
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 | NSCameraUsageDescription
55 | $(PRODUCT_NAME) needs access to your Camera.
56 |
57 |
58 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExample/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/example/ios/VisionCameraRealtimeObjectDetectionExampleTests/VisionCameraRealtimeObjectDetectionExampleTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface VisionCameraRealtimeObjectDetectionExampleTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation VisionCameraRealtimeObjectDetectionExampleTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/example/metro.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const escape = require('escape-string-regexp');
3 | const exclusionList = require('metro-config/src/defaults/exclusionList');
4 | const pak = require('../package.json');
5 |
6 | const root = path.resolve(__dirname, '..');
7 |
8 | const modules = Object.keys({
9 | ...pak.peerDependencies,
10 | });
11 |
12 | module.exports = {
13 | projectRoot: __dirname,
14 | watchFolders: [root],
15 |
16 | // We need to make sure that only one version is loaded for peerDependencies
17 | // So we block them at the root, and alias them to the versions in example's node_modules
18 | resolver: {
19 | blacklistRE: exclusionList(
20 | modules.map(
21 | (m) =>
22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
23 | )
24 | ),
25 |
26 | extraNodeModules: modules.reduce((acc, name) => {
27 | acc[name] = path.join(__dirname, 'node_modules', name);
28 | return acc;
29 | }, {}),
30 | },
31 |
32 | transformer: {
33 | getTransformOptions: async () => ({
34 | transform: {
35 | experimentalImportSupport: false,
36 | inlineRequires: true,
37 | },
38 | }),
39 | },
40 | };
41 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "VisionCameraRealtimeObjectDetectionExample",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "pods": "pod-install --quiet"
10 | },
11 | "dependencies": {
12 | "react": "18.2.0",
13 | "react-native": "0.71.3",
14 | "react-native-permissions": "^3.6.1",
15 | "react-native-reanimated": "^2.14.4",
16 | "react-native-vision-camera": "^2.15.4"
17 | },
18 | "devDependencies": {
19 | "@babel/core": "^7.20.0",
20 | "@babel/preset-env": "^7.20.0",
21 | "@babel/runtime": "^7.20.0",
22 | "babel-plugin-module-resolver": "^4.1.0",
23 | "metro-react-native-babel-preset": "0.73.7"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/react-native.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const pak = require('../package.json');
3 |
4 | module.exports = {
5 | dependencies: {
6 | [pak.name]: {
7 | root: path.join(__dirname, '..'),
8 | },
9 | },
10 | assets: ['./assets/model'],
11 | };
12 |
--------------------------------------------------------------------------------
/example/src/App.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import { useCameraDevices } from 'react-native-vision-camera';
4 | import LoadingView from './components/LoadingView';
5 | import PermissionDenied from './components/PermissionDenied';
6 | import ObjectDetector from './components/ObjectDetector';
7 | import { useCameraPermission } from './hooks/useCameraPermission';
8 |
9 | export default function App() {
10 | const devices = useCameraDevices('wide-angle-camera');
11 | const device = devices.back;
12 |
13 | const { pending, isPermissionGranted } = useCameraPermission();
14 |
15 | if (!device || pending) return ;
16 | if (!isPermissionGranted) return ;
17 | return ;
18 | }
19 |
--------------------------------------------------------------------------------
/example/src/components/LoadingView/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, Text, View } from 'react-native';
3 |
4 | const LoadingView: React.FC = () => (
5 |
6 | Loading...
7 |
8 | );
9 |
10 | const styles = StyleSheet.create({
11 | container: {
12 | backgroundColor: 'white',
13 | justifyContent: 'center',
14 | alignItems: 'center',
15 | },
16 | text: {
17 | color: 'black',
18 | },
19 | });
20 |
21 | export default LoadingView;
22 |
--------------------------------------------------------------------------------
/example/src/components/ObjectDetector/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import { StyleSheet, Text, useWindowDimensions, View } from 'react-native';
3 | import {
4 | DetectedObject,
5 | detectObjects,
6 | FrameProcessorConfig,
7 | } from 'vision-camera-realtime-object-detection';
8 | import {
9 | Camera,
10 | CameraDevice,
11 | useFrameProcessor,
12 | } from 'react-native-vision-camera';
13 | import { runOnJS } from 'react-native-reanimated';
14 |
15 | interface Props {
16 | device: CameraDevice;
17 | }
18 |
19 | const ObjectDetector: React.FC = ({ device }) => {
20 | const [objects, setObjects] = useState([]);
21 |
22 | const frameProcessorConfig: FrameProcessorConfig = {
23 | modelFile: 'model.tflite',
24 | scoreThreshold: 0.4,
25 | maxResults: 1,
26 | numThreads: 4,
27 | };
28 |
29 | const windowDimensions = useWindowDimensions();
30 |
31 | const frameProcessor = useFrameProcessor((frame) => {
32 | 'worklet';
33 |
34 | const detectedObjects = detectObjects(frame, frameProcessorConfig);
35 | runOnJS(setObjects)(
36 | detectedObjects.map((obj) => ({
37 | ...obj,
38 | top: obj.top * windowDimensions.height,
39 | left: obj.left * windowDimensions.width,
40 | width: obj.width * windowDimensions.width,
41 | height: obj.height * windowDimensions.height,
42 | }))
43 | );
44 | }, []);
45 |
46 | return (
47 |
48 |
55 | {objects?.map(
56 | (
57 | { top, left, width, height, labels }: DetectedObject,
58 | index: number
59 | ) => (
60 |
64 |
65 | {labels
66 | .map((label) => `${label.label} (${label.confidence})`)
67 | .join(',')}
68 |
69 |
70 | )
71 | )}
72 |
73 | );
74 | };
75 |
76 | const styles = StyleSheet.create({
77 | detectionFrame: {
78 | position: 'absolute',
79 | borderWidth: 1,
80 | borderColor: '#00ff00',
81 | zIndex: 9,
82 | },
83 | detectionFrameLabel: {
84 | backgroundColor: 'rgba(0, 255, 0, 0.25)',
85 | },
86 | });
87 |
88 | export default ObjectDetector;
89 |
--------------------------------------------------------------------------------
/example/src/components/PermissionDenied/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, Text, View } from 'react-native';
3 |
4 | const PermissionDenied: React.FC = () => (
5 |
6 | Permission denied
7 |
8 | );
9 |
10 | const styles = StyleSheet.create({
11 | container: {
12 | backgroundColor: 'red',
13 | justifyContent: 'center',
14 | alignItems: 'center',
15 | },
16 | text: {
17 | color: 'white',
18 | },
19 | });
20 |
21 | export default PermissionDenied;
22 |
--------------------------------------------------------------------------------
/example/src/hooks/useCameraPermission.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 | import { check, PERMISSIONS, request } from 'react-native-permissions';
3 | import { Platform } from 'react-native';
4 |
5 | interface CameraPermissionState {
6 | pending: boolean;
7 | isPermissionGranted: boolean;
8 | }
9 |
10 | export const useCameraPermission = () => {
11 | const [cameraPermissionState, setCameraPermissionState] =
12 | useState({
13 | pending: true,
14 | isPermissionGranted: false,
15 | });
16 |
17 | useEffect(() => {
18 | const bootstrap = async () => {
19 | const permission =
20 | Platform.OS === 'ios'
21 | ? PERMISSIONS.IOS.CAMERA
22 | : PERMISSIONS.ANDROID.CAMERA;
23 | const permissionStatus = await check(permission);
24 | switch (permissionStatus) {
25 | case 'granted':
26 | case 'limited': {
27 | setCameraPermissionState({
28 | pending: false,
29 | isPermissionGranted: true,
30 | });
31 | break;
32 | }
33 | case 'denied': {
34 | const requestStatus = await request(permission);
35 | setCameraPermissionState({
36 | pending: false,
37 | isPermissionGranted: requestStatus === 'granted',
38 | });
39 | break;
40 | }
41 | case 'blocked':
42 | case 'unavailable':
43 | default: {
44 | setCameraPermissionState({
45 | pending: false,
46 | isPermissionGranted: false,
47 | });
48 | break;
49 | }
50 | }
51 | };
52 |
53 | bootstrap();
54 | }, []);
55 |
56 | return cameraPermissionState;
57 | };
58 |
--------------------------------------------------------------------------------
/ios/RealtimeObjectDetectionProcessor/RealtimeObjectDetectionProcessor.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 | #import
5 |
6 | @interface RealtimeObjectDetectionProcessorPlugin : NSObject
7 | + (TFLObjectDetector*)detector:(NSDictionary*)config;
8 | + (UIImage*)resizeFrameToUIimage:(Frame*)frame;
9 | @end
10 |
11 | @implementation RealtimeObjectDetectionProcessorPlugin
12 |
13 | + (TFLObjectDetector*)detector:(NSDictionary*)config {
14 | static TFLObjectDetector* detector = nil;
15 | if (detector == nil) {
16 | NSString* filename = config[@"modelFile"];
17 | NSString* extension = [filename pathExtension];
18 | NSString* modelName = [filename stringByDeletingPathExtension];
19 | NSString* modelPath = [[NSBundle mainBundle] pathForResource:modelName
20 | ofType:extension];
21 |
22 | NSNumber* scoreThreshold = config[@"scoreThreshold"];
23 | NSNumber* maxResults = config[@"maxResults"];
24 | NSNumber* numThreads = config[@"numThreads"];
25 | TFLObjectDetectorOptions* options =
26 | [[TFLObjectDetectorOptions alloc] initWithModelPath:modelPath];
27 | options.classificationOptions.scoreThreshold =
28 | scoreThreshold.floatValue;
29 | options.classificationOptions.maxResults =
30 | maxResults.intValue;
31 | options.baseOptions.computeSettings.cpuSettings.numThreads = numThreads.intValue;
32 | detector = [TFLObjectDetector objectDetectorWithOptions:options error:nil];
33 | }
34 | return detector;
35 | }
36 |
37 | + (UIImage*)resizeFrameToUIimage:(Frame*)frame {
38 | CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(frame.buffer);
39 |
40 | CIImage* ciImage = [CIImage imageWithCVPixelBuffer:imageBuffer];
41 | CIContext* context = [CIContext contextWithOptions:nil];
42 | CGImageRef cgImage = [context createCGImage:ciImage
43 | fromRect:[ciImage extent]];
44 | UIImage* uiImage = [UIImage imageWithCGImage:cgImage];
45 | CGImageRelease(cgImage);
46 |
47 | CGSize newSize = CGSizeMake(uiImage.size.width, uiImage.size.height);
48 | CGRect rect = CGRectMake(0, 0, newSize.width, newSize.height);
49 |
50 | UIGraphicsBeginImageContextWithOptions(newSize, false, 1.0);
51 | [uiImage drawInRect:rect];
52 |
53 | UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
54 | UIGraphicsEndImageContext();
55 |
56 | return newImage;
57 | }
58 |
59 | static inline id detectObjects(Frame* frame, NSArray* args) {
60 | NSDictionary* config = [args objectAtIndex:0];
61 |
62 | UIImageOrientation orientation = frame.orientation;
63 |
64 | UIImage* resizedImageResult =
65 | [RealtimeObjectDetectionProcessorPlugin resizeFrameToUIimage:frame];
66 | GMLImage* gmlImage = [[GMLImage alloc] initWithImage:resizedImageResult];
67 | gmlImage.orientation = orientation;
68 |
69 | CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(frame.buffer);
70 | size_t width = CVPixelBufferGetWidth(imageBuffer);
71 | size_t height = CVPixelBufferGetHeight(imageBuffer);
72 |
73 | NSError* error;
74 | TFLDetectionResult* detectionResult = [[RealtimeObjectDetectionProcessorPlugin
75 | detector:config] detectWithGMLImage:gmlImage error:&error];
76 |
77 | if (!detectionResult) {
78 | return @[];
79 | }
80 | NSMutableArray* results =
81 | [NSMutableArray arrayWithCapacity:detectionResult.detections.count];
82 | for (TFLDetection* detection in detectionResult.detections) {
83 | NSMutableArray* labels =
84 | [NSMutableArray arrayWithCapacity:detection.categories.count];
85 |
86 | if (detection.categories.count != 0) {
87 | for (TFLCategory* category in detection.categories) {
88 | [labels addObject:@{
89 | @"index" : [NSNumber numberWithLong:category.index],
90 | @"label" : category.label,
91 | @"confidence" : [NSNumber numberWithFloat:category.score]
92 | }];
93 | }
94 |
95 | [results addObject:@{
96 | @"width" : [NSNumber numberWithFloat:(detection.boundingBox.size.width /
97 | gmlImage.width)],
98 | @"height" :
99 | [NSNumber numberWithFloat:(detection.boundingBox.size.height /
100 | gmlImage.height)],
101 | @"top" : [NSNumber
102 | numberWithFloat:(detection.boundingBox.origin.y / gmlImage.height)],
103 | @"left" : [NSNumber
104 | numberWithFloat:(detection.boundingBox.origin.x / gmlImage.width)],
105 | @"frameRotation" : [NSNumber numberWithFloat:frame.orientation],
106 | @"labels" : labels
107 | }];
108 | }
109 | }
110 |
111 | return results;
112 | }
113 |
114 | VISION_EXPORT_FRAME_PROCESSOR(detectObjects)
115 |
116 | @end
117 |
--------------------------------------------------------------------------------
/ios/VisionCameraRealtimeObjectDetection.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 591301DFA4771481A686565B /* RealtimeObjectDetectionProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A9C523A8A1CAA4E68968F9C /* RealtimeObjectDetectionProcessor.m */; };
11 | /* End PBXBuildFile section */
12 |
13 | /* Begin PBXCopyFilesBuildPhase section */
14 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
15 | isa = PBXCopyFilesBuildPhase;
16 | buildActionMask = 2147483647;
17 | dstPath = "include/$(PRODUCT_NAME)";
18 | dstSubfolderSpec = 16;
19 | files = (
20 | );
21 | runOnlyForDeploymentPostprocessing = 0;
22 | };
23 | /* End PBXCopyFilesBuildPhase section */
24 |
25 | /* Begin PBXFileReference section */
26 | 134814201AA4EA6300B7C361 /* libVisionCameraRealtimeObjectDetection.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVisionCameraRealtimeObjectDetection.a; sourceTree = BUILT_PRODUCTS_DIR; };
27 | 2A9C523A8A1CAA4E68968F9C /* RealtimeObjectDetectionProcessor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RealtimeObjectDetectionProcessor.m; path = RealtimeObjectDetectionProcessor/RealtimeObjectDetectionProcessor.m; sourceTree = ""; };
28 | /* End PBXFileReference section */
29 |
30 | /* Begin PBXFrameworksBuildPhase section */
31 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
32 | isa = PBXFrameworksBuildPhase;
33 | buildActionMask = 2147483647;
34 | files = (
35 | );
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXFrameworksBuildPhase section */
39 |
40 | /* Begin PBXGroup section */
41 | 134814211AA4EA7D00B7C361 /* Products */ = {
42 | isa = PBXGroup;
43 | children = (
44 | 134814201AA4EA6300B7C361 /* libVisionCameraRealtimeObjectDetection.a */,
45 | );
46 | name = Products;
47 | sourceTree = "";
48 | };
49 | 58B511D21A9E6C8500147676 = {
50 | isa = PBXGroup;
51 | children = (
52 | 134814211AA4EA7D00B7C361 /* Products */,
53 | C5C8043DCFB040CD55EB58CC /* RealtimeObjectDetectionProcessor */,
54 | );
55 | sourceTree = "";
56 | };
57 | C5C8043DCFB040CD55EB58CC /* RealtimeObjectDetectionProcessor */ = {
58 | isa = PBXGroup;
59 | children = (
60 | 2A9C523A8A1CAA4E68968F9C /* RealtimeObjectDetectionProcessor.m */,
61 | );
62 | name = RealtimeObjectDetectionProcessor;
63 | sourceTree = "";
64 | };
65 | /* End PBXGroup section */
66 |
67 | /* Begin PBXNativeTarget section */
68 | 58B511DA1A9E6C8500147676 /* VisionCameraRealtimeObjectDetection */ = {
69 | isa = PBXNativeTarget;
70 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VisionCameraRealtimeObjectDetection" */;
71 | buildPhases = (
72 | 58B511D71A9E6C8500147676 /* Sources */,
73 | 58B511D81A9E6C8500147676 /* Frameworks */,
74 | 58B511D91A9E6C8500147676 /* CopyFiles */,
75 | );
76 | buildRules = (
77 | );
78 | dependencies = (
79 | );
80 | name = VisionCameraRealtimeObjectDetection;
81 | productName = RCTDataManager;
82 | productReference = 134814201AA4EA6300B7C361 /* libVisionCameraRealtimeObjectDetection.a */;
83 | productType = "com.apple.product-type.library.static";
84 | };
85 | /* End PBXNativeTarget section */
86 |
87 | /* Begin PBXProject section */
88 | 58B511D31A9E6C8500147676 /* Project object */ = {
89 | isa = PBXProject;
90 | attributes = {
91 | LastUpgradeCheck = 0920;
92 | ORGANIZATIONNAME = Facebook;
93 | TargetAttributes = {
94 | 58B511DA1A9E6C8500147676 = {
95 | CreatedOnToolsVersion = 6.1.1;
96 | };
97 | };
98 | };
99 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VisionCameraRealtimeObjectDetection" */;
100 | compatibilityVersion = "Xcode 3.2";
101 | developmentRegion = English;
102 | hasScannedForEncodings = 0;
103 | knownRegions = (
104 | English,
105 | en,
106 | );
107 | mainGroup = 58B511D21A9E6C8500147676;
108 | productRefGroup = 58B511D21A9E6C8500147676;
109 | projectDirPath = "";
110 | projectRoot = "";
111 | targets = (
112 | 58B511DA1A9E6C8500147676 /* VisionCameraRealtimeObjectDetection */,
113 | );
114 | };
115 | /* End PBXProject section */
116 |
117 | /* Begin PBXSourcesBuildPhase section */
118 | 58B511D71A9E6C8500147676 /* Sources */ = {
119 | isa = PBXSourcesBuildPhase;
120 | buildActionMask = 2147483647;
121 | files = (
122 | 591301DFA4771481A686565B /* RealtimeObjectDetectionProcessor.m in Sources */,
123 | );
124 | runOnlyForDeploymentPostprocessing = 0;
125 | };
126 | /* End PBXSourcesBuildPhase section */
127 |
128 | /* Begin XCBuildConfiguration section */
129 | 58B511ED1A9E6C8500147676 /* Debug */ = {
130 | isa = XCBuildConfiguration;
131 | buildSettings = {
132 | ALWAYS_SEARCH_USER_PATHS = NO;
133 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
134 | CLANG_CXX_LIBRARY = "libc++";
135 | CLANG_ENABLE_MODULES = YES;
136 | CLANG_ENABLE_OBJC_ARC = YES;
137 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
138 | CLANG_WARN_BOOL_CONVERSION = YES;
139 | CLANG_WARN_COMMA = YES;
140 | CLANG_WARN_CONSTANT_CONVERSION = YES;
141 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
142 | CLANG_WARN_EMPTY_BODY = YES;
143 | CLANG_WARN_ENUM_CONVERSION = YES;
144 | CLANG_WARN_INFINITE_RECURSION = YES;
145 | CLANG_WARN_INT_CONVERSION = YES;
146 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
147 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
148 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
149 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
150 | CLANG_WARN_STRICT_PROTOTYPES = YES;
151 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
152 | CLANG_WARN_UNREACHABLE_CODE = YES;
153 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
154 | COPY_PHASE_STRIP = NO;
155 | ENABLE_STRICT_OBJC_MSGSEND = YES;
156 | ENABLE_TESTABILITY = YES;
157 | "EXCLUDED_ARCHS[sdk=*]" = arm64;
158 | GCC_C_LANGUAGE_STANDARD = gnu99;
159 | GCC_DYNAMIC_NO_PIC = NO;
160 | GCC_NO_COMMON_BLOCKS = YES;
161 | GCC_OPTIMIZATION_LEVEL = 0;
162 | GCC_PREPROCESSOR_DEFINITIONS = (
163 | "DEBUG=1",
164 | "$(inherited)",
165 | );
166 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
167 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
168 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
169 | GCC_WARN_UNDECLARED_SELECTOR = YES;
170 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
171 | GCC_WARN_UNUSED_FUNCTION = YES;
172 | GCC_WARN_UNUSED_VARIABLE = YES;
173 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
174 | MTL_ENABLE_DEBUG_INFO = YES;
175 | ONLY_ACTIVE_ARCH = YES;
176 | SDKROOT = iphoneos;
177 | };
178 | name = Debug;
179 | };
180 | 58B511EE1A9E6C8500147676 /* Release */ = {
181 | isa = XCBuildConfiguration;
182 | buildSettings = {
183 | ALWAYS_SEARCH_USER_PATHS = NO;
184 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
185 | CLANG_CXX_LIBRARY = "libc++";
186 | CLANG_ENABLE_MODULES = YES;
187 | CLANG_ENABLE_OBJC_ARC = YES;
188 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
189 | CLANG_WARN_BOOL_CONVERSION = YES;
190 | CLANG_WARN_COMMA = YES;
191 | CLANG_WARN_CONSTANT_CONVERSION = YES;
192 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
193 | CLANG_WARN_EMPTY_BODY = YES;
194 | CLANG_WARN_ENUM_CONVERSION = YES;
195 | CLANG_WARN_INFINITE_RECURSION = YES;
196 | CLANG_WARN_INT_CONVERSION = YES;
197 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
198 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
199 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
200 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
201 | CLANG_WARN_STRICT_PROTOTYPES = YES;
202 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
203 | CLANG_WARN_UNREACHABLE_CODE = YES;
204 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
205 | COPY_PHASE_STRIP = YES;
206 | ENABLE_NS_ASSERTIONS = NO;
207 | ENABLE_STRICT_OBJC_MSGSEND = YES;
208 | "EXCLUDED_ARCHS[sdk=*]" = arm64;
209 | GCC_C_LANGUAGE_STANDARD = gnu99;
210 | GCC_NO_COMMON_BLOCKS = YES;
211 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
212 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
213 | GCC_WARN_UNDECLARED_SELECTOR = YES;
214 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
215 | GCC_WARN_UNUSED_FUNCTION = YES;
216 | GCC_WARN_UNUSED_VARIABLE = YES;
217 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
218 | MTL_ENABLE_DEBUG_INFO = NO;
219 | SDKROOT = iphoneos;
220 | VALIDATE_PRODUCT = YES;
221 | };
222 | name = Release;
223 | };
224 | 58B511F01A9E6C8500147676 /* Debug */ = {
225 | isa = XCBuildConfiguration;
226 | buildSettings = {
227 | HEADER_SEARCH_PATHS = (
228 | "$(inherited)",
229 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
230 | "$(SRCROOT)/../../../React/**",
231 | "$(SRCROOT)/../../react-native/React/**",
232 | );
233 | LIBRARY_SEARCH_PATHS = "$(inherited)";
234 | OTHER_LDFLAGS = "-ObjC";
235 | PRODUCT_NAME = VisionCameraRealtimeObjectDetection;
236 | SKIP_INSTALL = YES;
237 | };
238 | name = Debug;
239 | };
240 | 58B511F11A9E6C8500147676 /* Release */ = {
241 | isa = XCBuildConfiguration;
242 | buildSettings = {
243 | HEADER_SEARCH_PATHS = (
244 | "$(inherited)",
245 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
246 | "$(SRCROOT)/../../../React/**",
247 | "$(SRCROOT)/../../react-native/React/**",
248 | );
249 | LIBRARY_SEARCH_PATHS = "$(inherited)";
250 | OTHER_LDFLAGS = "-ObjC";
251 | PRODUCT_NAME = VisionCameraRealtimeObjectDetection;
252 | SKIP_INSTALL = YES;
253 | };
254 | name = Release;
255 | };
256 | /* End XCBuildConfiguration section */
257 |
258 | /* Begin XCConfigurationList section */
259 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VisionCameraRealtimeObjectDetection" */ = {
260 | isa = XCConfigurationList;
261 | buildConfigurations = (
262 | 58B511ED1A9E6C8500147676 /* Debug */,
263 | 58B511EE1A9E6C8500147676 /* Release */,
264 | );
265 | defaultConfigurationIsVisible = 0;
266 | defaultConfigurationName = Release;
267 | };
268 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VisionCameraRealtimeObjectDetection" */ = {
269 | isa = XCConfigurationList;
270 | buildConfigurations = (
271 | 58B511F01A9E6C8500147676 /* Debug */,
272 | 58B511F11A9E6C8500147676 /* Release */,
273 | );
274 | defaultConfigurationIsVisible = 0;
275 | defaultConfigurationName = Release;
276 | };
277 | /* End XCConfigurationList section */
278 | };
279 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
280 | }
281 |
--------------------------------------------------------------------------------
/lefthook.yml:
--------------------------------------------------------------------------------
1 | pre-commit:
2 | parallel: true
3 | commands:
4 | lint:
5 | files: git diff --name-only @{push}
6 | glob: "*.{js,ts,jsx,tsx}"
7 | run: npx eslint {files}
8 | types:
9 | files: git diff --name-only @{push}
10 | glob: "*.{js,ts, jsx, tsx}"
11 | run: npx tsc --noEmit
12 | commit-msg:
13 | parallel: true
14 | commands:
15 | commitlint:
16 | run: npx commitlint --edit
17 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vision-camera-realtime-object-detection",
3 | "version": "0.5.1",
4 | "description": "test",
5 | "main": "lib/commonjs/index",
6 | "module": "lib/module/index",
7 | "types": "lib/typescript/index.d.ts",
8 | "react-native": "src/index",
9 | "source": "src/index",
10 | "files": [
11 | "src",
12 | "lib",
13 | "android",
14 | "ios",
15 | "cpp",
16 | "*.podspec",
17 | "!lib/typescript/example",
18 | "!ios/build",
19 | "!android/build",
20 | "!android/gradle",
21 | "!android/gradlew",
22 | "!android/gradlew.bat",
23 | "!android/local.properties",
24 | "!**/__tests__",
25 | "!**/__fixtures__",
26 | "!**/__mocks__",
27 | "!**/.*"
28 | ],
29 | "scripts": {
30 | "test": "jest",
31 | "typecheck": "tsc --noEmit",
32 | "lint": "eslint \"**/*.{js,ts,tsx}\"",
33 | "prepack": "bob build",
34 | "release": "release-it",
35 | "example": "yarn --cwd example",
36 | "bootstrap": "yarn example && yarn install && yarn example pods",
37 | "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
38 | },
39 | "keywords": [
40 | "react-native",
41 | "ios",
42 | "android"
43 | ],
44 | "repository": "https://github.com/jaroslawkrol/vision-camera-realtime-object-detection",
45 | "author": "Jaroslaw Krol (https://github.com/jaroslawkrol)",
46 | "license": "MIT",
47 | "bugs": {
48 | "url": "https://github.com/jaroslawkrol/vision-camera-realtime-object-detection/issues"
49 | },
50 | "homepage": "https://github.com/jaroslawkrol/vision-camera-realtime-object-detection#readme",
51 | "publishConfig": {
52 | "registry": "https://registry.npmjs.org/"
53 | },
54 | "devDependencies": {
55 | "@evilmartians/lefthook": "^1.2.2",
56 | "@commitlint/config-conventional": "^17.0.2",
57 | "@react-native-community/eslint-config": "^3.0.2",
58 | "@release-it/conventional-changelog": "^5.0.0",
59 | "@types/jest": "^28.1.2",
60 | "@types/react": "~17.0.21",
61 | "@types/react-native": "0.70.0",
62 | "commitlint": "^17.0.2",
63 | "del-cli": "^5.0.0",
64 | "eslint": "^8.4.1",
65 | "eslint-config-prettier": "^8.5.0",
66 | "eslint-plugin-prettier": "^4.0.0",
67 | "jest": "^28.1.1",
68 | "pod-install": "^0.1.0",
69 | "prettier": "^2.0.5",
70 | "react": "18.2.0",
71 | "react-native": "0.71.3",
72 | "react-native-builder-bob": "^0.20.0",
73 | "release-it": "^15.0.0",
74 | "typescript": "^4.5.2",
75 | "react-native-reanimated": "^2.14.4",
76 | "react-native-vision-camera": "^2.15.4"
77 | },
78 | "resolutions": {
79 | "@types/react": "17.0.21"
80 | },
81 | "peerDependencies": {
82 | "react": "*",
83 | "react-native": "*",
84 | "react-native-reanimated": ">=2.1.0",
85 | "react-native-vision-camera": ">=2.0.0"
86 | },
87 | "engines": {
88 | "node": ">= 16.0.0"
89 | },
90 | "packageManager": "^yarn@1.22.15",
91 | "jest": {
92 | "preset": "react-native",
93 | "modulePathIgnorePatterns": [
94 | "/example/node_modules",
95 | "/lib/"
96 | ]
97 | },
98 | "commitlint": {
99 | "extends": [
100 | "@commitlint/config-conventional"
101 | ]
102 | },
103 | "release-it": {
104 | "git": {
105 | "commitMessage": "chore: release ${version}",
106 | "tagName": "v${version}"
107 | },
108 | "npm": {
109 | "publish": true
110 | },
111 | "github": {
112 | "release": true
113 | },
114 | "plugins": {
115 | "@release-it/conventional-changelog": {
116 | "preset": "angular"
117 | }
118 | }
119 | },
120 | "eslintConfig": {
121 | "root": true,
122 | "extends": [
123 | "@react-native-community",
124 | "prettier"
125 | ],
126 | "rules": {
127 | "prettier/prettier": [
128 | "error",
129 | {
130 | "quoteProps": "consistent",
131 | "singleQuote": true,
132 | "tabWidth": 2,
133 | "trailingComma": "es5",
134 | "useTabs": false
135 | }
136 | ]
137 | }
138 | },
139 | "eslintIgnore": [
140 | "node_modules/",
141 | "lib/"
142 | ],
143 | "prettier": {
144 | "quoteProps": "consistent",
145 | "singleQuote": true,
146 | "tabWidth": 2,
147 | "trailingComma": "es5",
148 | "useTabs": false
149 | },
150 | "react-native-builder-bob": {
151 | "source": "src",
152 | "output": "lib",
153 | "targets": [
154 | "commonjs",
155 | "module",
156 | [
157 | "typescript",
158 | {
159 | "project": "tsconfig.build.json"
160 | }
161 | ]
162 | ]
163 | }
164 | }
165 |
--------------------------------------------------------------------------------
/scripts/bootstrap.js:
--------------------------------------------------------------------------------
1 | const os = require('os');
2 | const path = require('path');
3 | const child_process = require('child_process');
4 |
5 | const root = path.resolve(__dirname, '..');
6 | const args = process.argv.slice(2);
7 | const options = {
8 | cwd: process.cwd(),
9 | env: process.env,
10 | stdio: 'inherit',
11 | encoding: 'utf-8',
12 | };
13 |
14 | if (os.type() === 'Windows_NT') {
15 | options.shell = true;
16 | }
17 |
18 | let result;
19 |
20 | if (process.cwd() !== root || args.length) {
21 | // We're not in the root of the project, or additional arguments were passed
22 | // In this case, forward the command to `yarn`
23 | result = child_process.spawnSync('yarn', args, options);
24 | } else {
25 | // If `yarn` is run without arguments, perform bootstrap
26 | result = child_process.spawnSync('yarn', ['bootstrap'], options);
27 | }
28 |
29 | process.exitCode = result.status;
30 |
--------------------------------------------------------------------------------
/src/__tests__/index.test.tsx:
--------------------------------------------------------------------------------
1 | it.todo('write a test');
2 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | /* globals __detectObjects */
2 | import type { Frame } from 'react-native-vision-camera';
3 |
4 | export interface ObjectLabel {
5 | index: number;
6 | /**
7 | * A label describing the image, in english.
8 | */
9 | label: string;
10 | /**
11 | * A floating point number from 0 to 1, describing the confidence (percentage).
12 | */
13 | confidence: number;
14 | }
15 |
16 | export interface DetectedObject {
17 | frameRotation: number;
18 | labels: ObjectLabel[];
19 |
20 | /**
21 | * bounding box of detected object in percentage
22 | */
23 | top: number;
24 | left: number;
25 | width: number;
26 | height: number;
27 | }
28 |
29 | export interface FrameProcessorConfig {
30 | /**
31 | * TensorFlow model file. Should contains extension as well (f.e. model.tflite)
32 | */
33 | modelFile: string;
34 |
35 | scoreThreshold?: number;
36 |
37 | maxResults?: number;
38 |
39 | numThreads?: number;
40 | }
41 |
42 | const defaultFrameProcessorConfig: Partial = {
43 | scoreThreshold: 0.3,
44 | maxResults: 1,
45 | numThreads: 1,
46 | };
47 |
48 | /**
49 | * Returns an array of matching `DetectedObject`s for the given frame.
50 | */
51 | export function detectObjects(
52 | frame: Frame,
53 | config: FrameProcessorConfig
54 | ): DetectedObject[] {
55 | 'worklet';
56 | // @ts-expect-error Frame Processors are not typed.
57 | return __detectObjects(frame, { ...defaultFrameProcessorConfig, ...config });
58 | }
59 |
--------------------------------------------------------------------------------
/tsconfig.build.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "extends": "./tsconfig",
4 | "exclude": ["example"]
5 | }
6 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "vision-camera-realtime-object-detection": ["./src/index"]
6 | },
7 | "allowUnreachableCode": false,
8 | "allowUnusedLabels": false,
9 | "esModuleInterop": true,
10 | "importsNotUsedAsValues": "error",
11 | "forceConsistentCasingInFileNames": true,
12 | "jsx": "react",
13 | "lib": ["esnext"],
14 | "module": "esnext",
15 | "moduleResolution": "node",
16 | "noFallthroughCasesInSwitch": true,
17 | "noImplicitReturns": true,
18 | "noImplicitUseStrict": false,
19 | "noStrictGenericChecks": false,
20 | "noUncheckedIndexedAccess": true,
21 | "noUnusedLocals": true,
22 | "noUnusedParameters": true,
23 | "resolveJsonModule": true,
24 | "skipLibCheck": true,
25 | "strict": true,
26 | "target": "esnext"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vc_rod_demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaroslawkrol/vision-camera-realtime-object-detection/7f5bc94edb3cfeb84e771c82e658168592ea6af2/vc_rod_demo.gif
--------------------------------------------------------------------------------
/vision-camera-realtime-object-detection.podspec:
--------------------------------------------------------------------------------
1 | require "json"
2 |
3 | package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4 | folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5 |
6 | Pod::Spec.new do |s|
7 | s.name = "vision-camera-realtime-object-detection"
8 | s.version = package["version"]
9 | s.summary = package["description"]
10 | s.homepage = package["homepage"]
11 | s.license = package["license"]
12 | s.authors = package["author"]
13 |
14 | s.platforms = { :ios => "11.0" }
15 | s.source = { :git => "https://github.com/jaroslawkrol/vision-camera-realtime-object-detection.git", :tag => "#{s.version}" }
16 |
17 | s.source_files = "ios/**/*.{h,m,mm}"
18 |
19 | s.dependency "React-Core"
20 | s.dependency "TensorFlowLiteTaskVision"
21 |
22 | # Don't install the dependencies when we run `pod install` in the old architecture.
23 | if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
24 | s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
25 | s.pod_target_xcconfig = {
26 | "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
27 | "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
28 | "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
29 | }
30 | s.dependency "React-RCTFabric"
31 | s.dependency "React-Codegen"
32 | s.dependency "RCT-Folly"
33 | s.dependency "RCTRequired"
34 | s.dependency "RCTTypeSafety"
35 | s.dependency "ReactCommon/turbomodule/core"
36 | end
37 | end
38 |
--------------------------------------------------------------------------------