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

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

PRO
USA
#17  

@amin: Thanks, 35Mb file uploaded with success.

@Smarty: Fixed.

@All: Model file is now is included with the plugin.

PRO
Canada
#18  

wow  PTP you are amazing. This is excellent. FIVE STARS

PRO
USA
#19  

Your program works well,

I have been using DJ's Train Vision Object By Script =  works well also

thanks for all your work

EzAng

Germany
#20   — Edited

@ptp

now I have another problem. If I use "run detection only" all is fine. a perfect live video. If I unmark "run detection only" the video takes 15 seconds to show another frame. no smoothly live video. YOLOv2 was both together: a perfect frame video and voice playback (with the non stop playback problem). YOLOv3 now has a frame problem.:D

PRO
USA
#21  

@Smarty, New update with minor optimizations.

Regarding the delay: before (v2) during the script execution the detection results were queued, and that was the cause of the bug i.e. after you stop the detection the queue was still begin processed.

To solve the bug I stop the execution while the onchanges script is being executed. I presume the 15 seconds must be delay processing the script

Can you add the javascript code:

Quote:

//do nothing
to OnChanges script.

And try to see if the delay is relevant ?

If you are using EZ-Script I recommend changing to Javascript, EZ-Script is very slow.

Post your EZ-Script if you need help converting to Javascript.

PRO
USA
#22   — Edited

YOLO is the acronym of the phrase "you only live once"  lol

thanks again for the app, control

EzAng.

#23   — Edited

In this case it actually means "You Only Look Once" of course referring to the urban slang...but it is describing the way the algorithm is working. Kinda a cool Tagline for a sopisticated mathematical operation!!:D

PRO
USA
#24  

How are you Mickey?

What are you up to?

EzAng