guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.62k stars 728 forks source link

Person / face detection with tensorflow lite #437

Open wtip opened 3 years ago

wtip commented 3 years ago

Adding person or face detection with something like tensorflow lite instead of simple motion detection would be a useful feature.

lukeswitz commented 3 years ago

I like this idea; motion detection needs an overhaul. Granular options, I can get behind that for sure.

Pinging @archie94 for input on which camera framework/API to move forward with (first or third party). Thanks all

archie94 commented 3 years ago

Yes this can be a valuable add on.

We can use Framework's Camera2 apis or any wrapper over the same (Like CameraX). I believe the current camera library we have in the project can also work. Since analysis of frame are costly we can maybe analysis only certain frames at regular intervals.

We need to go with on device TFLite models like Pose estimation model or similar face detection models.

wtip commented 3 years ago

An app called tinyCam pro https://play.google.com/store/apps/details?id=com.alexvas.dvr.pro has an option to only do object detection on frames that contain motion. This helps reduce the CPU usage for environments where there isn't constant movement.