open model · computer vision

Versalit EPI-2

Everyone checks hard hats. EPI-2 takes care of the rest: gloves, goggles and boots — and, more importantly, who is missing them. The second model of the open series, a companion to EPI-1.

Apache-2.0RF-DETR small6 classesONNX + PyTorch
Video demo: green box when the glove is there, red when it is missing.

What it does

Six classes in three pairs: gloves and no gloves, goggles and no goggles, boots and no boots. Green box when the PPE is there, red when it is missing. On video, it becomes a continuous monitor on the camera you already have.

Everyone checks hard hats. The most common serious injuries happen to hands, eyes and feet — and almost no open model detects that PPE with documentation in Portuguese. EPI-2 does not just see the glove: it sees the bare hand.

How it works

It uses RF-DETR small with a 512 px input — one step up from EPI-1's nano, because gloves and goggles take up few pixels and need more detail.

The source dataset had 14 PPE classes; they were remapped to the 6 that matter for hands, eyes and feet. The labels the model returns are glove, no_glove, goggles, no_goggles, shoes and no_shoes — the inference script translates them to Portuguese when drawing.

During training, the selected checkpoint was epoch 2, the one with the best mAP50:95 (EMA); in later epochs the validation metrics started to drop.

Metrics

MetricValue
mAP500.599
mAP50:950.301
Precision0.678
Recall0.591

How to read it: the number is lower than EPI-1's because the task is harder — small objects, and "missing X" classes that only exist when the hand, face or foot is visible in the frame. Measured on the validation split, 4,349 images the model never saw during training.

How to run

git clone https://huggingface.co/delvek/versalit-epi-2
cd versalit-epi-2
pip install -r requirements.txt
python infer.py --model epi-2.onnx --input photo.jpg --output result.jpg
python infer.py --model epi-2.onnx --input video.mp4 --output out.mp4

Retrain or fine-tune on your photos

python download_dataset.py   # downloads BIDJOE/ppe-14classes (28.8k images)
python yolo_to_coco.py       # converts to COCO and remaps to 6 classes
python train.py --size small --epochs 16
python export_onnx.py        # builds epi-2.onnx

Honest limitations

  • Gloves and goggles are small objects — in very wide or 4K frames, crop the work area for better precision.
  • "Missing X" classes depend on the hand, face or foot being visible in the frame.
  • The dataset is mostly generic construction and industry; in low light or with dirty PPE, fine-tuning on your own photos makes the model much sharper.
  • It is a monitoring aid, not regulatory certification.