Harry Potter's Marauder's Map shows every person inside Hogwarts in real time. It's a fun thought experiment for a computer vision project: build a map of your own space that updates live as people move through it. Multiple cameras feeding a tracker, a floor plan with dots that move around, and you have a small version of the same idea. With Securade HUB, you can get a working prototype done in a weekend.
This is a build-along guide for putting one together. The setup is small enough to be a hobby project, big enough to teach you the moving parts of a real computer-vision application. Once you've got the basics working, the same scaffolding works for actual production use cases.
The pieces you need
Five components that have to work together. Get any one wrong and the whole thing doesn't tick.
- Cameras. The eyes of the system. Any IP camera with RTSP support works for a hobby setup; webcams are fine for a single-room demo.
- Detector. The model that finds people (or whatever you're tracking) in each frame. YOLO is the default for this; SSD or a custom-trained model also fine.
- Securade HUB. The orchestration layer. Takes feeds in, runs inference, manages state, emits results.
- Tracking algorithm. Maintains the identity of each tracked entity as they move between camera views.
- Map view. The visual output. A floor plan with live dots showing where each tracked entity is.
Setting up the environment
Quick setup checklist before you start writing code:
- Python 3.6 or newer. Confirm with
python3 --version. - HUB installed.
git clone https://github.com/securade/hubthen follow the README. - Dependencies. TensorFlow or PyTorch for the detector, OpenCV for the image handling.
- Cameras configured. Each camera reachable from your dev machine, RTSP URLs noted.
- Training data. Only needed if you're using a custom detector; pre-trained models cover most weekend-project use cases.
Spend a bit of time on this; getting the environment right saves debugging later. Most of the project's friction tends to be at setup time, not at coding time.
Running detection through HUB
HUB makes the detection plumbing a config exercise rather than a coding exercise. The high-level flow:
- Define your data streams. Camera URLs or file paths go into the HUB config. One stream per camera.
- Plug in the detector. HUB has integrations for the standard models; you can write a custom adapter if you need something exotic.
- Set up the pipeline. Specify how frames flow from cameras through the detector to the output sinks.
- Watch the detections. HUB's visualisation tools let you see what the model is detecting in real time, which is essential for tuning.
The architecture is modular, so swapping detectors or adjusting the pipeline is a config change rather than a rewrite.

Tracking people between cameras
The harder part. A person leaves camera 1, walks down a hallway, appears on camera 2. The system needs to know that person 2 in camera 2 is the same person 1 in camera 1, not a new entity. Four techniques that work, in increasing order of sophistication:
- Feature matching. Extract visual features from each detection, match across cameras by similarity. Cheap, decent for small setups.
- Kalman filtering. Predict where each tracked entity should be next based on past motion. Smooths out noisy detections and handles brief occlusions.
- Re-identification (ReID) models. Train a separate model to recognise the same person across camera views even with appearance changes. Standard for production-grade tracking.
- Geometric constraints. Use camera placement and floor geometry to constrain where a person could plausibly be after leaving one camera view. Cuts the search space and improves accuracy.
For a hobby project, feature matching plus Kalman filtering is enough. For anything serious, add ReID.
Drawing the map
The fun visual bit. You need a floor plan and a way to project camera-space detections onto it.
- Sketch a floor plan. Hand-drawn is fine for a weekend project; for production, use whatever CAD or mapping tool you have.
- Calibrate the cameras. Figure out each camera's position and orientation relative to the floor plan. Affine transform or homography is usually enough.
- Project detections onto the map. For each detection in camera space, compute the corresponding floor-plan position using the calibration.
- Update live. As detections come in, move the dots on the map. Add labels if you want names or IDs.
Front-end options: HTML5 Canvas if you want a web app, Leaflet for a more map-like look, Unity if you want to go full game-engine. For a Marauder's Map vibe, Canvas with a styled background image works really well.
Things that consistently help
A few practical notes from doing this kind of thing:
- Start tiny. One camera, one detector, one test person. Get that working end-to-end before you add cameras.
- Use pre-trained models. You don't need to train from scratch for a project like this. YOLO pre-trained on COCO will find people just fine.
- Optimise where it matters. Lower the resolution if you're CPU-bound. Use GPU acceleration if available. Parallelise across cameras.
- Handle the weird cases. Occlusions, lighting changes, someone walking into a poorly-lit corner. Your system needs to degrade gracefully.
- Test in your actual space. Lab tests look great. Real rooms have different lighting, different angles, different furniture. Test where you'll deploy.
Where to take it next
Once the basic Marauder's Map is working, there's plenty more to build on top:
- 3D tracking. Get depth information so you know not just where people are but how tall and which direction they're facing.
- Activity recognition. Walking, sitting, running, falling. Adds a layer of semantic meaning to the tracking.
- Anomaly detection. Spot unusual patterns: someone who shouldn't be there, loitering, restricted-zone breaches.
- Multi-camera fusion. Combine signals from overlapping camera views for more robust tracking.
- Privacy. Blur faces, anonymise data. Important if you're going to actually deploy this anywhere people don't expect it.
From here, the same scaffolding extends into security systems, workplace safety monitoring, sports analytics, or any other domain where you need to know where people are and what they're doing.
A Marauder's Map style tracking system used to be a serious engineering project. With modern tooling, it's a weekend build. The fact that you can get this kind of thing working so quickly is what makes the current era of computer vision interesting: the gap between "I have an idea" and "I have a working prototype" has collapsed. Pick a project, give it a Saturday, and see what you can build.
Ready to get started? Star our open source project HUB on GitHub and use it as a basis to build on top of!
