ambianic / fall-detection

Python ML library for people fall detection
Apache License 2.0
83 stars 16 forks source link

Image pre-processing for improved PoseNet inference results #11

Open ivelin opened 3 years ago

ivelin commented 3 years ago

Is your feature request related to a problem? Please describe. Users report that our model detects falls better in well lighted areas than it does in areas with poor lighting conditions. Since falls can occur any time of the day, including night time, it is important to extend the range of lighting conditions we can handle. Night time is arguably more important because it is less likely for a fallen person to be supervised by a family caregiver.

Describe the solution you'd like It appears that the current PoseNet models have been trained on images with good lighting.

Maybe we can pre-process images so their colors shift closer to daytime lighting range that the PoseNet model can pick up.

One relatively quick and simple approach to try is conventional image filter libraries such as ImageMagick. For example the -auto-level filter appears to have visible effect on dark image illumination while it leaves in place images with good lighting. See example attached of Mac Preview with Auto Levels.

The enhancement should be a particularly fast operation if we apply it only to the 20K (~300x300) thubmnail fed to the DNN model instead of the original HD image.

Here is a discussion on the comparable -auto-level ImageMagick operator.

Wand: Python bindings for ImageMagick.

Screen Shot 2021-02-02 at 9 08 53 PM

Screen Shot 2021-02-02 at 9 08 47 PM

Describe alternatives you've considered New Deep neural models are also available for this task. See resources in a related issue: https://github.com/ambianic/ambianic-edge/issues/233