You can find the full project (Jupyter notebooks, distributed jobs, NodeRed flows, etc..) that is forkable on Onepanel here: https://c.onepanel.io/onepanel-demo/projects/mobile-demo/overview
This app showcases a full pipeline, right from data captute using remote devices and uploading to Onepanel datasets using API's hosted at Onepanel workspaces, using these data to annotate using CVAT at Onepanel at training model , deploying these models using API's and how to consume them using remote / mobile devices.
This application is targeted to run on android and ios devices.
Currently, the application host the following features,
- On-device object detection using SSD models trained on Onepanel.
- On-device object classification using models trained on Onepanel.
- Record & Upload video dataset to train model running in upstream server hosted on Onepanel workspaces.
- Configurable API endpoints to classify, detect and upload dataset. These API endpoints are hosted in Onepanel workspaces.
- Supports multiple model types to run inference realtime on device. (currently not configurable)
This application is a React Native Project and the base of the application is built from the create-react-native-app
cli tool.
The application expects the following tools installed to build the application.
#1. NodeJS
You can download the binaries for NodeJs from here.
For more comprehesive guide on installation for your OS refer the link Windows / Mac
#2. Yarn
The project uses yarn for node package management over npm.
You can download the binaries for yarn from here
Select the Operating System and Version to find the comprehensive instruction on how to setup yarn for your system.
#2. CocoaPods (only required for building iOS app)
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects, its required for IOS deployment.
Refer here on how to install CocoaPods
#4. React Native CLI
You need to have the react native environment setup for running or building this project.
For more information on how to setup you environment for react-native head over here
Make sure to see instruction for React Native CLI Quickstart and not for Expo CLI Quickstart
NOTE:
For compiling apps for android and ios react native requires you to have Android Studio (or Android SDK) and Xcode installed on your system
Now that we have our environment ready, we need to install our application dependencies.
Firstly, Change your directory to the root of the cloned repository, and run
yarn install
to install all the node dependencies for this application.
Wait until the dependencies are finished installing.
Thats it !
Now, Its time for deployment.
Deploying to a simulator
- Open Android Studio to create and run an android simulator
- Run this command
react-native run-android
Deploying to an android physical device,
-
Connect the physical android device via USB cable and make sure USB debugging is enabled (You can find more information here on how to enable USB debugging here)
-
Run this command
react-native run-android
Don't diconnect the USB cable while the app is getting installed, and wait for the build files to be download to your after installation.
Now, you should see the application running on your android device.
Deploying to a simulator
Follow the guide here to run deploy it on a simulator.
Deploying to an IOS physical device,
Follow the guide here to run the ios application on your device.
- React Native - A framework for building native apps using React
- NativeBase Native Environment to build Native Apps
- Yarn - Dependency Management NodeJs
- Gradle - Dependency Management Android
- CocoaPods Dependency Management for IOS
See also the list of contributors who participated in this project.
- shaqian/tflite-react-native cross platform react native plugin to run model on images.
- react-native-camera The comprehensive camera module for React Native
- Others