Fall detection API

Identify a person lying or collapsed on the ground in camera images.

What it detects

Check corridors, shop floors and outdoor paths for a person who may need attention.

Detection
A person is lying or collapsed on the ground or floor: fell, medical emergency, or sleeping.
Outside the definition
Nobody is lying on the ground. Sitting on a bench, sitting on the ground upright, or kneeling briefly.

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": [
    "person_on_ground"
  ],
  "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 person_on_ground tag returns an answer and p_yes. People counts and bounding boxes can come back in the same response.

Camera setup

Choose a camera with a clear view of the floor. Test people lying down alongside seated and kneeling examples from that camera.

Recorded camera example.

Try it on your footage.

Upload an image and select “Person on ground”. Run analysis.

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

Open the live Playground

Before you integrate

The tag detects a person lying or collapsed, including someone sleeping. One frame does not establish that a fall occurred or identify its cause.

What does the fall detection result mean?

It means the model assessed whether a person is lying or collapsed in the supplied image. Sitting upright or briefly kneeling is outside the positive definition.

API guide

API pricing

Billed per image analyzed. Contact us for your rate.

Request pricing