Get Started
Object Detection
On this page
  1. Commands
  2. Settings
  3. Output Variables
  4. JSON Output

Object Detection

Detects 80 kinds of common objects such as people and vehicles in real time from the camera video. The classes are the 80 of the COCO dataset, and several can be selected together.

Commands

CommandDescription
Object Detected?Checks whether any of the selected classes is detected.
Count ObjectsWrites the total number of objects of the selected classes.
Get ObjectWrites the class name, confidence, center point, and width and height of one object of the selected classes, chosen by Select By.
Get All ObjectsWrites every detected object as JSON.

When a Detection Zone is set, every command considers only the objects inside it.

Which objects and which part of the frame are covered is set in the settings, not by the command. To watch specific objects, select only those classes in Object; to watch every object regardless of class, use Select all to select all 80 classes. To watch only part of the frame, set a Detection Zone. For example, the total number of objects inside a zone is obtained with the Count Objects command, all 80 classes selected, and a detection zone. At least one class must be selected in Object.

Settings

SettingDescription
ObjectThe kinds of object to detect. Several of the 80 classes can be selected; the default is Person.
Confidence (%)0 to 100, default 50.
Detection ZoneSee Common Items.
Select ByHighest Confidence (default), By Confidence Index (0-based), Largest Size, Closest From Ref. Point.
Index (0-based)0 to 15, default 0. Ordered from the highest confidence.
Reference PointSee Common Items.

Output Variables

FieldTypeValue
DetectedDigitalTrue when an object is detected.
CountNumberNumber of detected objects.
ObjectTextClass name of the selected object (English, e.g. person).
Confidence (%)NumberConfidence of the selected object, 0 to 100.
Center Point X / Center Point YNumberPixel coordinates of the selected object's center.
Width (Pixels) / Height (Pixels)NumberSize of the selected object's box.
Output (JSON Text)TextArray of every detected object.

JSON Output

An array with, per object, class_name, confidence (0 to 100), the two box corners in bbox, the center, width, and height.

[
  {
    "class_name": "person",
    "confidence": 85,
    "bbox": { "x1": 100, "y1": 50, "x2": 300, "y2": 400 },
    "center": { "x": 200, "y": 225 },
    "width": 200,
    "height": 350
  },
  {
    "class_name": "car",
    "confidence": 72,
    "bbox": { "x1": 400, "y1": 200, "x2": 550, "y2": 300 },
    "center": { "x": 475, "y": 250 },
    "width": 150,
    "height": 100
  }
]
The 80 detectable objects

The screen shows the display name; variables and JSON hold the class name in parentheses.

Person (person), Bicycle (bicycle), Car (car), Motorcycle (motorcycle), Airplane (airplane), Bus (bus), Train (train), Truck (truck), Boat (boat), Traffic Light (traffic light), Fire Hydrant (fire hydrant), Stop Sign (stop sign), Parking Meter (parking meter), Bench (bench), Bird (bird), Cat (cat), Dog (dog), Horse (horse), Sheep (sheep), Cow (cow), Elephant (elephant), Bear (bear), Zebra (zebra), Giraffe (giraffe), Backpack (backpack), Umbrella (umbrella), Handbag (handbag), Tie (tie), Suitcase (suitcase), Frisbee (frisbee), Skis (skis), Snowboard (snowboard), Sports Ball (sports ball), Kite (kite), Baseball Bat (baseball bat), Baseball Glove (baseball glove), Skateboard (skateboard), Surfboard (surfboard), Tennis Racket (tennis racket), Bottle (bottle), Wine Glass (wine glass), Cup (cup), Fork (fork), Knife (knife), Spoon (spoon), Bowl (bowl), Banana (banana), Apple (apple), Sandwich (sandwich), Orange (orange), Broccoli (broccoli), Carrot (carrot), Hot Dog (hot dog), Pizza (pizza), Donut (donut), Cake (cake), Chair (chair), Couch (couch), Potted Plant (potted plant), Bed (bed), Dining Table (dining table), Toilet (toilet), TV (tv), Laptop (laptop), Mouse (mouse), Remote (remote), Keyboard (keyboard), Cell Phone (cell phone), Microwave (microwave), Oven (oven), Toaster (toaster), Sink (sink), Refrigerator (refrigerator), Book (book), Clock (clock), Vase (vase), Scissors (scissors), Teddy Bear (teddy bear), Hair Drier (hair drier), Toothbrush (toothbrush)