🕵🏻♂️ AI CCTV 📹
This cross-platform, offline app uses
OnnxRuntime
(Machine Learning) to detect any
HUMAN
in the
Camera
frame in a loop and saves the file in app specific path if it detects, else it doesn't save the frame. It can also send a
SMS
alert to a given number if you are on
Android
.
This project is buid on
kivy,kivymdand usesonnxruntime,numpy,opencvetc. to perform the tasks. Our approach is alwaysOffline firstandLocal AI(you only need internet for the first time to downlaod the tinyonnxmodel, app will prompt you). This project may have bugs & please let us know if you face any.
Features
-
Detects if there is any human in a frame for a second (checks five frames in a second). Uses Artificial Intelligence Locally without exposing anything to the ineternet.
-
Sends sms alert to given number if detection is successful and depends on the frequency (minimum frequency is 1min, so that it doen't send too many messages, default is 10min). Available only on
Android. > But, it will save the frames irrespective of sms frequency. -
No Ads, completelyopen-source(free). -
No
trackers, nodata collectionetc. Actually you own your data & your app.
💰 Sponsor Me
You can buy me a coffee via
this link
or tap on below image. Thank you 🙏.
📽️ Demo
You can play below Video or click this
Youtube Link
to see the demo. Please let me know in the comments, how do you feel about this App.
🖧 Our Scematic Architecture
To be added...
🧑💻 Quickstart Guide
📱 Download & Run the Android App
You can check the Releases and downlaod the latest version of the android app on your phone.
-
The detected photos will be saved in
Phone Memory>Android>data>in.daslearning.aicctv>files>outputs. -
If you do not provide
sms permission, sms will not be sent. -
If you face challenge to provide
SMSpermission, got toSettings>Apps> Click onAI Surveillance> Click onthree dotat top right corner > ClickAllow restricted settings> Verify with PIN or finger print (or anything your devices uses) > Then allow theSMSpermission fromPermissions.
Requirements
-
Minimum android verion:
9
💻 Download & Run the Windows or Linux App
To be built later.
🐍 Run with Python
-
Clone the repo
-
Run the application
📥 More open-source apps from us
You may check our other apps from our app list
🦾 Build your own App
The Kivy project has a great tool named
Buildozer
which can make mobile apps for
Android
&
iOS
📱 Build Android App
A Linux environment is recommended for the app development. If you are on Windows, you may use
WSL
or any
Virtual Machine
. As of now the
buildozer
tool works on Python version
3.11
at maximum. I am going to use Python
3.11
# add the python repository
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
# install all dependencies.
sudo apt install -y ant autoconf automake ccache cmake g++ gcc libbz2-dev libffi-dev libltdl-dev libtool libssl-dev lbzip2 make ninja-build openjdk-17-jdk patch patchelf pkg-config protobuf-compiler python3.11 python3.11-venv python3.11-dev
# optionally we can default to python 3.11
sudo ln -sf /usr/bin/python3.11 /usr/bin/python3
sudo ln -sf /usr/bin/python3.11 /usr/bin/python
sudo ln -sf /usr/bin/python3.11-config /usr/bin/python3-config
# optionally you may check the java installation with below commands
java -version
javac -version
# install python modules
git clone https://github.com/daslearning-org/ai-surveillance.git
cd ai-surveillance/app/
python3.11 -m venv .env # create python virtual environment
source .env/bin/activate
pip install -r req_android.txt
# build the android apk
buildozer android debug # this may take a good amount of time for the first time & will generate the apk in the bin directory