Study how OBS-style screen capture works on Windows via DXGI Desktop Duplication
Learn single-stage YOLOv8 person detection on live screen frames
Build a transparent click-through overlay window with tkinter
Prototype a producer-consumer frame loop with FPS counters
Requires Windows 10/11, Python 3.10+, administrator terminal for the global hotkey, and downloads a 6 MB model on first launch.
obs-snap-detector is a Windows learning project that demonstrates how a so-called OBS-attached screen detector works under the hood. The README is clear that the code is for studying computer vision and Windows API techniques only. It deliberately does not include aim assistance or mouse control, and the author asks readers not to use it against other players in real games. The pipeline has three stages. First, capture.py reads the screen using the DXGI Desktop Duplication API, the same Windows interface that the OBS streaming software uses for its Display Capture source. Each frame comes back as an RGB numpy array. Second, detector.py runs the captured frame through YOLOv8n, a small object detection model, and asks it to find instances of the COCO dataset person class. The result is a list of bounding boxes. Third, overlay.py draws those boxes on a transparent tkinter window placed on top of the screen, using the Windows WS_EX_TRANSPARENT style so the mouse passes through the overlay instead of getting trapped by it. The runtime needs Windows 10 or 11, Python 3.10 or newer, optional NVIDIA GPU for faster inference, and the terminal must be started as administrator because the program registers a global hotkey. Installation is git clone, pip install of requirements.txt, then python main.py. On first launch the project downloads yolov8n.pt, a roughly 6 MB model file. F9 toggles the overlay on and off, and ESC quits the program. A config.py file collects the tunable parameters in one place: a confidence threshold of 0.5, an optional capture region instead of full screen, the highlight box color, the YOLO model size, and a target frame rate of 30. The README points readers at the four source files as study material, calling out the DXGI capture path, single-stage YOLOv8 inference, the transparent click-through overlay technique, and a producer-consumer main loop with FPS measurement.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.