Skip to main content

Simple Object Detection Action

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

Copy/Save

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 detected objects for the following 6 default classes: Person, Car, Bus, Truck, Cat, and Dog. In addition, all detected objects (including other classes) are included in the objects array.

You can optionally configure Target Object Classes to specify which object classes to include in the detection results. When configured, the action filters detections so that only the specified object classes are included in the objects array, and the output still returns count fields only for the 6 default classes.

Configuration

In the Action Condition input field, 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.

Configuring Simple Object Detection Action

The Image URL field supports expressions.

  • Image URL: Specify the URL of the still image to be used for simple object detection.
    • Example expression: ${event.payload.presignedUrls.get} (to perform simple object detection on a file uploaded to Soracom Harvest Files).
  • Target Object Classes: Specify the object classes to include in the detection results. If no selection is made, all supported object classes will be targeted for detection. You can select multiple object classes. For a full list, refer to Supported Object Classes.

Output

Set up how the action's output data will be processed. 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 an objects array containing all detected objects. The objects array includes objects from both the default classes and other supported classes. 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"
    }
  ]
}

The count fields are provided only for the 6 default classes. Other detected object classes are included in the objects array but are not counted in separate fields.

When Target Object Classes is configured (e.g., truck), the action filters the detection results so that only objects belonging to the specified object classes are included in the objects array. The response still contains count fields only for the 6 default classes. These counts reflect detections of those default classes within the filtered results. 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 object classes are detected:

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

The output data includes the following attributes:

FieldDescription
personNumber of detected people.
carNumber of detected cars.
busNumber of detected buses.
truckNumber of detected trucks.
catNumber of detected cats.
dogNumber of detected dogs.
objects[]Information about the objects detected by the Simple Object Detection Action.
objects[].locationThe position of the detected object within the still image.
objects[].scoreConfidence score indicating the accuracy of the detected object.
objects[].labelDetected object label.
objects[].tsDate and time when the object was detected.

Supported Object Classes

Class LabelIDClass LabelID
AirplaneairplaneMicrowavemicrowave
AppleappleMotorcyclemotorcycle
BackpackbackpackMousemouse
BananabananaOrangeorange
Baseball Batbaseball batOvenoven
Baseball Glovebaseball gloveParking Meterparking meter
BearbearPersonperson
BedbedPizzapizza
BenchbenchPotted Plantpotted plant
BicyclebicycleRefrigeratorrefrigerator
BirdbirdRemoteremote
BoatboatSandwichsandwich
BookbookScissorsscissors
BottlebottleSheepsheep
BowlbowlSinksink
BroccolibroccoliSkateboardskateboard
BusbusSkisskis
CakecakeSnowboardsnowboard
CarcarSpoonspoon
CarrotcarrotSports Ballsports ball
CatcatStop Signstop sign
Cell Phonecell phoneSuitcasesuitcase
ChairchairSurfboardsurfboard
ClockclockTeddy Bearteddy bear
CouchcouchTennis Rackettennis racket
CowcowTietie
CupcupToastertoaster
Dining Tabledining tableToilettoilet
DogdogToothbrushtoothbrush
DonutdonutTraffic Lighttraffic light
ElephantelephantTraintrain
Fire Hydrantfire hydrantTrucktruck
ForkforkTVtv
FrisbeefrisbeeUmbrellaumbrella
GiraffegiraffeVasevase
Hair Drierhair drierWine Glasswine glass
HandbaghandbagZebrazebra
Horsehorse
Hot Doghot dog
Keyboardkeyboard
Kitekite
Knifeknife
Laptoplaptop
Search Esc to close / Enter to view results