Fork of Krasjet-Yu/YOLO-FaceV2
Differences between original repository and fork:
- Compatibility with PyTorch >=2.4. (🔥)
- Converted ONNX models from GitHub releases page. (🔥)
- The wider_val.txt file for WIDERFace evaluation.
- The following deprecations and errors has been fixed:
- UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument.
- DeprecationWarning: 'np.float' is a deprecated alias for builtin 'float'.
- FutureWarning: You are using 'torch.load' with 'weights_only=False'.
- FutureWarning: Cython directive 'language_level' not set.
- Cython Warning: Using deprecated NumPy API.
- AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'.
pip install -r requirements.txt- Download links:
| Name | Model Size (MB) | Link | SHA-256 |
|---|---|---|---|
| YOLO-FaceV2 | 36.2 71.8 |
PyTorch ONNX |
f424fd437b22711207c48aac4c205d844eaea2f3c12e2f3f7ecd7f9650634e44 8ad769e4e9fd5869baa4243367e041df901a228e121a1602deec85074d2bd7ed |
python detect.py --weights yolo-facev2.pt --source data/images/bus.jpg- Download WIDERFace validation dataset.
- Move dataset to
data/widerface/valdirectory.
python widerface_pred.py --weights yolo-facev2.pt --dataset_folder data/widerface/val/imagescd widerface_evaluatepython setup.py build_ext --inplacepython evaluation.pypip install onnxpython models/export.py --weights yolo-facev2.pt --grid