Detection Logic

Detection Logic

Room State

The room state is represented as a json payload of this format:

{
  "privacyMode": false,
  "humanPresent": true,
  "sitting": false,
  "zones": [
    {
      "id": "5403bc21-834f-443e-bdfb-2993ab4044a7",
      "kind": "bed",
      "description": "Bed next to window.",
      "occupied": false
    }
  ]
}

Privacy Mode

privacyMode is true when the privacy mode feature is activated via the MQTT API.

Human Presence

humanPresent is set to true as soon as the detection spots a human in the room. Humans spotted in the door zone are ignored, as they might stand in the hallway outside of the room.

It won’t be set to false if Livy does not see a human in the room, as the human could be occluded.

humanPresent is only set to false if we detect an OOR and do not detect a human left in the room 10s after the OOR. This might lead to a false room state if we miss the OOR event.

Zones

Bed

occupied is set to true when we detect a human sitting or lying in the bed zone with high confidence.

occupied is set to false if an OOB of that zone is detected. It is also set to false if an OOR is detected and after that no human is detected in the room for 10s.

Out-of-Room (OOR)

OORs are triggered when a human leaves the room through the door zone.

When it fires

For an OOR to be triggered, a human from inside the room needs to approach and get into the door zone, after which the detection waits 8 seconds and triggers the OOR if the human disappears in the door zone, indicating they left the room and are not visible anymore.

When it won’t fire

  • Someone enters the room from the outside
  • Someone outside the room is visible in the door zone (e.g., while walking past it without entering the room)
  • Someone inside the room goes into the door zone and then back out of it but stays in the room
  • Someone from inside the room walks out of the room quickly, as we might miss the frame when they are in the door zone

Out-of-Bed (OOB)

OOBs are triggered when a human that was either sitting or lying in the bed zone leaves the bed zone.

When it fires

A person sits or lies in the bed and then leaves the bed zone. Leaving means the center of their bounding box gets outside the bed zone.

When it won’t fire

  • A human is detected in the room outside of the bed, but the bed was not occupied before.
  • A human sits on the bed or the edge of the bed.
  • A human stands in the bed zone and then leaves it.
  • A human leaves the bed zone very quickly, as we might miss the frame when they are outside and close to the bed zone.

Fall

A fall is recognized when the person lies on the floor. Sitting on the floor can in some cases also trigger an alarm, especially when the upper body is leaned back far.

Once a fall is detected in one frame, a fall event is sent out. As long as the fall is detected in subsequent frames, no new fall event is sent out.

Once the fall is not detected for 10s, the fall is considered to be over and a new fall event can be triggered if a fall is detected again.