A Flask-based web application that detects people in camera surveillance images using OpenCV's HOG (Histogram of Oriented Gradients) descriptor.
- Upload images through a clean web interface.
- Automatic people detection using HOG + SVM
- Visual results with bounding boxes around detected people
- Responsive and modern UI
- Flask: Web framework
- OpenCV: Computer vision and people detection
- Gunicorn: Production WSGI server
- HTML/CSS: Frontend interface
Click link and insert .png or .jpg image file of a surveillance footage of a crowd in traffic. https://peopledetector-1.onrender.com
- Python 3.8 or higher
- pip
PeopleDetector/
├── app.py # Main Flask application
├── detect.py # People detection logic
├── requirements.txt # Python dependencies
├── render.yaml # Render deployment config
├── .gitignore # Git ignore rules
├── static/
│ ├── style.css # CSS styling
│ ├── uploads/ # Uploaded images (not tracked)
│ └── results/ # Detection results (not tracked)
└── templates/
└── index.html # Main HTML template
- User uploads an image through the web interface
- Image is saved to the
static/uploads/directory - OpenCV's HOG descriptor detects people in the image
- Bounding boxes are drawn around detected people
- Result image is saved to
static/results/directory - Result is displayed to the user
- The app uses
opencv-python-headlessfor Render deployment (no GUI dependencies) - Upload and result directories are created automatically if they don't exist
- Old uploaded/result images are not automatically cleaned up
MIT License - feel free to use this project for learning and development!