高清人脸数据集—FFHQ
FFHQ全稱Flickr-Faces-Hight-Quality(Flickr-Faces-HQ)是英偉達作為生成對抗網(wǎng)絡(luò)(GAN)的基準創(chuàng)建的,也用于Style GAN的訓練數(shù)據(jù)集中,于2019年開源。FFHQ是一個高質(zhì)量的人臉數(shù)據(jù)集,包含1024x1024分辨率的70000張PNG格式高清人臉圖像,在年齡、種族和圖像背景上豐富多樣且差異明顯,在人臉屬性上也擁有非常多的變化,擁有不同的年齡、性別、種族、膚色、表情、臉型、發(fā)型、人臉姿態(tài)等,包括普通眼鏡、太陽鏡、帽子、發(fā)飾及圍巾等多種人臉周邊配件,因此該數(shù)據(jù)集也是可以用于開發(fā)一些人臉屬性分類或者人臉語義分割模型的。FFHQ的圖像從Flickr上爬取,且均有許可才會下載,并使用了dlib進行人臉對齊和裁剪,之后使用算法移除了一些非真實人臉如雕像、畫作及照片等圖像。
Flickr [1-2] ,雅虎旗下圖片分享網(wǎng)站。為一家提供免費及付費數(shù)位照片儲存、分享方案之線上服務(wù),也提供網(wǎng)絡(luò)社群服務(wù)的平臺。其重要特點就是基于社會網(wǎng)絡(luò)的人際關(guān)系的拓展與內(nèi)容的組織。這個網(wǎng)站的功能之強大,已超出了一般的圖片服務(wù),比如圖片服務(wù)、聯(lián)系人服務(wù)、組群服務(wù)。
FFHQ高清人臉數(shù)據(jù)集主要存儲于谷歌云盤。
數(shù)據(jù)集統(tǒng)計分析:
對于需要單獨訓練和驗證集的用例,指定了前 60,000 張圖像用于訓練,其余 10,000 張圖像用于驗證。 然而,在 StyleGAN 論文中,使用了所有 70,000 張圖像進行訓練。
已經(jīng)明確確保數(shù)據(jù)集中沒有重復(fù)的圖像。 但是,請注意,如果從同一圖像中提取了多個不同的人臉,則 in-the-wild 文件夾可能包含同一圖像的多個副本。
可以直接從 Google Drive 獲取數(shù)據(jù),也可以使用提供的下載腳本。 該腳本通過自動下載所有請求的文件、驗證它們的校驗和、在出錯時多次重試每個文件以及使用多個并發(fā)連接來最大化帶寬,使事情變得更加容易。
> python download_ffhq.py -h usage: download_ffhq.py [-h] [-j] [-s] [-i] [-t] [-w] [-r] [-a][--num_threads NUM] [--status_delay SEC][--timing_window LEN] [--chunk_size KB][--num_attempts NUM]Download Flickr-Face-HQ (FFHQ) dataset to current working directory.optional arguments:-h, --help show this help message and exit-j, --json download metadata as JSON (254 MB)-s, --stats print statistics about the dataset-i, --images download 1024x1024 images as PNG (89.1 GB)-t, --thumbs download 128x128 thumbnails as PNG (1.95 GB)-w, --wilds download in-the-wild images as PNG (955 GB)-r, --tfrecords download multi-resolution TFRecords (273 GB)-a, --align recreate 1024x1024 images from in-the-wild images--num_threads NUM number of concurrent download threads (default: 32)--status_delay SEC time between download status prints (default: 0.2)--timing_window LEN samples for estimating download eta (default: 50)--chunk_size KB chunk size for each download thread (default: 128)--num_attempts NUM number of download attempts per file (default: 10)獲取圖像鏈接后再進行數(shù)據(jù)下載:
> python ..\download_ffhq.py --json --images Downloading JSON metadata... \ 100.00% done 2/2 files 0.25/0.25 GB 43.21 MB/s ETA: done Parsing JSON metadata... Downloading 70000 files... | 100.00% done 70001/70001 files 89.19 GB/89.19 GB 59.87 MB/s ETA: done該腳本還用作對齊和裁剪圖像的自動化方案的參考實現(xiàn)。 使用 python download_ffhq.py --wilds 下載原始圖像后,您可以運行 python download_ffhq.py --align 使用元數(shù)據(jù)中包含的面部標志位置重現(xiàn)對齊的 1024×1024 圖像的精確副本 .
ffhq-dataset-v2.json 文件以機器可讀的格式包含每個圖像的以下信息:
{"0": { # Image index"category": "training", # Training or validation"metadata": { # Info about the original Flickr photo:"photo_url": "https://www.flickr.com/photos/...", # - Flickr URL"photo_title": "DSCF0899.JPG", # - File name"author": "Jeremy Frumkin", # - Author"country": "", # - Country where the photo was taken"license": "Attribution-NonCommercial License", # - License name"license_url": "https://creativecommons.org/...", # - License detail URL"date_uploaded": "2007-08-16", # - Date when the photo was uploaded to Flickr"date_crawled": "2018-10-10" # - Date when the photo was crawled from Flickr},"image": { # Info about the aligned 1024x1024 image:"file_url": "https://drive.google.com/...", # - Google Drive URL"file_path": "images1024x1024/00000/00000.png", # - Google Drive path"file_size": 1488194, # - Size of the PNG file in bytes"file_md5": "ddeaeea6ce59569643715759d537fd1b", # - MD5 checksum of the PNG file"pixel_size": [1024, 1024], # - Image dimensions"pixel_md5": "47238b44dfb87644460cbdcc4607e289", # - MD5 checksum of the raw pixel data"face_landmarks": [...] # - 68 face landmarks reported by dlib},"thumbnail": { # Info about the 128x128 thumbnail:"file_url": "https://drive.google.com/...", # - Google Drive URL"file_path": "thumbnails128x128/00000/00000.png", # - Google Drive path"file_size": 29050, # - Size of the PNG file in bytes"file_md5": "bd3e40b2ba20f76b55dc282907b89cd1", # - MD5 checksum of the PNG file"pixel_size": [128, 128], # - Image dimensions"pixel_md5": "38d7e93eb9a796d0e65f8c64de8ba161" # - MD5 checksum of the raw pixel data},"in_the_wild": { # Info about the in-the-wild image:"file_url": "https://drive.google.com/...", # - Google Drive URL"file_path": "in-the-wild-images/00000/00000.png", # - Google Drive path"file_size": 3991569, # - Size of the PNG file in bytes"file_md5": "1dc0287e73e485efb0516a80ce9d42b4", # - MD5 checksum of the PNG file"pixel_size": [2016, 1512], # - Image dimensions"pixel_md5": "86b3470c42e33235d76b979161fb2327", # - MD5 checksum of the raw pixel data"face_rect": [667, 410, 1438, 1181], # - Axis-aligned rectangle of the face region"face_landmarks": [...], # - 68 face landmarks reported by dlib"face_quad": [...] # - Aligned quad of the face region}},... }參考資料
FFHQ高清人臉數(shù)據(jù)集詳細介紹
flickr
NVlabs/ffhq-dataset
總結(jié)
以上是生活随笔為你收集整理的高清人脸数据集—FFHQ的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 老歌新唱--使用VB6开发的Active
- 下一篇: 深入浅出理解索引结构