raspberry pi

Turn Your Camera into an AI Brain: RDK X5 Object Detection with YOLO

Last Updated on December 18, 2025 by Engr. Shahzada Fahad

D-Robotics RDK X5:

Let me start with a simple question.

What if your camera could decide when to turn something on?

Previously, we controlled an LED through a graphical user interface.

But today, the LED will react automatically… based on what the camera sees.

So, in this tutorial, you will learn how to implement RDK X5 object detection using a camera and landmarks from YOLO deep learning models.

We will build a real-time AI system that detects people and objects and automatically controls hardware devices like LEDs, relays, or buzzers.

This guide covers camera setup, SSH & VNC access, real-time object detection, and GPIO automation on the D-Robotics RDK X5.

Camera-based automation using YOLO on RDK X5

By the end of this article, you will know how to detect any object from the entire coco.names list; and use those detections to control real-world devices. I am using an LED on pin 37 as an example.

But the real magic happens when we bring in YOLO.

We are creating a smart two-zone system: Normal and Prohibited.

And the moment someone enters the prohibited zone… the LED instantly lights up.

And of course, you can replace the LED with anything; a buzzer, a relay, or even a camera trigger. Once your system can detect a person and switch a pin… your automation projects suddenly become unlimited.




Amazon Links:

RDK X5 Development Board

HDMI Screen

Keyboard and Mouse

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Before we get started, I want to give a huge shout-out to Meshnology for sending over the RDK X5 Developer Kit. Their support makes articles like this possible!

If you haven’t checked them out yet, seriously; take a minute and visit their website at meshnology.com. They have an amazing lineup of embedded systems, development boards, IoT solutions, and so many cool products that makers, engineers, and hobbyists will love. Highly recommended!

OpenCV installation process on RDK X5 for object detection

Right now, I am on the desktop; just like in the previous article.

I can control everything directly on the RDK X5 using a keyboard and mouse…

but today, let’s make things a little more interesting.

Instead of sitting in front of the board, why not access it directly from a laptop?



This single change gives us two massive advantages:

Number one:

You can install your system in a safe, permanent location and access it remotely whenever you want.

You can run different codes, make changes, test new features—all without physically touching the device.

Whether you are in another room, in your studio, or relaxing on your bed, you can control the entire RDK X5 setup with complete freedom.

Number two:

If you are a content creator like me, this workflow is a game-changer.

Every command you run, every tweak you make; you can document it instantly on your laptop.

You can download any file or folder from the RDK X5 directly, keep everything organized, and work much faster without breaking your creative flow.

Number Three:

Screen recording becomes so much easier.

Instead of pointing a camera at a display or capturing low-quality footage, you can record your laptop screen directly.

So today, not only are we upgrading our LED control using image processing and smart detection zones…

We are also upgrading the way we interact with the RDK X5 itself.



Enable SSH and VNC for RDK X5 Object Detection Development

So, let’s begin by doing the most important thing—enabling SSH and VNC.

Because before we can control the RDK X5 from our laptop, we need a secure and reliable way to access it remotely.

Let’s set that up first.

Simply right-click anywhere on the desktop and select “Open Terminal Here.”

Now type this command:

Go to Interface Options, and here you have three choices.

VNC and SSH setup screen for rdk x5 object detection development

You can enable only SSH, which gives you remote command-line access, or

you can enable only VNC, which gives you a full graphical desktop remotely, or;

my personal recommendation; you can enable both.

I have both enabled for a reason.

When you are using VNC, you can control the desktop just like you are sitting in front of the RDK X5…

but you can’t directly download files or folders from the device to your laptop.

Maybe there’s some hidden workaround; I am not sure; but I haven’t found one that works smoothly.

And that’s exactly where SSH becomes incredibly powerful.

Through SSH, you can transfer any file or folder from the RDK X5 to your laptop in just a few seconds.

For now, go ahead and enable both options.

I already have SSH enabled, and you will enable VNC the exact same way.

And with that… we are done with the RDK X5 side of the setup.



Now, on the laptop side;

Go to this website

MobaXterm interface used for rdk x5 object detection SSH and remote access setup

Head over to the official MobaXterm website and download the Portable Edition of the software.

It’s lightweight, it runs without installation, and it gives you everything you need; SSH, VNC, SFTP, and more; all in one place.

After you open the MobaXterm software; click on Session.

Now let’s go ahead and click on VNC inside MobaXterm.

Step-by-step VNC configuration for rdk x5 object detection system

Before connecting, make sure both your laptop and the RDK X5 are on the same WiFi network or connected to the same router.

This is important; otherwise, they simply won’t see each other.

Next, you will need the IP address of your RDK X5.

If you don’t already know it, don’t worry; there’s an easy way to find it.

Just open the Command Prompt on your laptop and type:

This command will show you a list of all the devices currently connected to your network, along with their IP addresses.

List of connected devices and IP addresses on WiFi router dashboard for rdk x5 object detection setup

Look through the list, find the one that matches your RDK X5, and that’s the address you need.

Simply enter that IP address into the VNC window and press Enter.

VNC remote view of RDK X5 during object detection development

And just like that; within a second; you will be connected to the RDK X5’s desktop.

No complicated networking, no technical jargon… it just works.

I already have the RDK Stereo Camera Module connected to the RDK X5 board.

What this stereo camera actually is, its complete specifications, and how to connect it properly to the RDK X5; I have already covered all of that in my Getting Started article on the RDK X5.




I have also connected the LED to pin 37, and if you want to learn how to control GPIO pins on the RDK X5, I explained everything in detail in my second article.

With that said… our entire setup is now ready to go.                                        

While you are still on the desktop, go ahead and open the File System.

From there, navigate to the app folder… and then open the pydev_demo directory.

RDK X5 PyDev environment running object detection sample code

Inside this folder, you will notice there are a lot of example projects; everything from simple tests to real-time video streaming demos. For our work, we are interested in the third folder, the one designed specifically for real-time streaming. So let’s open that.

Camera not opening problem resolved for rdk x5 object detection

Now, here’s the interesting part.

If you try to open this Python file and run it directly from the interface; it won’t work.

As you can see in the image above.

As you can see, there’s no live video feed, no camera output, nothing happening.

That’s because this example must be executed through the terminal.

Right-click anywhere inside the folder and select “Open Terminal Here.”

Running camera access code via terminal on RDK X5 for object detection

This will open a terminal window already pointed to the correct directory, so we don’t need to type any long paths.



Now, to run the mipi_camera.py file, simply enter this command:

Hit Enter…

Live video streaming on RDK X5 for rdk x5 object detection testing

and now you will get proper, real-time video streaming from the RDK camera module—exactly the way this example is intended to run.

This code is capable of detecting all the objects listed inside the coco.names file. For example, since I am currently in front of the camera, its printing “person is in the picture.” And now If I hold a keyboard in front of it, the detection changes and it starts printing “keyboard.”

RDK X5 detecting objects in real time using camera input

And you can try this with anything; place different objects in front of the camera and you will see the detections update in real time.

But my goal here is a little different.

I want the LED to turn ON only when a specific object appears.

For example, I want the LED to turn on only when the camera detects a person.

If it detects anything else keyboard, cup, bottle, whatever; the LED should remain OFF.

So I have modified the original code and made it much more user-friendly.

Now, all you have to do is type the name of the object you want to trigger the LED. That’s it.

Right now, I have set it to “person”, which means the LED will turn ON only when a human is detected.



Object Detection and LED Control:

First, we will test it with a person…and after that, we will test it again using “car” to show how easily you can switch objects and change the behavior.



Alright, let’s go ahead and run this code.

Human detection triggering LED control using rdk x5 object detection

As you can see, the LED is currently OFF, because there is no one in front of the camera.

Now watch this; the moment I step into the frame…

Human detection controlling devices with RDK X5 image processing

the LED instantly turns ON.

This is mind-blowing.

Real-time object detection, controlling physical hardware; all happening directly on the RDK X5.

Now, let’s take it one step further and test it with “car.”

I have changed the target object from person to car, and look at this:

Specific object recognition using rdk x5 object detection

Even though I am right here in the frame, the LED does NOT turn on anymore.

It will only turn on when the camera detects a car.

RDK X5 recognizing vehicles with camera-based object detection

This level of precision is absolutely amazing.

And that’s not all; I have written several more examples that you can try out yourself.

All these additional codes are available on my Patreon.




You will also find multiple YOLO-related samples inside the RDK X5.

RDK X5 YOLO demo showcasing real-time object detection

Open the 6th folder — Yolov3_sample.

YOLO example project demonstrating rdk x5 object detection

This example detects objects inside a static image called kite.jpg.

When I ran the script, it produced this output image…

YOLO-based rdk x5 object detection in real-time environment

And just look at the accuracy.

YOLO v3 has identified all the objects with impressive confidence.

Now, if you have followed my earlier work, you will remember that I once used YOLO v3 with the ESP32-Camera module…

and on top of that, I built a complete virtual laser security system using Python, OpenCV, and MediaPipe pose landmarks.

No PIR sensors.

No ultrasonic sensors.

No physical wires or tripwires.

Just pure AI.

MediaPipe body landmarks used with rdk x5 object detection

MediaPipe gives you 33 highly accurate body landmarks, and by tracking even a single one—like landmark 31, which we used last time—I was able to detect when someone crossed a line or entered a restricted zone with insane accuracy.



And now…

I have implemented that same concept on the RDK X5 as well.

Security system powered by rdk x5 object detection using YOLO

Think of that green line on the screen as our virtual laser.

And the best part?

You are not limited to a straight line. You can draw complex regions, custom shapes, entire zones; and then track whether a person or object enters them.

Right now, one side of the line is the Normal Area, and the other side is the Prohibited Area.

As you can see, I am standing in the normal area, so the LED is OFF.

Zero false triggering.

Zero noise.

Pure logic.

But the moment I step into the prohibited area…

Smart surveillance using rdk x5 object detection and YOLO

The LED turns ON.

And it will stay ON as long as I remain inside this restricted zone.

The moment I step back into the normal area…

Human landmark security system using rdk x5 object detection

The LED switches OFF again.

This is exactly how virtual security systems should behave; precise, reliable, and fully customizable.



Applications of RDK X5 Object Detection

  • AI-powered security and surveillance systems
  • Smart home automation using camera-based detection
  • Industrial safety monitoring
  • Road safety monitoring
  • Access control and intrusion detection
  • Robotics and autonomous systems

Conclusion: RDK X5 Object Detection Made Easy

In this guide, we successfully implemented RDK X5 object detection using a camera and landmarks from YOLO deep learning models.
By combining real-time AI vision with GPIO control, we created a powerful automation and security system that runs entirely on the RDK X5.
This approach opens the door to advanced AI-powered projects such as smart surveillance, access control, and robotics applications.

Frequently Asked Questions About RDK X5 Object Detection

Can RDK X5 run real-time object detection?

Yes, the RDK X5 is capable of running real-time object detection using optimized YOLO models, making it suitable for AI vision and automation applications.

Is YOLO supported on RDK X5?

YOLO models can be deployed on RDK X5 using compatible AI frameworks, enabling fast and accurate object detection from camera input.

Which camera works best for RDK X5 object detection?

USB cameras and stereo cameras officially supported by RDK X5 work well for object detection, especially when using real-time video streams.

Can RDK X5 control hardware using object detection?

Yes, detected objects can trigger GPIO outputs on RDK X5, allowing you to control LEDs, relays, buzzers, or other hardware devices automatically.

If you want the complete code, I have uploaded all the scripts, resources, and project files on Patreon. Your support truly means a lot; thank you!

So; that’s all for now.



Watch Video Tutorial:

 


Discover more from Electronic Clinic

Subscribe to get the latest posts sent to your email.

Engr. Shahzada Fahad

Engr. Shahzada Fahad is an Electrical Engineer with over 15 years of hands-on experience in electronics design, programming, and PCB development. He specializes in microcontrollers (Arduino, ESP32, STM32, Raspberry Pi), robotics, and IoT systems. He is the founder and lead author at Electronic Clinic, dedicated to sharing practical knowledge.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Discover more from Electronic Clinic

Subscribe now to keep reading and get access to the full archive.

Continue reading

Electronic Clinic
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.