explaingit

chiguayeshao/obs-snap-detector

Analysis updated 2026-06-24

13PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

Windows learning project that captures the screen with DXGI, runs YOLOv8n to find people, and draws boxes through a click-through tkinter overlay.

Mindmap

mindmap
  root((obs-snap-detector))
    Inputs
      Screen frames via DXGI
      yolov8n.pt model
      config.py parameters
    Outputs
      Bounding boxes on overlay
      FPS measurement
    Use Cases
      Study DXGI capture
      Study YOLO inference
      Learn click-through overlay
    Tech Stack
      Python
      YOLOv8
      DXGI
      tkinter
      Windows API
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how OBS-style screen capture works on Windows via DXGI Desktop Duplication

USE CASE 2

Learn single-stage YOLOv8 person detection on live screen frames

USE CASE 3

Build a transparent click-through overlay window with tkinter

USE CASE 4

Prototype a producer-consumer frame loop with FPS counters

What is it built with?

PythonYOLOv8DXGItkinterNumPyWindowsAPI

How does it compare?

chiguayeshao/obs-snap-detector1lystore/awaekactashui/sjtu-ppt-template-skill
Stars131313
LanguagePythonPythonPython
Setup difficultymoderatemoderatemoderate
Complexity3/52/52/5
Audiencedevelopervibe coderresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Windows 10/11, Python 3.10+, administrator terminal for the global hotkey, and downloads a 6 MB model on first launch.

In plain English

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.

Copy-paste prompts

Prompt 1
Walk me through obs-snap-detector's capture.py and explain how DXGI Desktop Duplication returns frames as numpy arrays
Prompt 2
Show me how detector.py wires YOLOv8n to filter for the COCO person class and return bounding boxes
Prompt 3
Explain the WS_EX_TRANSPARENT trick in overlay.py and how the mouse passes through the tkinter window
Prompt 4
Modify config.py to lower the confidence threshold and limit capture to a 800x600 region
Prompt 5
Add a CSV logger to obs-snap-detector that records detection counts and FPS over time

Frequently asked questions

What is obs-snap-detector?

Windows learning project that captures the screen with DXGI, runs YOLOv8n to find people, and draws boxes through a click-through tkinter overlay.

What language is obs-snap-detector written in?

Mainly Python. The stack also includes Python, YOLOv8, DXGI.

How hard is obs-snap-detector to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is obs-snap-detector for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.