edgarcancinoe/celebahq_512_id_clusters
收藏资源简介:
--- pretty_name: "celebahq_512 with SRK identity labels" task_categories: - image-classification tags: - faces - celeba-hq - clustering - identity-labels source_datasets: - jxie/celeba-hq size_categories: - 10K<n<100K --- # celebahq_512 with SRK identity labels ## Summary This dataset is a derived version of [jxie/celeba-hq](https://huggingface.co/datasets/jxie/celeba-hq/tree/7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b). It keeps the original image set and adds automatically generated identity-group labels derived from face-embedding clustering. As explained in our experimental setup, we use CelebA-HQ from Karras et al. (2018), specifically the Hugging Face snapshot at revision `7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b`. The referenced CelebA-HQ version provides gender labels but no identity annotations. To support identity unlearning, we therefore construct identity labels automatically by clustering the embedding space. ## How identity labels were created We cluster the embedding space using DBSCAN, a density-based method that groups samples according to local similarity without requiring a predefined number of clusters. We use the Scikit-Learn implementation with cosine distance. Nearest-neighbor cosine-similarity analysis reveals two clear modes, with peaks around `s ~= 0.8` and `s ~= 0.25`. The high-similarity peak corresponds to samples of the same identity, while the lower peak captures ArcFace-similar but distinct individuals. Between these modes, a minimum appears around `s ~= 0.4`, providing a natural separation threshold. For this release, we use: - cosine distance threshold `eps = 0.35` - minimum samples per cluster `min_samples = 2` This procedure produces `9,683` clusters over `27,996` images, which we use as identity labels during training. Manual inspection confirms that the resulting clusters are visually consistent. Empirically, similarities above `s > 0.6` almost always correspond to the same individual, with only rare exceptions arising from lighting changes or strong facial occlusions. ## Columns - `image`: image file - `file_name`: original file name - `cluster_id`: DBSCAN-derived identity label - `cluster_size`: number of images assigned to that identity cluster ## Notes - `cluster_id` values are automatically generated labels, not official CelebA-HQ person identifiers. - The identity annotations are derived from embedding clustering rather than provided by the source dataset. - By default, this export keeps only the image and cluster-related columns needed for downstream identity-unlearning experiments. ## Source references - Original dataset snapshot: [jxie/celeba-hq @ 7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b](https://huggingface.co/datasets/jxie/celeba-hq/tree/7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b) - Original paper: [Karras et al., 2018, "A Style-Based Generator Architecture for Generative Adversarial Networks"](https://arxiv.org/abs/1812.04948)
pretty_name: "带有SRK身份标签的celebahq_512" task_categories: - 图像分类 tags: - 人脸 - CelebA-HQ - 聚类 - 身份标签 source_datasets: - jxie/celeba-hq size_categories: - 10000 < 样本数 < 100000 --- # 带有SRK身份标签的celebahq_512 ## 摘要 本数据集是[jxie/celeba-hq](https://huggingface.co/datasets/jxie/celeba-hq/tree/7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b)的衍生版本。其完整保留了原始图像集,并新增了基于人脸嵌入聚类自动生成的身份分组标签。 正如实验设置中所述,本项目使用了Karras等人2018年提出的CelebA-HQ数据集,具体为修订版本号为`7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b`的Hugging Face快照。该版本的CelebA-HQ仅提供性别标注,未附带身份相关注释。为支持身份遗忘学习(identity unlearning)实验,我们通过对人脸嵌入空间进行聚类,自动构建了身份标签。 ## 身份标签的生成流程 我们采用基于密度的空间聚类算法(Density-Based Spatial Clustering of Applications with Noise,DBSCAN)对嵌入空间进行聚类,该方法无需预设聚类数量,可根据样本局部相似性完成分组。我们使用Scikit-Learn库实现该算法,并以余弦距离作为相似度度量标准。 通过最近邻余弦相似度分析可观测到两个显著的峰值区间:分别位于`s≈0.8`与`s≈0.25`处。高相似度区间对应同一身份的样本,而低相似度区间则对应ArcFace相似度相近但身份不同的个体。在两个峰值之间,相似度`s≈0.4`处存在一个极小值,可作为自然的聚类划分阈值。 本次发布的数据集采用以下参数: - 余弦距离阈值`eps = 0.35` - 每个聚类的最小样本数`min_samples = 2` 通过该流程,在27996张图像上共生成9683个聚类,我们将其作为训练过程中的身份标签。人工检视结果表明,生成的聚类视觉一致性良好。经验证,相似度`s>0.6`的样本几乎始终对应同一身份,仅在光照变化或面部遮挡严重时存在极少数例外情况。 ## 数据字段 - `image`:图像文件 - `file_name`:原始文件名 - `cluster_id`:基于DBSCAN生成的身份标签 - `cluster_size`:分配至该身份聚类的图像数量 ## 说明 - `cluster_id`为自动生成的标签,并非CelebA-HQ官方提供的人物标识符。 - 本数据集的身份标注源自嵌入空间聚类,而非源数据集自带的官方标注。 - 默认情况下,本次导出仅保留下游身份遗忘学习(identity unlearning)实验所需的图像及聚类相关字段。 ## 来源引用 - 原始数据集快照:[jxie/celeba-hq @ 7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b](https://huggingface.co/datasets/jxie/celeba-hq/tree/7ecc6a45edfb5483ccf2f7df1035d298ffe7c76b) - 原始论文:[Karras等人,2018,《用于生成对抗网络的风格化生成器架构》(A Style-Based Generator Architecture for Generative Adversarial Networks)](https://arxiv.org/abs/1812.04948)



