Simple Object Detection Action

The Simple Object Detection Action detects objects in a still image and sends the object information to the destination channel.

By default, the action counts the number of detected objects for the following 6 classes:

In addition, the action detects all supported object classes and returns their information in the objects array. For details, refer to Output Data of the Action.

When Target Object Classes is configured, the action counts and detects only the specified object classes. For details, refer to Target Object Classes.

Configuration

Condition

In the Action Condition section, you can specify the conditions under which the action will be executed using the values (Message or Context) from the event source to the channel. For more details on the expressions you can input, refer to Use Expressions in Actions.

In this input field, you can enter expressions representing data related to the trigger that starts the Flux application (e.g., event.payload.temp) or data related to the channel where the action is added (e.g., payload.temp).

Config

Configure the operation of the Simple Object Detection Action.

Image URL: Specify the URL of the still image to be used for simple object detection. For example, if you are using the Soracom Harvest Files event source in the same Flux App, you can specify ${event.payload.presignedUrls.get} to perform simple object detection on the file uploaded to Soracom Harvest Files.

Target Object Classes

Specify the object classes to detect in the image. If no selection is made, all supported object classes will be targeted for detection. You can select multiple class labels.

Supported class labels
Class Label ID
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

Output

Configure how to handle the output data of the action. Refer to Enable Republishing of Action Output for more details.

Output Data of the Action

By default, the output data includes the count for each of the 6 default classes and the objects array containing all detected objects regardless of class. The following example shows a person and a cup detected in the image:

{
  "person": 1,
  "car": 0,
  "bus": 0,
  "truck": 0,
  "cat": 0,
  "dog": 0,
  "objects": [
    {
      "location": [
        0.42561606168746946,
        0.3883926073710124,
        0.5880238652229309,
        0.8953371047973633
      ],
      "score": 0.6473677158355713,
      "label": "person",
      "ts": "2024-06-17T05:28:24Z"
    },
    {
      "location": [
        0.3454461991786957,
        0.6387763867775599,
        0.39976382851600645,
        0.739234521985054
      ],
      "score": 0.5285048484802246,
      "label": "cup",
      "ts": "2024-06-17T05:28:24Z"
    }
  ]
}

When Target Object Classes is configured (e.g., truck), the action counts and detects only the specified classes. The objects array contains only objects matching the specified classes. For example, when a truck is detected:

{
  "person": 0,
  "car": 0,
  "bus": 0,
  "truck": 1,
  "cat": 0,
  "dog": 0,
  "objects": [
    {
      "location": [
        0.04083414,
        0.21190794,
        0.4107799,
        0.8861815
      ],
      "score": 0.91171336,
      "label": "truck",
      "ts": "2026-03-16T23:39:13Z"
    }
  ]
}

When no objects matching the specified class labels are detected:

{
  "person": 0,
  "car": 0,
  "bus": 0,
  "truck": 0,
  "cat": 0,
  "dog": 0,
  "objects": []
}

The attributes are as follows:

Attribute Description
person Number of detected people.
car Number of detected cars.
bus Number of detected buses.
truck Number of detected trucks.
cat Number of detected cats.
dog Number of detected dogs.
objects[] Information about the objects detected by the Simple Object Detection Action.
objects[].location The position of the detected object within the still image.
objects[].score Confidence score indicating the accuracy of the detected object.
objects[].label Detected object label.
objects[].ts Date and time when the object was detected.