YOLOv12当前需要通过GitHub源码安装,以下是详细的跨平台安装指南:
基础环境准备:
- Python 3.11+(推荐3.11.4)
- Git-Versionskontrollsystem
- NVIDIA GPU驱动(可选,但强烈建议)和CUDA 11.8+
通用安装步骤:
- Klon-Lagerhaus:
git clone https://github.com/sunsmarterjie/yolov12.git - 创建虚拟环境(推荐Conda):
conda create -n yolov12 python=3.11 - 安装PyTorch(需匹配CUDA版本):
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118 - Installieren Sie die Abhängigkeit:
pip install -r requirements.txt
操作系统特需配置:
- Windows (Computer):需要手动安装Visual Studio Build Tools(C++组件)
- macOS:M系列芯片需使用
conda install -c apple tensorflow-deps解决兼容性问题 - Linux:推荐Ubuntu 20.04+,注意CUDA驱动版本匹配
验证安装成功可执行:python -c "from ultralytics import YOLO; print('YOLOv12 installed successfully')"
Diese Antwort stammt aus dem ArtikelYOLOv12: ein Open-Source-Tool für die Echtzeit-Erkennung von Bild- und VideozielenDie



















