A real-time computer vision application with two switchable detection modes: Human Pose Estimation and Animal Detection — powered by YOLO26 and streamed live to a browser via WebSocket.
| Mode | Description | Output |
|---|---|---|
| Human Pose | Tracks 17 human body keypoints in real time. Triggers a "Hands Raised" alert when both wrists are above the shoulders. | Skeleton overlay + Hands Raised: YES / NO |
| Animal Detection | Detects 10 COCO animal classes: bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe. Draws bounding boxes with class labels and confidence scores. |
Annotated bounding boxes + detection list |
Switch between modes instantly using the toggle in the browser UI — only one mode runs at a time.
| Layer | Technology |
|---|---|
| Language | Python 3.11+ |
| Pose Model | Ultralytics YOLO26 — yolo26n-pose.pt |
| Detection Model | Ultralytics YOLO26 — yolo26n.pt (COCO) |
| Image Processing | OpenCV |
| Web Server | Flask + Flask-SocketIO |
| Containerisation | Docker |
neuraleye/
├── src/
│ ├── detector.py # PoseDetector — YOLO26 pose model + hands-raised logic
│ ├── animal_detector.py # AnimalDetector — YOLO26 COCO model, animal classes only
│ └── vision.py # VideoStream — OpenCV capture + FPS helper
├── templates/
│ └── index.html # Web UI — mode toggle, webcam feed, live status
├── app.py # Flask + SocketIO server (dual-mode frame handler)
├── main.py # CLI runner (human pose, OpenCV window)
├── requirements.txt # Python dependencies
├── Dockerfile # Python 3.11-slim, pre-bakes both YOLO models
└── docker-compose.yml # Single-service compose on port 5001
pip install -r requirements.txt
python app.pyOpen http://localhost:5001 in your browser, allow camera access, and use the toggle to switch modes.
python main.pydocker compose up --buildOpen http://localhost:5001.
The Docker image pre-downloads both YOLO model weights (~6 MB each) at build time, so the first inference is instant. Expect a ~2–3 GB image due to PyTorch.
- The browser captures webcam frames and sends them to the server over WebSocket along with the current mode.
- The server decodes the frame, runs the appropriate YOLO model, and returns an annotated JPEG.
- The browser displays the annotated feed and updates the status line in real time.
Model weights (*.pt) are not tracked in git — Ultralytics downloads them automatically on first use.
Built with Ultralytics YOLO.