This project is an advanced computer vision surveillance system that allows for real-time monitoring, face recognition, and location tracking. The system includes features for managing cameras and persons, and displays the last known locations of identified persons on a map.
- Real-time Camera Feed: Stream video from multiple cameras.
- Face Recognition: Identify known persons using face recognition.
- Location Tracking: Track the last known locations of identified persons.
- Person Management: Add, edit, and delete person details.
- Camera Management: Add, edit, and delete camera details.
- Location Map: Display the last known locations of identified persons on a map with detailed information.
- Frontend: React, Tailwind CSS
- Backend: FastAPI
- Database: SQLite
- Computer Vision: OpenCV, YOLO, face_recognition
- Deployment: Docker, Azure
- Node.js
- Python 3.7+
- Docker (optional for containerized deployment)
-
Clone the repository:
git clone https://github.com/yourusername/surveillance-system.git cd surveillance-system
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required Python packages:
pip install -r requirements.txt
-
Download YOLO configuration and weights files:
- Download
yolov3.cfg
from: https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg - Download
yolov3.weights
from: https://pjreddie.com/media/files/yolov3.weights - Download
coco.names
from: https://github.com/pjreddie/darknet/blob/master/data/coco.names
Place these files in a directory named
backend/app/yolo
inside the project root directory. - Download
-
Run the FastAPI server:
uvicorn app.main:app --reload
-
Navigate to the frontend directory:
cd frontend
-
Install the required npm packages:
npm install
-
Start the React development server:
npm start
-
Build the Docker image:
docker build -t surveillance-system .
-
Run the Docker container:
docker run -p 8000:8000 surveillance-system
-
Access the application: Open your browser and navigate to
http://localhost:3000
to access the frontend. -
Navigate to the Dashboard: The dashboard displays the real-time camera feed and the location map.
-
Manage Persons and Cameras: Navigate to the "Manage" section from the navbar to add, edit, or delete persons and cameras.
- GET /persons: Get a list of all persons.
- POST /persons: Add a new person.
- DELETE /persons/{person_id}: Delete a person by ID.
- GET /cameras: Get a list of all cameras.
- POST /cameras: Add a new camera.
- DELETE /cameras/{camera_id}: Delete a camera by ID.
- GET /locations: Get a list of all locations.
- GET /locations/person/{person_id}: Get locations for a specific person.
This project is licensed under the MIT License.