当前位置:网站首页>Fashion-Gen: The Generative Fashion Dataset and Challenge 论文解读&数据集介绍
Fashion-Gen: The Generative Fashion Dataset and Challenge 论文解读&数据集介绍
2022-07-06 09:16:00 【曹家小圆宝】
论文解读
论文地址:https://arxiv.org/abs/1806.08317
数据集划分
数目 | train | val | test |
---|---|---|---|
293, 008 | 260, 480 | 32, 528 | 32, 528 |
类别介绍
数据集中有48个主类,121个子类。
如下是训练集、测试集中类别占比
图片统计
如下是训练集中主类、子类的图片数目统计
文本描述
如下是文本描述长度的统计
如下是从文本中提取的颜色分布
chanllenge
- Generating high-resolution images using P-GANs
- Text-to-Image synthesis
评估方法
- Inception Score
- Human Evaluation(因为Inception Score没考虑文本图片之间的相关性)
数据集下载
看到FashionBERT论文里的数据集FashionGEN,想了解一下,但是官网上填了个表单就没信了,地址为:https://fashion-gen.com/于是又在网上找了相关内容,找到一个网址https://github.com/menardai/FashionGenAttnGAN
上面有3个文件(注:没有提供测试集,论文中说不会提供测试集,被集成在了论文的docker中)
- fashiongen_256_256_train.h5
- fashiongen_256_256_validation.h5
- fashiongen_consume_data_example.pdf
分析代码
参考https://docs.h5py.org/en/stable/quick.html用以下代码进行分析
import h5py
import numpy as np
BATCH_SIZE = 32
def get_batch(file_h5, features, batch_number, batch_size=32):
"""Get a batch of the dataset Args: file_h5(str): path of the dataset features(list(str)): list of names of features present in the dataset that should be returned. batch_number(int): the id of the batch to be returned. batch_size(int): the mini-batch size Returns: A list of numpy arrays of the requested features"""
list_of_arrays = []
lb, ub = batch_number * batch_size, (batch_number + 1) * batch_size
for feature in features:
list_of_arrays.append(file_h5[feature][lb: ub])
return list_of_arrays
# open the file
# file_h5 = h5py.File('fashiongen_256_256_train.h5', mode='r')
file_h5 = h5py.File('fashiongen_256_256_validation.h5', mode='r')
# define the features to be retrieved
list_of_features = ['input_image', 'input_description']
dataset_len = len(file_h5['input_image'])
nb_batches = int(dataset_len / BATCH_SIZE)
batch_nb = np.random.randint(0, nb_batches)
# get the first batch of the data
list_of_arrays = get_batch(file_h5, list_of_features, batch_nb, BATCH_SIZE)
# close the file
file_h5.close()
得到训练集数目260490、验证集数目32528
数据集是个类似dict的结构,keys分别为
[‘index’, ‘index_2’, ‘input_brand’, ‘input_category’, ‘input_composition’, ‘input_concat_description’, ‘input_department’, ‘input_description’, ‘input_gender’, ‘input_image’, ‘input_msrpUSD’, ‘input_name’, ‘input_pose’, ‘input_productID’, ‘input_season’, ‘input_subcategory’]
图片的维度为:
(256, 256, 3)
内容分析
以验证集为例,接下来一个一个分析内容
- index
file_h5['index'].shape
# (32528, 1)
file_h5['index'][0:][0:]
# 输出以下
[[ 24]
[ 25]
[ 26]
...
[342153]
[342154]
[342155]]
- index_2
file_h5['index_2'].shape
# (32528,)
file_h5['index_2'][0:]
# 输出以下
[ 0 1 2 ... 32525 32526 32527]
- input_brand
file_h5['input_brand'].shape
# (32528, 1)
file_h5['input_brand'][0:][0:]
# 输出以下
array([[b'Diesel'],
[b'Diesel'],
[b'Diesel'],
...,
[b'Calvin Klein 205W39NYC'],
[b'Calvin Klein 205W39NYC'],
[b'Calvin Klein 205W39NYC']], dtype='|S100')
- input_category
file_h5['input_category'].shape
# (32528, 1)
file_h5['input_category'][0:][0:]
# 输出以下
array([[b'JACKETS & COATS'],
[b'JACKETS & COATS'],
[b'JACKETS & COATS'],
...,
[b'SHIRTS'],
[b'SHIRTS'],
[b'SHIRTS']], dtype='|S100')
- input_composition
file_h5['input_composition'].shape
# (32528, 1)
file_h5['input_composition'][0:][0:]
# 输出以下
array([[b'90% cotton, 8% polyester, 2% elastane.'],
[b'90% cotton, 8% polyester, 2% elastane.'],
[b'90% cotton, 8% polyester, 2% elastane.'],
...,
[b'100% cotton.'],
[b'100% cotton.'],
[b'100% cotton.']], dtype='|S200')
- input_concat_description
file_h5['input_concat_description'].shape
# (32528, 1)
file_h5['input_concat_description'][0:][0:]
# 输出以下
array([[b'Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching. Semi-sheer t-shirt in heather white. Crewneck collar. Patch pocket at breast. Tonal stitching.'],
[b'Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching. Semi-sheer t-shirt in heather white. Crewneck collar. Patch pocket at breast. Tonal stitching.'],
[b'Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching. Semi-sheer t-shirt in heather white. Crewneck collar. Patch pocket at breast. Tonal stitching.'],
...,
[b"Long sleeve cotton poplin shirt in 'optic' white. Spread collar featuring carved silver-tone hardware. Button closure at front. Single-button barrel cuffs. Tonal stitching. Slim-fit 'uniform' twill trousers in black. Mid-rise. Four-pocket styling. Central pleat at front and back legs. Grosgrain tape striped in blue and purple at outseams. Zip-fly. Partially lined. Tonal stitching. Long sleeve coated cotton-blend trench coat in beige. Notched lapel collar. Concealed button closure at front. Detachable pin-buckle belt and welt pockets at waist. Buttoned tab at central back vent and cuffs. Epaulets. Storm flap. Unlined. Tonal stitching."],
[b"Long sleeve cotton poplin shirt in 'optic' white. Spread collar featuring carved silver-tone hardware. Button closure at front. Single-button barrel cuffs. Tonal stitching. Slim-fit 'uniform' twill trousers in black. Mid-rise. Four-pocket styling. Central pleat at front and back legs. Grosgrain tape striped in blue and purple at outseams. Zip-fly. Partially lined. Tonal stitching. Long sleeve coated cotton-blend trench coat in beige. Notched lapel collar. Concealed button closure at front. Detachable pin-buckle belt and welt pockets at waist. Buttoned tab at central back vent and cuffs. Epaulets. Storm flap. Unlined. Tonal stitching."],
[b"Long sleeve cotton poplin shirt in 'optic' white. Spread collar featuring carved silver-tone hardware. Button closure at front. Single-button barrel cuffs. Tonal stitching. Slim-fit 'uniform' twill trousers in black. Mid-rise. Four-pocket styling. Central pleat at front and back legs. Grosgrain tape striped in blue and purple at outseams. Zip-fly. Partially lined. Tonal stitching. Long sleeve coated cotton-blend trench coat in beige. Notched lapel collar. Concealed button closure at front. Detachable pin-buckle belt and welt pockets at waist. Buttoned tab at central back vent and cuffs. Epaulets. Storm flap. Unlined. Tonal stitching."]],
dtype='|S800')
- input_department
file_h5['input_department'].shape
# (32528, 1)
file_h5['input_department'][0:][0:]
# 输出以下
array([[b'CLOTHING'],
[b'CLOTHING'],
[b'CLOTHING'],
...,
[b'CLOTHING'],
[b'CLOTHING'],
[b'CLOTHING']], dtype='|S100')
- input_description
file_h5['input_description'].shape
# (32528, 1)
file_h5['input_description'][0:][0:]
# 输出以下
array([[b'Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching.'],
[b'Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching.'],
[b'Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching.'],
...,
[b"Long sleeve cotton poplin shirt in 'optic' white. Spread collar featuring carved silver-tone hardware. Button closure at front. Single-button barrel cuffs. Tonal stitching."],
[b"Long sleeve cotton poplin shirt in 'optic' white. Spread collar featuring carved silver-tone hardware. Button closure at front. Single-button barrel cuffs. Tonal stitching."],
[b"Long sleeve cotton poplin shirt in 'optic' white. Spread collar featuring carved silver-tone hardware. Button closure at front. Single-button barrel cuffs. Tonal stitching."]],
dtype='|S400')
- input_gender
file_h5['input_gender'].shape
# (32528, 1)
file_h5['input_gender'][0:][0:]
# 输出以下
array([[b'Men'],
[b'Men'],
[b'Men'],
...,
[b'Men'],
[b'Men'],
[b'Men']], dtype='|S30')
- input_image
file_h5['input_image'].shape
# (32528, 256, 256, 3)
file_h5['input_image'][0].shape
# (256, 256, 3)
- input_msrpUSD
file_h5['input_msrpUSD'].shape
(32528, 1)
file_h5['input_msrpUSD'][0:][0:]
# 输出以下
array([[335.],
[335.],
[335.],
...,
[990.],
[990.],
[990.]], dtype=float32)
- input_name
file_h5['input_name'].shape
# (32528, 1)
file_h5['input_name'][0:][0:]
# 输出以下
array([[b'Blue Faded Elshar Jogg Jacket'],
[b'Blue Faded Elshar Jogg Jacket'],
[b'Blue Faded Elshar Jogg Jacket'],
...,
[b'White Pointed Collar Shirt'],
[b'White Pointed Collar Shirt'],
[b'White Pointed Collar Shirt']], dtype='|S100')
- ‘input_pose
file_h5['input_pose'].shape
# (32528, 1)
file_h5['input_pose'][0:][0:]
# 输出以下
array([[b'id_gridfs_1'],
[b'id_gridfs_2'],
[b'id_gridfs_3'],
...,
[b'id_gridfs_3'],
[b'id_gridfs_4'],
[b'id_gridfs_5']], dtype='|S40')
- input_productID
file_h5['input_productID'].shape
# (32528, 1)
file_h5['input_productID'][0:][0:]
# 输出以下
array([[ 86605],
[ 86605],
[ 86605],
...,
[2938688],
[2938688],
[2938688]], dtype=int32)
- input_season
file_h5['input_season'].shape
(32528, 1)
file_h5['input_season'][0:][0:]
# 输出以下
array([[b'SS2014'],
[b'SS2014'],
[b'SS2014'],
...,
[b'SS2018'],
[b'SS2018'],
[b'SS2018']], dtype='|S10')
- input_subcategory
file_h5['input_subcategory'].shape
# (32528, 1)
file_h5['input_subcategory'][0:][0:]
# 输出以下
array([[b'DENIM JACKETS'],
[b'DENIM JACKETS'],
[b'DENIM JACKETS'],
...,
[b'SHIRTS'],
[b'SHIRTS'],
[b'SHIRTS']], dtype='|S100')
可视化数据
keys | 1 | 2 | 3 |
---|---|---|---|
index | 24,25,26,27 | 73,74,75,76 | 93,94,95,96 |
index_2 | 0, 1, 2, 3 | 4, 5, 6, 7 | 8, 9, 10, 11 |
input_brand | b’Diesel’ | b’Dsquared2’ | b’Diesel Black Gold’ |
input_category | b’JACKETS & COATS’ | b’JEANS’ | b’JACKETS & COATS’ |
input_composition | b’90% cotton, 8% polyester, 2% elastane.’ | b’98% cotton, 2% elastane.’ | b’Body: 100% lambskin. Contrast: 100% goatskin. Lining: 51% cotton, 49% rayon. Sleeve lining: 54% acetate, 46% polyester.’ |
input_concat_description | b’Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching. Semi-sheer t-shirt in heather white. Crewneck collar. Patch pocket at breast. Tonal stitching.’ | b’Slim-fit jeans in light grey. Distressing and fading throughout. Seven-pocket styling. Textured black leather logo patch at back waist. Tonal stitching. Red logo tab at button-fly. Short sleeve t-shirt in deep slate blue. Crewneck collar. Tonal stitching.’ | b’Long sleeve suede jacket in black. Tonal grained leather paneling throughout. Stand collar. Zip closure and zippered welt pockets at front. Zippered vents at back hem. Welt pockets at interior. Fully lined. Tonal stitching. Zippered expansion panels at sleeve cuffs. Long sleeve coated denim shirt in indigo blue. Irregular overdye effect throughout in black. Spread collar. Flap pockets at breast, one with metallic logo piece. Press-stud closure at front. Tonal stitching. Three press-studs at barrel cuffs. Slim-fit cropped pleated wool trousers in black. Four-pocket styling. Tonal stitching. Button-fly.’ |
input_department | b’CLOTHING’ | b’CLOTHING’ | b’CLOTHING’ |
input_description | b’Denim-like jogg jacket in blue. Fading and whiskering throughout. Spread collar. Copper tone button closures at front. Flap pockets at chest with metallic logo plaque. Seam pockets at sides. Cinch tabs at back waistband. Single button sleeve cuffs. Tone on tone stitching.’ | b’Slim-fit jeans in light grey. Distressing and fading throughout. Seven-pocket styling. Textured black leather logo patch at back waist. Tonal stitching. Red logo tab at button-fly.’ | b’Long sleeve suede jacket in black. Tonal grained leather paneling throughout. Stand collar. Zip closure and zippered welt pockets at front. Zippered vents at back hem. Welt pockets at interior. Fully lined. Tonal stitching. Zippered expansion panels at sleeve cuffs.’ |
input_gender | b’Men’ | b’Men’ | b’Men’ |
input_image1 | |||
input_image2 | |||
input_image3 | |||
input_image4 | |||
input_msrpUSD | 335. | 630. | 1215. |
input_pose | b’id_gridfs_1’,b’id_gridfs_2’,b’id_gridfs_3’,b’id_gridfs_4’ | b’id_gridfs_1’,b’id_gridfs_2’,b’id_gridfs_3’,b’id_gridfs_4’ | b’id_gridfs_1’,b’id_gridfs_2’,b’id_gridfs_3’,b’id_gridfs_4’ |
input_productID | 86605 | 86773 | 86711 |
input_season | b’SS2014’ | b’SS2014’ | b’SS2014’ |
input_subcategory | b’DENIM JACKETS’ | b’JEANS’ | b’LEATHER JACKETS’ |
后续数据集内容待更新…如有问题敬请指教哦~
边栏推荐
- 几个关于指针的声明【C语言】
- 5G工作原理详解(解释&图解)
- Dependency in dependencymanagement cannot be downloaded and red is reported
- GNN的第一个简单案例:Cora分类
- MongoDB
- R & D thinking 01 ----- classic of embedded intelligent product development process
- 4. Install and deploy spark (spark on Yan mode)
- Connexion sans mot de passe du noeud distribué
- 2020 WANGDING cup_ Rosefinch formation_ Web_ nmap
- Gallery's image browsing and component learning
猜你喜欢
随机推荐
MySQL数据库面试题
Basic knowledge of lithium battery
RT-Thread的main线程“卡死”的一种可能原因及解决方案
RT-Thread 线程的时间片轮询调度
Raspberry pie tap switch button to use
[Flink] Flink learning
Matlab learning and actual combat notes
Password free login of distributed nodes
[Kerberos] deeply understand the Kerberos ticket life cycle
数据库面试常问的一些概念
Word typesetting (subtotal)
[Presto] Presto parameter configuration optimization
【flink】flink学习
Stage 4 MySQL database
MongoDB
Distribute wxWidgets application
OPPO VOOC快充电路和协议
使用LinkedHashMap实现一个LRU算法的缓存
imgcat使用心得
Hutool中那些常用的工具类和方法