Previous works on smart surveillance systems often only focused on one task such as violence detection, and were heavyweight systems at the same time. This project aims to create a smart surveillacne system that does more than an average human (or a team of humans) could ever do.
Not only will it help with regular surveillance related activities - such as violence and anomaly detection, it will also help provide valuable mental health related insights for data collected over a surveillance network. The project is also designed in a way that it can adapt to various environments and use cases, such as a classroom, mall, office, rehab centers and many more.
- Go to your terminal and clone the repository using the
git clonecommand.
git clone https://github.com/keerthanar09/smart-surveillance-ndf.git
- Open the project in your preffered text editor, and in the first terminal, change directory to
frontendand install all necessary dependancies for thenext.jsfrontend app.
cd frontend
npm install
- Start the
next.jsapp using the following command:
npm run dev
This command is for production. Otherwise, run npm start.
- Create python virtual environment for the entire project, body_service, crowd_service and emotion_service, and install the necessary requirements for each service, provided in a
requirements.txtfile within each respective folder.
(Important Note to Self: MAKE NOTE OF DEPENDANCIES FOR EVERY SERVICE AND ONLY KEEP SEPARATE VIRTUAL ENVIRONMENTS IF ABSOLUTELY NECESSARY. RIGHT NOW THE MULTIPLE VIRTUAL ENVIRONMENTS ARE TEMPORARY FOR EASE OF DEVELOPMENT.)
- Now, we need to run each of the services. The plan is to dockerize each service and use them as a microservice, but since this system is still being developed, docker hasn't been used yet. So each service will be individually run as follows (open a new terminal for each service):
//Terminal 2
cd crowd_service
crowd_venv\Scripts\activate
uvicorn crowd_analyser:app --host 127.0.0.1 --port 8100
//Terminal 3
venv\Scripts\activate
cd orchestrator
uvicorn app:app --host 127.0.0.1 --port 8000 --reload
//Terminal 4
venv\Scripts\activate
cd env_service
uvicorn envir_analyzer:app --host 127.0.0.1 --port 8200 --reload
//Terminal 5
cd emotion_service
emovenv\Scripts\activate
uvicorn emo_analyzer:app --host 127.0.0.1 --port 8300 --reload
//Terminal 6
cd body_service
bodvenv\Scripts\activate
uvicorn body_analyzer:app --host 127.0.0.1 --port 8400 --reload
Note: This set-up is purely for development purposes.
- Create a
.envfile in the project root and add a variable namedGEMINI_API_KEY, and provide your API key as it's value. This API key can be obtained from Google Cloud Console. Enable Gemini API and create an API key under API and Credentials. Future me: Removed gemini API temporarily since the performance overhead is more than desired. But, planning to add it later again for weekly or monthly reports.
For more details on the project, refer to report.pdf present in this folder.