Skip to content

liangyuR/train_yolo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WoT AI

坦克世界 AI 辅助工具

项目结构

wot_ai/
├── pyproject.toml          # Poetry 配置文件
├── README.md               # 项目说明文档
├── tests/                  # 测试文件
└── data/                   # 数据目录(训练数据、模型等)

安装

使用 Poetry(推荐)

  1. 安装 Poetry(如果尚未安装):
pip install poetry
  1. 安装项目依赖:
poetry install
  1. 激活虚拟环境:
poetry env activate
C:\Users\11601\AppData\Local\pypoetry\Cache\virtualenvs\wot-ai-aIKBCqeS-py3.11\Scripts\activate.ps1

使用 pip

pip install -e .

依赖

主要依赖包括:

  • PyYAML
  • opencv-python
  • numpy==1.26.4
  • mss
  • pynput
  • loguru
  • dxcam>=0.0.5
  • ultralytics>=8.0.0
  • pytesseract
  • pyinstaller

完整依赖列表请查看 pyproject.toml

使用

数据采集

python -m wot_ai.data_collection.main

路径规划

python -m wot_ai.game_modules.navigation.controller.path_planning_controller

模型训练

# 训练小地图检测模型
python ./train_yolo/

# 准备数据集
python -m wot_ai.train_yolo.prepare_minimap_dataset

# 模型推理
python -m wot_ai.train_yolo.inference_minimap_yolo

开发

运行测试

poetry run pytest tests/

构建

使用 PyInstaller 构建可执行文件:

python -m wot_ai.data_collection.build

许可证

[添加许可证信息]

用模型预先标注后传入 cvat

python train_yolo/yolo_annotator.py --model path/to/model.pt --images path/to/images --output path/to/output --conf 0.25

python train_yolo/yolo_annotator.py --model C:\Users\11601\project\train_yolo\train_yolo\runs\train\exp-rot-mosaic4\weights\best.pt --images D:\WoTDataCollection\data\recordings\session_20251101_182453\frames --output D:\WoTDataCollection\data\yubiaozhu_20251213_1 --conf 0.25

About

YOLO训练

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages