Thumbnail

Darknet YOLO (Obj Detection)

Avatarptp

You only look once (YOLO) is a state-of-the-art, real-time object detection system. using Tiny YOLOv3 a very small model as well for constrained environments (CPU Only, NO GPU)

Requires ARC v5 (Updated 11/3/2020)

How to add the Darknet YOLO (Obj Detection) 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 Darknet YOLO (Obj Detection) 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 Darknet YOLO (Obj Detection) robot skill.


How to use the Darknet YOLO (Obj Detection) robot skill

You only look once (YOLO) is a state-of-the-art, real-time object detection system. using Tiny YOLOv3 a very small model as well for constrained environments (CPU Only, NO GPU)

Darket YOLO website: https://pjreddie.com/darknet/yolo/

Requirements: You only need a camera control, the detection is done offline (no cloud services).

User-inserted image

User-inserted image

  1. start the camera.
  2. check the Running (check box)

The detection will run continuously when the detection results change an On Changes script is executed (check the configuration area):

User-inserted image

  1. Press config
  2. Edit the on changes script
  3. on changes Javascript script

you can run the detection on demand, javascript:

controlCommand("Darknet YOLO", "Run");

The above command runs the configured on demand script.

An example of script:

var numberOfRegions=getVar('$YOLONumberOfRegions');
if (numberOfRegions==0)
{
   Audio.sayWait('No regions found');
}
else
{
   Audio.sayWait('Found ' + numberOfRegions + ' regions');
        var classes = getVar('$YOLOClasses');
        var scores = getVar('$YOLOScores');
        for(var ix=0; ix        {
           Audio.sayWait('Found ' + classes[ix] + ' with score: ' + (classes[ix]*100) + '%');
   }
}

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

#49  

Hi,

I have been using this skill for some time and I am very glad that you created it! I do have a couple of questions:

  1. is there any EASY way to REMOVE objects from its list? I want to remove objects that my robot will never encounter.
  2. is there any way from within ARC to define new objects? I understand that defining new objects (using thousands of photos) is a very CPU intensive operation.
  3. is it possible to add other DarkNet/Yolo objects from other datasets?
PRO
USA
#50  

Quote:

1. is there any EASY way to REMOVE objects from its list? I want to remove objects that my robot will never encounter.
Are you asking for an "ignore" / black list ? It's possible. If your are asking to remove classes e.g.  elephants, horses, zebras to speed up the detection, that it's not possible.

Quote:

2. is there any way from within ARC to define new objects?
 ARC has a camera control that allows training new custom objects using a camera: https://synthiam.com/Support/Skills/Camera/Camera-Device?id=16120#objectTracking

Quote:

3. is it possible to add other DarkNet/Yolo objects from other datasets?
It's possible to improve the plugin to specify a custom Yolo dataset, there are a few Yolo framework implementation versions i.e. v3, v2, v4,v5. If you have one in particular please share the URL and I can try to see if is compatible with the plugin.

It's not possible to use multiple datasets in a single inference process.

#51  
  1. Thanks.:)
  2. Does the ARC camera control support YOLO objects?
  3. I'll take a look. Thanks!:)
#52  

Can I port the On Changes Script over to EZ-Script, Blockly, or Python, or is only JavaScript supported for this skill?

Thomas Messerschmidt

PRO
Synthiam
#53   — Edited

There's a standard dialog for editing scripts - it's the same editor in all ARC scripts. You can select the language you wish to use by a tab on the top. There's more information on this page about how the script editor works and languages: https://synthiam.com/Support/Programming/code-editor/edit-scripts

Scroll to the bottom, and you can read that relevant section of the page. You can use the support section to find additional information about using ARC.

*edit: or this step of the getting started guide is quite popular: https://synthiam.com/Support/Get-Started/how-to-make-a-robot/choose-skill-level

#54  

So I assume you meant that just because the "On Changes Script" was written in JavaScript, it could have just as easily been written in the other 3 languages. I had assumed that there was JavaScript code used that would not work in the other languages. I guess I could have tried rewriting it myself. I've been a bit overwhelmed trying to get the last two Simone articles out.

Thanks.

PRO
Synthiam
#55  

Yeah, that's precisely what you'll have to do. Why would you want it in another language? The Javascript compiler is 100 times faster (or something comparable) than ezscript.