Run this model with HF Jobs

Run LibreYOLO/face-rfdetr-nano on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/LibreYOLO/face-rfdetr-nano. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/LibreYOLO/face-rfdetr-nano on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

face-rfdetr-nano

RF-DETR Nano fine-tuned on WIDERFACE for single-class face detection. Exported to ONNX (opset 17, 384x384 input) so the same weights run in Python (via onnxruntime) and in the browser (via libreyolo-web).

Part of the LibreYOLO family. MIT licensed. No AGPL.

Use it

pip install onnxruntime opencv-python huggingface_hub numpy
python -m src.use_pretrained --image my_photo.jpg

Full use case (pipeline, notebook, browser demo): LibreYOLO/use-cases/blur-faces.

Numbers

Trained on a tiny slice of WIDERFACE: 80 train images, 20 val images, 30 epochs, RF-DETR Nano backbone, 384 input, Apple MPS.

Metric Value
AP @ IoU 0.50 0.93
AR small 0.52
AR medium 0.61
AR large 0.80
Training time 38 min

Both numbers are noisy because the val split is only 20 images. The model blurs well-lit frontal faces reliably and misses tiny or occluded ones. For production use, fine-tune on more data with the same pipeline.

Reproduce

git clone https://github.com/LibreYOLO/use-cases
cd use-cases/blur-faces
pip install -r requirements.txt
python -m src.download_widerface
python -m src.train --epochs 30
python -m src.eval

I/O

  • Input: float32 tensor [1, 3, 384, 384], RGB, ImageNet-normalized (mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), direct resize (no letterbox).
  • Outputs: two tensors, boxes [B, Q, 4] (cxcywh, normalized to [0,1]) and logits [B, Q, 2] (background + face, apply sigmoid).
  • Q is 300 query slots. Filter by sigmoid score threshold.

License

MIT for the weights. Training data is WIDERFACE and inherits its own license terms.

Downloads last month
91
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train LibreYOLO/face-rfdetr-nano

Collection including LibreYOLO/face-rfdetr-nano