Find all the models and datasets here https://drive.google.com/drive/folders/1C5OmbEOIcEPVOVLLF2PnyUYg7sp2Fx3O?usp=sharing
Version thats works
- Python: 3.12
- CUDA: 12.1
- cuDNN: 9.2
Use the steps below to run the WIDER Face detection benchmark with the CUDA benchmark script.
From the repository root, run:
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python --versionExpected:
Python 3.12.x
- Download the WIDER Face dataset and the evaluation toolkit.
- Extract or copy them into
datasets/widerface/. - If you want to share the files from Google Drive, add your link here in the README.
The benchmark expects this structure:
datasets/widerface/
evaluation.py
setup.py
WIDER_val/
wider_face_eval_tools/
From the repository root, run:
cd datasets/widerface
python setup.py build_ext --inplace
cd ../..- Download the candidate ONNX models.
- Put them in
models/face_detection/. - If you want to share the model files from Google Drive, add your link here in the README.
The current CUDA benchmark script expects these files:
models/face_detection/scrfd10gkps.onnx
models/face_detection/face_detection_yunet_2023mar_raven.onnx
From the repository root, run:
pip install -r requirements.txtIf you are using a virtual environment, activate it first.
Run a quick runtime check:
python -c "import torch, onnxruntime as ort; print('Torch CUDA:', torch.cuda.is_available()); print('ORT providers:', ort.get_available_providers())"Expected:
Torch CUDA: True(if CUDA is set up correctly)ORT providersincludesCUDAExecutionProvider
From the repository root, run:
python src/benchmarks/benchmark_detector_cuda.pyThe script will prompt you to select a CUDA device if one is available.
The benchmark writes logs and evaluation outputs under src/benchmarks/results/.