Four-stage end-to-end system for detecting and responding to unauthorized entry
Python
0
22 commits
updated Aug 13, 2025
This repository implements a four-stage end-to-end system for detecting and responding to unauthorized entry:
CSI-Based Presence Detection
Continuously monitor WiFi CSI (Channel State Information) to detect door openings or human entry.
Intruder Localization
Analyze phase and amplitude shifts to approximate the intruder's position in the room.
Real-Time Human Detection & Tracking
Video Recording & Behavioral Analysis
By combining wireless sensing, computer vision, and intelligent logging, this pipeline delivers robust, automated intrusion monitoring in real time.
I recommend using uv venv to create isolated environments, simplifying dependency management and ensuring reproducible setups.
# Install the 'uv' CLI and create a new venv
pip install uv
uv venv
# On macOS / Linux
source .venv/bin/activate
# On Windows (PowerShell)
source .venv/Scripts/activate
git clone https://github.com/NVA-Lab/intrusion-detector.git
cd intrusion-detector
# Install the core package (SAM2 + demo app) in editable mode
uv pip install -e .
# (Skip if CPU only)
# If you want to use GPU acceleration (CUDA), you must install PyTorch with the correct CUDA version manually.
# For example, to install PyTorch with CUDA 12.1, run the following command before installing the rest:
uv pip install torch==2.3.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
cd checkpoints
./download_ckpts.sh
cd ..
Run the web application for real-time human detection and tracking:
python -m demo.app
After running, access the web interface at http://localhost:5000.
To demonstrate the DAM (Describe Anything Model) functionality:
python scripts/demo.py
python scripts/api_controller.py
Note: Currently, the human detection and description systems are not fully integrated. The API controller sends dummy data for demonstration purposes. This integration will be updated in future releases.
To run the complete intrusion detection system with human detection and DAM analysis:
python scripts/demo.py
python demo/app.py
The system will now automatically:
To use the CSI-based presence detection feature, you need to configure your MQTT broker settings in demo/config/settings.py:
BROKER_ADDR = "your_broker_address"
BROKER_PORT = your_broker_port
The repository includes default topic configurations for ESP32 devices, but you can modify these settings according to your specific MQTT setup.
You can customize various settings in demo/config/settings.py:
CAMERA_INDEX to use different camerasYOLO_MODEL_PATH and SAM_CHECKPOINT_PATH to use different model checkpointsSTATIONARY_THRESHOLD and MASK_THRESHOLD to fine-tune detection sensitivityThis project uses a Raspberry Pi 4 + NoIR v2 camera mounted on a pan‑tilt HAT. The Pi acts as a micro‑streaming server (MJPEG/HTTP) while also receiving PTZ commands over MQTT
This project leverages:
@article{glenn2024yolov8,
title={YOLOv8: Next-Generation Real-Time Object Detection},
author={Glenn Jocher and Ultralytics},
year={2024},
url={https://github.com/ultralytics/ultralytics}
}
@article{ravi2024sam2,
title={SAM 2: Segment Anything in Images and Videos},
author={Ravi et al.},
year={2024},
url={https://arxiv.org/abs/2408.00714}
}
@misc{yang2024samurai,
title={SAMURAI: Adapting SAM for Zero-Shot Visual Tracking with Motion-Aware Memory},
author={Yang et al.},
year={2024},
url={https://arxiv.org/abs/2411.11922}
}
Four-stage end-to-end system for detecting and responding to unauthorized entry
Python
0
22 commits
updated Aug 13, 2025
This repository implements a four-stage end-to-end system for detecting and responding to unauthorized entry:
CSI-Based Presence Detection
Continuously monitor WiFi CSI (Channel State Information) to detect door openings or human entry.
Intruder Localization
Analyze phase and amplitude shifts to approximate the intruder's position in the room.
Real-Time Human Detection & Tracking
Video Recording & Behavioral Analysis
By combining wireless sensing, computer vision, and intelligent logging, this pipeline delivers robust, automated intrusion monitoring in real time.
I recommend using uv venv to create isolated environments, simplifying dependency management and ensuring reproducible setups.
# Install the 'uv' CLI and create a new venv
pip install uv
uv venv
# On macOS / Linux
source .venv/bin/activate
# On Windows (PowerShell)
source .venv/Scripts/activate
git clone https://github.com/NVA-Lab/intrusion-detector.git
cd intrusion-detector
# Install the core package (SAM2 + demo app) in editable mode
uv pip install -e .
# (Skip if CPU only)
# If you want to use GPU acceleration (CUDA), you must install PyTorch with the correct CUDA version manually.
# For example, to install PyTorch with CUDA 12.1, run the following command before installing the rest:
uv pip install torch==2.3.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
cd checkpoints
./download_ckpts.sh
cd ..
Run the web application for real-time human detection and tracking:
python -m demo.app
After running, access the web interface at http://localhost:5000.
To demonstrate the DAM (Describe Anything Model) functionality:
python scripts/demo.py
python scripts/api_controller.py
Note: Currently, the human detection and description systems are not fully integrated. The API controller sends dummy data for demonstration purposes. This integration will be updated in future releases.
To run the complete intrusion detection system with human detection and DAM analysis:
python scripts/demo.py
python demo/app.py
The system will now automatically:
To use the CSI-based presence detection feature, you need to configure your MQTT broker settings in demo/config/settings.py:
BROKER_ADDR = "your_broker_address"
BROKER_PORT = your_broker_port
The repository includes default topic configurations for ESP32 devices, but you can modify these settings according to your specific MQTT setup.
You can customize various settings in demo/config/settings.py:
CAMERA_INDEX to use different camerasYOLO_MODEL_PATH and SAM_CHECKPOINT_PATH to use different model checkpointsSTATIONARY_THRESHOLD and MASK_THRESHOLD to fine-tune detection sensitivityThis project uses a Raspberry Pi 4 + NoIR v2 camera mounted on a pan‑tilt HAT. The Pi acts as a micro‑streaming server (MJPEG/HTTP) while also receiving PTZ commands over MQTT
This project leverages:
@article{glenn2024yolov8,
title={YOLOv8: Next-Generation Real-Time Object Detection},
author={Glenn Jocher and Ultralytics},
year={2024},
url={https://github.com/ultralytics/ultralytics}
}
@article{ravi2024sam2,
title={SAM 2: Segment Anything in Images and Videos},
author={Ravi et al.},
year={2024},
url={https://arxiv.org/abs/2408.00714}
}
@misc{yang2024samurai,
title={SAMURAI: Adapting SAM for Zero-Shot Visual Tracking with Motion-Aware Memory},
author={Yang et al.},
year={2024},
url={https://arxiv.org/abs/2411.11922}
}