Detecting Player Isolation in Valorant Using YOLOv8
My experience at Twisted Minds Esports Hackathon 2025
🎯 Overview
During the Twisted Minds Esports Hackathon 2025 in Riyadh,
The challenge was open-ended: build something that could enhance the esports ecosystem - from analytics and player development to fan experiences and broadcast tools.
Our idea focused on a subtle but impactful problem in competitive play:
It’s hard for players to find good coaches, and even skilled coaches can miss or don’t have the time to review common mistakes when reviewing matches.
I built a proof of concept (POC) that automates tactical analysis in Valorant by detecting player positions on the minimap and identifying when a player becomes isolated from their teammates - a key indicator of poor coordination or map control.

Snapshot Example
⚙️ Problem Definition
In team-based games like Valorant, map awareness and positioning often decide rounds.
However, reviewing VODs manually to analyze these aspects is slow and error-prone. Coaches need a way to visualize mistakes in real time - especially when players drift too far from allies.
So I built a real-time visual analyzer that watches the minimap, classifies markers as friendly, enemy, or other, and highlights teammates who are too far from the group.
🧠 Dataset and Model Training
I used the Valorant Map Analyzer dataset from Roboflow Universe.
It contained more than 40 classes representing map entities. While the dataset isn’t of the highest quality, it was sufficient for this proof of concept.
During testing, I noticed that some agents with similar appearances—like Jett and Sova—were occasionally mislabeled.


Although this didn’t affect the team identification (friendly vs enemy), it did introduce inconsistencies. To simplify the resuly, I manually remapped all classes into three main categories:
- 🟩 Friendly (teammates)
- 🟥 Enemy
- 🟦 Other / Neutral
# ---- Class category remap ----
CATEGORY_MAP = {
3: "enemy", 4: "enemy", 5: "enemy",
10: "enemy", 14: "enemy", 17: "enemy",
18: "enemy", 22: "enemy", 25: "enemy",
27: "enemy", 29: "enemy", 31: "enemy",
33: "enemy", 36: "enemy", 37: "enemy",
42: "enemy", 44: "enemy",
1: "friendly", 8: "friendly", 16: "friendly",
20: "friendly", 24: "friendly", 28: "friendly",
35: "friendly", 39: "friendly",
0: "friendly", 6: "friendly", 7: "friendly",
11: "friendly", 13: "friendly", 15: "friendly",
19: "friendly", 23: "friendly", 26: "friendly",
30: "friendly", 32: "friendly", 34: "friendly",
38: "friendly", 43: "friendly", 45: "friendly",
#Other
2: "Spike", 9: "enemy_dead", 12: "friendly_dead",
21: "last_seen", 40: "spike", 41: "spike_planted"
}
The model was trained using YOLOv8 (Ultralytics) on Python.
🧩 System Architecture
The architecture was intentionally lightweight, focusing on real-time feedback rather than cloud infrastructure.
Screen Capture → YOLOv8 Detection → Intersection over Union (IOU) Tracker → Isolation Logic → OpenCV Visualization
- Screen Capture: Captures the game’s minimap in real time using
mss. - YOLOv8 Inference: Each frame passes through the trained model.
- IOU Tracker: Attempts to maintain consistent IDs for detected players across consecutive frames to prevent them from being re-registered as “new” each time. However, in practice, the tracking isn’t fully reliable yet and still requires significant fine-tuning to perform consistently.
- Isolation Logic: Checks distances between friendlies and flags isolated ones.
- Visualization: Real-time color-coded overlay.
🧰 Implementation Highlights
The prototype was implemented as a single script:minimalcam.py
- Device Selection: The script was developed on a MacBook using Apple’s Metal (mps) backend for PyTorch. On other systems, you may need to adjust the device selection logic — for example, switching to cuda:0 for NVIDIA GPUs or cpu for general compatibility.
- Real-Time Cropping: Minimap cropped dynamically (
x=0, y=110, w=265, h=265). (Where the minimap is) - Custom IOU Tracker: ~100 lines of pure Python, no external dependencies.
- Color Logic:
- 🟩 Friendly 🟥 Enemy 🟦 Other 🟨 Isolated Friendly
🖥️ Running the Prototype
The model ran locally on a MacBook Air (M2) using PyTorch’s MPS backend.
With a resolution of 640×640, it maintained around 15–20 FPS, fast enough for continuous visualization.
🔍 Challenges and Learnings
- Dataset consistency: overlapping or incomplete labels sometimes confused the detector.
- Performance tuning: finding the right balance between confidence and FPS.
- Design philosophy: the system complements human coaches - it doesn’t replace them.
🚀 Future Directions
- Integrate coordinate mapping to get true distance units.
- Track isolation trends over rounds.
- Add dashboards for coaches or analysts.
- Combine with event data (kills, spike, rotations).
💬 Reflection
Twisted Minds Esports Hackathon showed how AI can augment human insight in esports.
Even a lightweight YOLOv8 model can surface tactical mistakes that are hard to spot manually.
🧩 Technical Summary
| Field | Details |
|---|---|
| Language | Python |
| Frameworks | Ultralytics YOLOv8, OpenCV, Torch, MSS |
| Script | screen_yolo_min.py (≈300 lines) |
| Model Type | Custom fine-tuned object detection |
| Dataset | Roboflow Valorant Map Analyzer |
| Github | page |