Thumbnail

Tiny Yolo2

by Synthiam

Object detection is fundemental to computer vision: Recognize what the objects are inside the robot camera and also where they are in the image.

Requires ARC v13 (Updated 11/26/2023)

How to add the Tiny Yolo2 robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Camera category tab.
  5. Press the Tiny Yolo2 icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Tiny Yolo2 robot skill.


How to use the Tiny Yolo2 robot skill

Object detection is fundamental to computer vision: Recognize the objects inside the robot camera and where they are in the image. This robot skill attaches to the Camera Device robot skill to obtain the video feed for detection.

Demo

Directions

  1. Add a Camera Device robot skill to the project

  2. Add this robot skill to the project. Check the robot skill's log view to ensure the robot skill has loaded the model correctly.

  3. START the camera device robot skill, so it displays a video stream

  4. By default, the TinyYolo skill will not detect objects actively. Check the "Active" checkbox to begin processing the camera video data stream.

  5. Detected objects use the Camera Device robot skill features. The tracking On Tracking Start script will execute when objects are detected, and $CameraObject_____ variables will be populated. Check the Camera Device robot skill page for a list of camera variables.

Camera Device Integration

This robot skill integrates with the camera device by using the tracking features. If the servo tracking is enabled, this robot skill will move the servos. This is an extension of the camera robot skill. The On Tracking Start script will execute, and camera device variables will be populated when tracking objects.

Performance

In HD webcam resolution, Tiny Yolo is processing 30+ FPS with 38% CPU, sometimes more, depending on the processor of your PC.

User-inserted image

Variables

The detected objects are stored in global variables in the array provided by the camera robot skill. The number of detected objects determines the size of the array. The detected object's location, confidence, and name are all stored in variables. Detected objects use the Camera Device robot skill features. The tracking On Tracking Start script will execute when objects are detected, and $CameraObject_____ variables will be populated. Check the Camera Device robot skill page for a list of camera variables.

User-inserted image

Trained Objects

Tiny Yolo robot skill includes an ONNX model with 20 trained objects. They are... "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"

The ImageNetData is trained with the image resolution of 416x416 because it uses the TINY model. Regular-sized models are trained at 608x608.

ToDo

  • control commands for starting, stopping
  • ability to specify custom training model files

ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

#17  

Hi DJ. I noticed the boxes that appear around detected objects onscreen. The text was tiny and unreadable in the highest resolution I was previously stuck with. I had expected to see the plugin updating with the detected objects because that is the way it works in the video.

PRO
Synthiam
#18  

Does the new debug work for you? I can make it so the debug value saves with the project configuration as well - if it's something you'd like to see on every frame

PRO
USA
#19   — Edited

Are the pictures captured in a file, stored on your laptop like PTP's DarkNet Yolo stores the files is a captured files ?

The reason I a asking is, I like deleting the captured files to save on storage on my laptop -  I do delete the DArkNet Yolo files / pictures in the C:...Documents\YOLO.Plugin\Captures folder

thanks

EzAng

PRO
Synthiam
#20  

There’s no files saved. Do not delete any files

PRO
USA
#21  

got it

thanks

EzAng

PRO
Netherlands
#22  

Any chance that I can load my own Yolo or ONNX trained neural network in this skill?

PRO
Synthiam
#23  

Yeah, you totally can. There's a folder that contains the data file. It'll be in the plugin folder, which should be something like...

Quote:

C:\ProgramData\ARC\Plugins\19a75b67-c593-406c-9789-464aa3ba998b

I can quickly change the robot skill to allow you to select your own data file if you'd like. I don't think that exists in this.