Skip to content

clibdev/YOLO-FaceV2

Repository files navigation

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'.

Installation

pip install -r requirements.txt

Pretrained models

  • Download links:
Name Model Size (MB) Link SHA-256
YOLO-FaceV2 36.2
71.8
PyTorch
ONNX
f424fd437b22711207c48aac4c205d844eaea2f3c12e2f3f7ecd7f9650634e44
8ad769e4e9fd5869baa4243367e041df901a228e121a1602deec85074d2bd7ed

Inference

python detect.py --weights yolo-facev2.pt --source data/images/bus.jpg

WIDERFace evaluation

python widerface_pred.py --weights yolo-facev2.pt --dataset_folder data/widerface/val/images
cd widerface_evaluate
python setup.py build_ext --inplace
python evaluation.py

Export to ONNX format

pip install onnx
python models/export.py --weights yolo-facev2.pt --grid

About

YOLO-FaceV2 in Pytorch and ONNX

Resources

Stars

Watchers

Forks

Packages

No packages published