Object Detection on Samsung Note 20 Ultra
Nov 05, 2020Step 1 - Download Opencv4 Unity
So, this tutorial assumes that you already have Unity Installed as well as Android Build Tools Module. I’m using Unity 2019.3.0. If you haven’t already gotten OpenCV4Unity, then do so and then go ahead and import the Package. I’m currently using Version 2.4.0.
Step 2 - Get the Models and weights
So we are going to test out 2 pretrained models: MobileNet SSD and Tiny-Yolov4. If you are interested in retraining yolo4 model, then you can check out our YOLOv4 PRO course! That shows you all the steps that you need for transfer learning to build your own custom apps. Click here to enroll
To get the models you can download them here:
which contains the weights and config files for both these models.
Back in Unity. You will need to move the stream assets folder to under assets. This is really important, otherwise, it wont work. And then in the dnn folder, copy all the files we’ve downloaded for the two models right here. Cool!
Now we should be able to run the detectors. So if we run it on my PC, you can see that we getting more or less 90 FPS, however with YOLOv4-Tiny, we are just getting a mere 7FPS. Now just note that we are not making use of a GPU.
The evaluation of these models will be later in this video, for now lets first deploy the models to our Android Device.
Step 3 - Deploy to Android
To deploy the app to android, all you have to do is go to build settings, add in our scene. Make sure your device is also plugged in with USB debugging mode activated.
It will prompt as to where to where you want to name your apk to. We’ll just call ours MobileNet SSD and let it deploy to our smartphone. We’ll repeat this process for the tiny-YOLOv4
Stay connected with news and updates!
Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.
We hate SPAM. We will never sell your information, for any reason.