Files
Test_AI/clean_test.bat
16337 942244bd88 Add YOLO11 TensorRT quantization benchmark scripts
- Engine build scripts (FP16/INT8)
- Benchmark validation scripts
- Result parsing and analysis tools
- COCO dataset configuration
2026-01-29 13:59:42 +08:00

41 lines
1.1 KiB
Batchfile

@echo off
echo ============================================
echo Clean Build & Test: FP16 480p
echo ============================================
call conda activate yolo
echo [1/4] Delete old engine and results...
del /Q yolo11n_fp16_480.engine 2>nul
del /Q fp16_480_results.txt 2>nul
echo Done.
echo.
echo [2/4] Build FP16 480p (static, no dynamic shapes)...
trtexec --onnx=yolo11n.onnx --saveEngine=yolo11n_fp16_480.engine --fp16 --workspace=4096 --noTF32
echo Done.
echo.
echo [3/4] Test FP16 480p...
yolo val model=yolo11n_fp16_480.engine data=coco.yaml imgsz=480 batch=1 device=0 classes=0,1,2,3,5,7 > fp16_480_results.txt 2>&1
echo Done.
echo.
echo [4/4] Check results...
python -c "
import re
with open('fp16_480_results.txt','r') as f:
content = f.read()
if 'Error' in content or 'error' in content:
print('ERROR: Validation failed')
else:
m = re.search(r'Speed:.*?([\d.]+)ms.*?([\d.]+)ms inference', content, re.DOTALL)
if m:
print(f'OK: {m.group(2)}ms inference')
else:
print('No speed data found')
"
echo.
echo Done. Run: python parse_simple.py
pause