42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
# Face Detection Models
|
|
|
|
This directory contains ONNX model files for face detection and embedding.
|
|
|
|
## Required Models
|
|
|
|
### BlazeFace (Face Detection)
|
|
- **File**: `blazeface.onnx`
|
|
- **Purpose**: Fast face detection
|
|
- **Input**: RGB image [1, 3, 128, 128]
|
|
- **Output**: Bounding boxes and confidence scores
|
|
|
|
Download from: https://github.com/onnx/models/tree/main/vision/body_analysis/ultraface
|
|
|
|
### MobileFaceNet (Face Embedding)
|
|
- **File**: `mobilefacenet.onnx`
|
|
- **Purpose**: Face feature extraction
|
|
- **Input**: Aligned face [1, 3, 112, 112]
|
|
- **Output**: 128-dimensional embedding
|
|
|
|
Download from: https://github.com/onnx/models
|
|
|
|
## Model Conversion
|
|
|
|
If you have models in other formats, convert to ONNX using:
|
|
|
|
```bash
|
|
# From TensorFlow
|
|
python -m tf2onnx.convert --saved-model ./model --output model.onnx
|
|
|
|
# From PyTorch
|
|
import torch
|
|
torch.onnx.export(model, dummy_input, "model.onnx")
|
|
```
|
|
|
|
## License
|
|
|
|
Please ensure you comply with the licenses of any models you download:
|
|
- BlazeFace: Apache 2.0
|
|
- MobileFaceNet: MIT
|
|
- ArcFace: MIT
|