Syntetisk data för verklig segmentering – Utvärdering av CNN och ViT för generalisering
The phrase "garbage in, garbage out", refers to a core principle of machine learning, that the quality of a model's output is tied to the quality of its training data. While real-world datasets have long been the gold standard, their acquisition is often costly, privacy-invasive, and prone to bias. These aspects are motivating the exploration of synthetic data as an alternative. This thesis investigates the effectiveness of synthetic data for semantic facial segmentation by comparing two deep learning architectures: the Vision Transformer-based SegFormer and the convolutional UNet++. Both models were trained from scratch on the fully synthetic Devant dataset and evaluated on the real-world LaPa dataset. To account for structural differences in annotation, a label adaptation step was applied post-training. Three core research questions are addressed: how well ViT and CNN architectures generalize from synthetic to real-world domains; how training dataset size affects generalization; and how critical data augmentation is for performance. Results show that SegFormer consistently outperforms UNet++ in both mIoU and inference speed (63.9 vs. 59.6 mIoU; 28.4\% faster). Adaptation proved essential for aligning label definitions and enabling fair evaluation, and data augmentation emerged as a prerequisite for any meaningful generalization. In conclusion, the study demonstrates that Vision Transformers trained on synthetic data, when paired with strong augmentation and adaptation, can match or surpass traditional CNNs, supporting their viability for privacy-preserving and scalable machine learning applications.
Publication Details
- Journal
- KTH Publication Database DiVA (KTH Royal Institute of Technology)
- Published
- 2025-01-01
- Primary Topic
- Face recognition and analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00