Overwatch enemy recognition is a small personal studying project where I'm trying to train yolo26-N base model on a dataset to detect the enemy head and enemy body.
The dataset and training was made by me and isn't included in the github for fear of misuse and storage issues.
If you want to reproduce it yourself (without ill intent), know that I was using an amd 7700xt GPU and amd 7700 CPU with 32Gb DDR5 ram for inference. And for training I was using a laptop with a rtx 3050 and 16Gb of ram. If you're using something else (especially a smaller gpu) you might need to adjust the code for the following. Also, try to keep the same resolution in game, in my case I chose low settings.
├── 📂 datasets/
│ └── 📂 ow2_data/
│ ├── 📄 data.yaml # Dataset configuration (Classes & Paths)
│ ├── 📂 train/
│ │ ├── 📂 images/ # .jpg screenshots of gameplay
│ │ └── 📂 labels/ # .txt YOLO annotation files
│ └── 📂 val/
│ ├── 📂 images/ # Screenshots for validation
│ └── 📂 labels/ # Annotations for validation
├── 📂 runs/ # Auto-generated by YOLO during training
│ └── 📂 detect/
│ └── 📂 train/ # Training logs, charts, and weights
│ └── 📄 best.onnx # Exported optimized model
├── 📂 scripts/
│ ├── 📄 capture_data.py # Script to save screenshots for labeling
│ ├── 📄 train.py # Training script (nvidia optimized)
│ └── 📄 inference.py # Real-time screen detection script
├── 📂 ow2_env/
├── 📄 .gitignore # Prevents uploading unnecessary files
├── 📄 LICENSE # License: MPL 2.0
├── 📄 requirements.txt # List of dependencies (ultralytics, torch-directml)
├── 📄 requirements_nvidia.txt # List of dependencies for nvidia
├── 📄 yolo26n.pt # Base pretrained weights (Nano)
└── 📄 README.md # Documentation
-
Create the virtual environment named 'ow2_env'
py -3.11 -m venv ow2_env
(if you don't have python python 3.11 you can get it here) -
Activate the environment For PowerShell:
.\ow2_env\Scripts\Activate.ps1
For CMD:
.\ow2_env\Scripts\activate.bat -
Upgrade pip
python -m pip install --upgrade pip -
Install all libraries from the requirements file
For AMD GPU users:
pip install -r requirements.txt
For NVIDIA GPU users:
pip install -r requirements_nvidia.txt
This V1.0 was made in january 2026 and may not work with future overwatch updates
This readme and most of the scripts were made using gemini
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0)
- Permissive & File-level Copyleft: You can use this code commercially (but shouldn't) and combine it with proprietary software.
- Obligation: Any modifications to original MPL-licensed files must be made available under the same license.
- Trademarks: This license does not grant rights to any contributor's trademarks or logos.
