Unattended bag detection API

Check for bags, backpacks and suitcases with nobody next to them.

What it detects

Review bags left in lobbies, concourses and public spaces.

Detection
A bag, backpack or suitcase with no person next to it in this image.
Outside the definition
Every bag is held, worn or right next to a person, or there is no bag.

Send a camera image.

Set KIRKWOOD_API_KEY on your server. Save a frame as frame.jpg.

Python POST /v1/analyze
import base64
import json
import os
import urllib.request

with open("frame.jpg", "rb") as frame:
    image = base64.b64encode(frame.read()).decode()

body = json.loads('''{
  "images": [
    "<BASE64_JPEG>"
  ],
  "tags": [
    "unattended_bag"
  ],
  "detections": {
    "return_boxes": true
  }
}''')
body["images"] = [image]
request = urllib.request.Request(
    "https://app.kirkwood.ai/v1/analyze",
    data=json.dumps(body).encode(),
    headers={
        "Authorization": "Bearer " + os.environ["KIRKWOOD_API_KEY"],
        "Content-Type": "application/json",
    },
    method="POST",
)
with urllib.request.urlopen(request, timeout=120) as response:
    print(json.dumps(json.load(response), indent=2))

Read the result

The unattended_bag tag returns an answer and p_yes for the supplied image. Send it alongside other security tags in one call.

Camera setup

Include bags worn, held and placed beside their owners in your tests. Keep enough of the surrounding area in view to see nearby people.

Try it on your footage.

Upload an image and select “Unattended bag”. Run analysis.

Approved account required. Analysis uses credit. Images are retained for annotation and training.

Open the live Playground

API pricing

Billed per image analyzed. Contact us for your rate.

Request pricing

Before you integrate

The tag checks whether someone is next to a bag in the image. It does not establish ownership, elapsed time or the contents of the bag.

Does it track how long a bag has been left?

This tag is a frame-level check. If you need a duration rule, your application must track results over time.

API guide