Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 2 frame lookback to determine fall instead of 1 #282

Closed
ivelin opened this issue Jan 20, 2021 · 1 comment
Closed

Implement 2 frame lookback to determine fall instead of 1 #282

ivelin opened this issue Jan 20, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request released

Comments

@ivelin
Copy link
Collaborator

ivelin commented Jan 20, 2021

Is your feature request related to a problem? Please describe.

Currently with look back 1 image frame with 1 second spacing between images to detect a fall.

This research study concludes that falls last anywhere between 600 and 800 ms. We currently expect 1 second gap between frames, which seems to be a reasonable choice that should be long enough to capture an image before and after a fall. The question remains open how to handle sequence of frames that may come in (before and middle) of a fall or (middle and after) a fall. In these cases the fall may be incomplete between the two comparison frames and we won't detect it with the current algorithm. Something to think about. May we look 2 frames back instead of 1, which ensures that a fall is certainly captured either in the (1,2), (2,3) or (1,3) pair of frames.

Describe the solution you'd like

Let's assume image[t] is the camera image input at time t.

Currently with only 1 image lookback with 1 second spacing between images and a fall taking between 600-800ms, we have these possible cases:

[image[t-1], fall_start, fall_end, image[t]] - > detection! (body vector angle between image[t] and image[t-1] should be close to 90', certainly over 60')
[image[t-1], fall_start, image[t], fall_end] - > no detection (body vector angle between image1 and image2 could be less than 60')
[ fall_start, image[t-1], fall_end, image[t]] - > no detection (body vector angle between image1 and image2 could be less than 60')

What if we look not only 1 but 2 images back with 1 second spacing between each:
[image[t-2], image[t-1], fall_start, fall_end, image[t]] - > detection! (body vector angle between image[t] and image[t-1] should be close to 90', certainly over 60')
[image[t-2], fall_start, image[t-1], fall_end, image[t]] - > detection (body vector angle between image[t-2] and image[t] should be close to 90', certainly over 60')

It seems like with 3 frames (current time t, t-1 and t-2) lookback we should be able to capture any true fall as long as these assumptions hold true:

  • Image frames are spaced no less than 1 second apart and no more than 2 seconds apart.
  • A fall takes 600-800ms from initiation to ground contact
  • A person who fell down stays on the ground for at least 2 seconds. If they jump up faster than that, it's probably not a case to be alarmed about.
  • The angle between the body vectors of a standing and a fallen person is at least 60' (configurable).

With the assumptions above, a true will be detected either between [image[t-1], image[t]] or between [image[t-2], image[t].

Additional context
A different research study on ambient health monitoring discovered that only 2% of video frames are needed to accurately detect a person activity. 2% at 60fps is 1.2fps. This is consistent with the 600-800ms finding of the study above. Although Dr. Fei's study relies on RNNs to find which 2% are the ones required for the activity detection, it is still helpful to educate our simpler heuristic formula.

@ivelin ivelin added this to To do in Ambianic Edge - Agile Board via automation Jan 20, 2021
@ivelin ivelin added the enhancement New feature or request label Jan 20, 2021
bhavikapanara added a commit to bhavikapanara/ambianic-edge that referenced this issue Jan 27, 2021
@ivelin ivelin closed this as completed in 4abcfc3 Feb 1, 2021
Ambianic Edge - Agile Board automation moved this from To do to Done Feb 1, 2021
github-actions bot pushed a commit that referenced this issue Feb 6, 2021
# [1.13.0](v1.12.14...v1.13.0) (2021-02-06)

### Bug Fixes

* failing fall detection test; closes [#294](https://github.com/ambianic/ambianic-edge/issues/294) ([8b06fc0](8b06fc0)), closes [#298](#298)
* fall detection issue [#282](#282) ([9dd818b](9dd818b))
* fall-detection bug [#294](https://github.com/ambianic/ambianic-edge/issues/294) ([d0814e1](d0814e1)), closes [#295](#295)

### Features

* improved fall detection with 2 frame lookback instead of 1; closes [#282](#282) ([4abcfc3](4abcfc3)), closes [#289](#289)
@github-actions
Copy link

github-actions bot commented Feb 6, 2021

🎉 This issue has been resolved in version 1.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to ivelin/ambianic-edge that referenced this issue Feb 6, 2021
# [1.10.0](v1.9.5...v1.10.0) (2021-02-06)

### Bug Fixes

* clean up fall detections logging ([f086405](f086405)), closes [ambianic#287](https://github.com/ivelin/ambianic-edge/issues/287)
* clean up fall detections logging ([88a4352](88a4352))
* failing fall detection test; closes [#294](https://github.com/ivelin/ambianic-edge/issues/294) ([8b06fc0](8b06fc0)), closes [ambianic#298](https://github.com/ivelin/ambianic-edge/issues/298)
* fall detect runtime exception, closes [ambianic#285](https://github.com/ivelin/ambianic-edge/issues/285) ([41c9d4c](41c9d4c)), closes [ambianic#286](https://github.com/ivelin/ambianic-edge/issues/286)
* fall detection issue [ambianic#282](https://github.com/ivelin/ambianic-edge/issues/282) ([9dd818b](9dd818b))
* fall-detection bug [#294](https://github.com/ivelin/ambianic-edge/issues/294) ([d0814e1](d0814e1)), closes [ambianic#295](https://github.com/ivelin/ambianic-edge/issues/295)
* look for timeline-event log files in a flat dir not recursively ([e7873ec](e7873ec))
* merge remote-tracking branch 'upstream/master' ([8e313be](8e313be))

### Features

* improved fall detection with 2 frame lookback instead of 1; closes [ambianic#282](https://github.com/ivelin/ambianic-edge/issues/282) ([4abcfc3](4abcfc3)), closes [ambianic#289](https://github.com/ivelin/ambianic-edge/issues/289)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Development

No branches or pull requests

2 participants