StyleGAN2 Artifacts: A Multimodal Dataset for Vision-Language Models
收藏资源简介:
This repository contains the multimodal dataset, model implementation, and training infrastructure for the semantic segmentation of visual artifacts in StyleGAN2-generated facial imagery. To bridge the gap between generative computer vision anomalies and language-guided reasoning, the pipeline focuses on preparing data for Vision-Language Models (VLMs). The core localization architecture leverages a Multi-Scale UNet (MS-UNet) integrated with a Swin Transformer backbone, optimized to capture both fine-grained pixel anomalies (such as checkerboard patterns and blending errors) and broader global semantic context. The resulting multimodal dataset pairs spatial segmentation masks with structured technical metadata, providing a robust benchmarking framework for deepfake detection, generative model quality assessment, and multimodal AI training. The entire pipeline is implemented in Python, R, Jupyter and Shell. list/ Contains text files defining dataset splits: train.txt – file paths for training data val.txt – file paths for validation data test.txt – file paths for testing data Scripts are provided to automatically split data into these lists. loss/ Includes several loss functions for segmentation tasks. This project uses a Dynamic Loss, which combines BCE and Tversky. network/ Implements the MS-UNet architecture. Unlike the original implementation, this version integrates the SwinTransformerBlock from torchvision.models.swin_transformer. scripts/ Contains various utility scripts: CSV handling (writing and reading metric logs) Graph generation for training/validation curves Validation functions to compute validation loss and metrics (Dice, IoU, etc.) config.yaml Central configuration file for: Model parameters Dataset paths Training settings (learning rate, batch size, etc.) Loss configuration and scheduler settings config.py Stores configuration objects and utility functions for loading parameters from config.yaml. train.py and trainer.py train.py initializes training and calls trainer.py. trainer.py handles the full training loop, validation, and logging.



