# Easyportrait Eval

> Evaluates semantic segmentation models on fine-grained face parsing and portrait segmentation. It probes a model's ability to accurately delineate nine distinct facial and occlusion classes in high-resolution indoor portrait images. Use when the user wants to benchmark on EasyPortrait, or asks about evaluating this task. Reports mIoU.

- Skill: `qhjqhj00/easyportrait-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/easyportrait-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/easyportrait-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/easyportrait-eval

---


# easyportrait-eval

> EasyPortrait -- Face Parsing and Portrait Segmentation Dataset — Kapitanov et al. (2023) (arXiv:2304.13509, 2023)

## What this evaluates

Evaluates semantic segmentation models on fine-grained face parsing and portrait segmentation. It probes a model's ability to accurately delineate nine distinct facial and occlusion classes in high-resolution indoor portrait images.

## Datasets

- **EasyPortrait** — total 20000; splits: test (-1); repo https://github.com/hukenovs/easyportrait

## Metrics

- `mIoU` **(primary)** — range: [0, 1]
  - Mean Intersection over Union computed across 9 segmentation classes. For each class, IoU is the intersection of predicted and ground truth masks divided by their union; mIoU is the average IoU across all classes.

## Input / output format

**Input**: RGB portrait images resized to 1024 × 1024 pixels, padded to 1920 × 1920 during augmentation, with photometric distortions applied.

**Output**: 9-class semantic segmentation masks (background, person, face skin, eyes, eyebrows, lips, teeth, and occlusions like beard, glasses, hands).

## Scoring recipe

```python
def compute_miou(pred_masks, gt_masks, num_classes=9):
    ious = []
    for c in range(num_classes):
        pred_c = (pred_masks == c)
        gt_c = (gt_masks == c)
        intersection = np.logical_and(pred_c, gt_c).sum()
        union = np.logical_or(pred_c, gt_c).sum()
        if union == 0:
            ious.append(0.0)
        else:
            ious.append(intersection / union)
    return np.mean(ious)
```

## Common pitfalls

- Applying random horizontal or vertical flips during training or evaluation, as it misaligns facial features like eyes and eyebrows.
- Using standard cross-entropy loss for BiSeNet-V2; the authors specify it requires OHEM loss.
- Training different architectures for different iteration counts (20,000 vs 40,000) and batch sizes (8 vs 16) to ensure fair comparison.

## Evidence (verbatim from paper)

> We report about it using mean Intersection over Union (mIoU). The results of our experiments (Table 4 and Table 5) show that all models trained on EasyPortrait have high enough values of the mIoU metric.

## Citation

```bibtex
@misc{kapitanov2023easyportrait,
  title={EasyPortrait -- Face Parsing and Portrait Segmentation Dataset},
  author={Kapitanov et al. (2023)},
  year={2023},
  note={arXiv:2304.13509}
}
```

- arXiv: 2304.13509

