Fork of derronqi/yolov7-face
Differences between original repository and fork:
- Compatibility with PyTorch >=2.0. (🔥)
- Original pretrained models and converted ONNX models from GitHub releases page. (🔥)
- The wider_val.txt file for WIDERFace evaluation.
- The following deprecations 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: Cython directive 'language_level' not set.
- Cython Warning: Using deprecated NumPy API.
pip install -r requirements.txt
Method | Test Size | Easy | Medium | Hard | FLOPs (B) @640 | Link |
---|---|---|---|---|---|---|
yolov7-lite-t | 640 | 88.7 | 85.2 | 71.5 | 0.8 | PyTorch, ONNX |
yolov7-lite-s | 640 | 92.7 | 89.9 | 78.5 | 3.0 | PyTorch, ONNX |
yolov7-tiny | 640 | 94.7 | 92.6 | 82.1 | 13.2 | PyTorch, ONNX |
yolov7s | 640 | 94.8 | 93.1 | 85.2 | 16.8 | PyTorch, ONNX |
yolov7 | 640 | 96.9 | 95.5 | 88.0 | 103.4 | PyTorch, ONNX |
yolov7+TTA | 640 | 97.2 | 95.8 | 87.7 | 103.4 | PyTorch |
yolov7-w6 | 960 | 96.4 | 95.0 | 88.3 | 89.0 | PyTorch, ONNX |
yolov7-w6+TTA | 1280 | 96.9 | 95.8 | 90.4 | 89.0 | PyTorch |
python detect.py --weights yolov7s-face.pt --source data/images/22_Picnic_Picnic_22_10.jpg
- Download WIDERFace validation dataset.
- Move dataset to
data/widerface/val
directory.
python test_widerface.py --weights yolov7s-face.pt --dataset_folder data/widerface/val/images/
cd widerface_evaluate
python setup.py build_ext --inplace
python evaluation.py
pip install onnx
python models/export.py --weights yolov7s-face.pt --grid