基于YOLO模型的车辆零部件缺陷检测API服务,支持实时检测零部件表面缺陷(裂纹、划痕、凹痕等)。提供RESTful接口,可快速集成到工业质检系统中。
推荐环境
- CUDA 工具包: 11.8+
- cuDNN: 8.9.6+
- NVIDIA 驱动: >= 515.65.01
- 操作系统:
- Windows 10/11 (x64)
- Ubuntu 18.04/20.04/22.04 LTS (x64)
- 从Releases页面下载最新压缩包
- 解压到任意目录(建议路径不含中文或空格)
cd fastapi_gpu_CTRS2 # 进入项目目录
fastapi_gpu_CTRS2.exe -h # 查看使用帮助
usage: fastapi_gpu_CTRS2.exe [-h] [--workers WORKERS] port model
positional arguments:
port 端口号
model YOLO模型文件路径
options:
-h, --help show this help message and exit
--workers WORKERS 工作进程数fastapi_gpu_CTRS2.exe <端口号> <模型路径>fastapi_gpu_CTRS2.exe 10195 NEU-DET.pt主要目录结构:
fastapi_gpu_CTRS2/
├── _internal/ # 各类依赖库
├── uploads/ # 存放检测结果的目录,首次检测时创建
├── NEU-DET.pt # 默认提供的检测模型
└── fastapi_gpu_CTRS2.exe # 执行文件成功启动服务后,访问 http://localhost:端口号/docs 获取交互式API文档