Detecting objects in an image is a major task assigned to deep-learning models these days. And the main family of algorithms doing object detection right now is YOLO: You Only Look Once.

There are many excellent stories about YOLO here on Medium, and I do not wish to attempt a new one…

One of the main issues with Deep Learning models is their use of vast computational resources. This is certainly true of the training process, but the issue often leaks into deployment as well: running a trained deep model can require quite a bit of hardware.

There’s a lot of ongoing research about making models smaller. It would be great, for example, if we could run deep models on our phones.

What about YOLO? Well, most of the trained YOLO models are available on GitHub:

GitHub – AlexeyAB/darknet: YOLOv4 / Scaled-YOLOv4 / YOLO – Neural Networks for Object Detection (Windows and Linux version of Darknet )

Lo and behold, there are some small models, such as Tiny-YOLOv7!

Are they small enough to run on a mobile device?

Well, I turned to Unity, a game engine that has been used to create over half of existing mobile games (possibly as high as 60% or 70% of mobile games).

Unity Real-Time Development Platform | 3D, 2D, VR & AR Engine

Unity has an Asset Store, with numerous shared packages, which make a game designer’s life easier. Further, you can compile your game into a number of platforms, including mobile devices.

Well, using Unity, along with various assets, I was indeed able to build an app, coaxing my phone into running object detection in real-time.

To make things more fun, I designed two simple games:

More Merrier: Try to find as many kinds of objects as you can. The maximum is 80, which is the size of the MS COCO (Microsoft Common Objects in Context) dataset YOLO was trained on.Treasure Hunt: Try to find the treasure piece…

Here’s the link to my app.


Realtime Object Detection On Your Phone was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.

​ Level Up Coding – Medium

about Infinite Loop Digital

We support businesses by identifying requirements and helping clients integrate AI seamlessly into their operations.

Gartner Digital Workplace Summit Generative Al

GenAI sessions:

  • 4 Use Cases for Generative AI and ChatGPT in the Digital Workplace
  • How the Power of Generative AI Will Transform Knowledge Management
  • The Perils and Promises of Microsoft 365 Copilot
  • How to Be the Generative AI Champion Your CIO and Organization Need
  • How to Shift Organizational Culture Today to Embrace Generative AI Tomorrow
  • Mitigate the Risks of Generative AI by Enhancing Your Information Governance
  • Cultivate Essential Skills for Collaborating With Artificial Intelligence
  • Ask the Expert: Microsoft 365 Copilot
  • Generative AI Across Digital Workplace Markets
10 – 11 June 2024

London, U.K.