A real-time security camera system that uses TensorFlow.js for pose detection and automatically sends email alerts with video footage when an intruder is detected.
- Real-time pose detection using multiple AI models:
- MoveNet (fastest)
- BlazePose (Got some errors)
- PoseNet (Got some errors)
- Automatic 10-second video recording when movement is detected
- Instant email alerts with video attachment
- Live visualization of detected poses and skeletal structure
- Support for MP4 video conversion for maximum compatibility
-
Frontend:
- HTML5/CSS3
- JavaScript (ES6+)
- TensorFlow.js
- MediaRecorder API
-
Backend:
- Node.js
- Express.js
- Nodemailer
- Fluent-FFmpeg
- Node.js (v14 or higher)
- FFmpeg installed on the system
- Web camera
- One.com SMTP credentials
- Clone the repository:
git clone https://github.com/yourusername/secCam.git
cd secCam- Install dependencies:
npm install- Configure your email settings in
src/server.js:
const transporter = nodemailer.createTransport({
host: 'smtp-host-of-choice',
port: 465,
secure: true,
auth: {
user: 'your-email@domain.com',
pass: 'your-password'
}
});- Start the server:
#1
npm start (will run the server.js on port 3000)
#2
ngrok http 3000 (will run the ngrok server on port 3000 aswell)
#Explanation it will merge conflicts if you don't run both on the same port it could be any port but just the same ones to get the emailing working. If you do not want email-sending you could just run ngrok http 3000- Open
http://localhost:3000in your browser
- Select your preferred pose detection model (MoveNet recommended for performance)
- Click "Börja Inspelning" to start the camera
- The system will automatically:
- Detect human poses in the camera feed
- Record 10 seconds of video when movement is detected
- Send an email alert with the video attachment
- Click "Stoppa Inspelning" to stop the camera
- TensorFlow.js team for the pose detection models
- Node.js community for excellent tools and libraries