当前位置:网站首页>Fashion Gen: the general fashion dataset and challenge paper interpretation & dataset introduction
Fashion Gen: the general fashion dataset and challenge paper interpretation & dataset introduction
2022-07-06 12:03:00 【Caojia xiaoyuanbao】
FashionGEN Dataset use
Interpretation of the thesis
Address of thesis :https://arxiv.org/abs/1806.08317
Data set partitioning
| number | train | val | test |
|---|---|---|---|
| 293, 008 | 260, 480 | 32, 528 | 32, 528 |
Category introduction
There are 48 There are two main classes ,121 A subclass .
Here is the training set 、 The proportion of categories in the test set 
Picture statistics
The following are the main categories of training set 、 Statistics of the number of pictures of subclasses 
Text description
The following is the statistics of text description length 
The following is the color distribution extracted from the text 
chanllenge
- Generating high-resolution images using P-GANs
- Text-to-Image synthesis
Evaluation methods
- Inception Score
- Human Evaluation( because Inception Score The correlation between text and images is not considered )
Dataset Download
notice FashionBERT The data set in the paper FashionGEN, Want to know , But there is no letter after filling in a form on the official website , The address is :https://fashion-gen.com/ So I found relevant content on the Internet , Find a web address https://github.com/menardai/FashionGenAttnGAN
It has 3 File ( notes : No test set provided , The paper says that no test set will be provided , Integrated into the thesis docker in )
- fashiongen_256_256_train.h5
- fashiongen_256_256_validation.h5
- fashiongen_consume_data_example.pdf
Analysis of the code
Reference resources https://docs.h5py.org/en/stable/quick.html Analyze with the following code
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()
Get the number of training sets 260490、 Number of validation sets 32528
Data sets are similar dict Structure ,keys Respectively
[‘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’]
The dimension of the picture is :
(256, 256, 3)
content analysis
Take the validation set as an example , Next, analyze the contents one by one
- index
file_h5['index'].shape
# (32528, 1)
file_h5['index'][0:][0:]
# Output the following
[[ 24]
[ 25]
[ 26]
...
[342153]
[342154]
[342155]]
- index_2
file_h5['index_2'].shape
# (32528,)
file_h5['index_2'][0:]
# Output the following
[ 0 1 2 ... 32525 32526 32527]
- input_brand
file_h5['input_brand'].shape
# (32528, 1)
file_h5['input_brand'][0:][0:]
# Output the following
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:]
# Output the following
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:]
# Output the following
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:]
# Output the following
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:]
# Output the following
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:]
# Output the following
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:]
# Output the following
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:]
# Output the following
array([[335.],
[335.],
[335.],
...,
[990.],
[990.],
[990.]], dtype=float32)
- input_name
file_h5['input_name'].shape
# (32528, 1)
file_h5['input_name'][0:][0:]
# Output the following
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:]
# Output the following
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:]
# Output the following
array([[ 86605],
[ 86605],
[ 86605],
...,
[2938688],
[2938688],
[2938688]], dtype=int32)
- input_season
file_h5['input_season'].shape
(32528, 1)
file_h5['input_season'][0:][0:]
# Output the following
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:]
# Output the following
array([[b'DENIM JACKETS'],
[b'DENIM JACKETS'],
[b'DENIM JACKETS'],
...,
[b'SHIRTS'],
[b'SHIRTS'],
[b'SHIRTS']], dtype='|S100')
Visualization data
| 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’ |
The content of subsequent data sets will be updated … Please advise me if you have any questions ~
边栏推荐
- 锂电池基础知识
- PyTorch四种常用优化器测试
- Oppo vooc fast charging circuit and protocol
- Funny cartoon: Programmer's logic
- 共用体(union)详解【C语言】
- Variable star user module
- imgcat使用心得
- Dead loop in FreeRTOS task function
- 电商数据分析--薪资预测(线性回归)
- FTP file upload file implementation, regularly scan folders to upload files in the specified format to the server, C language to realize FTP file upload details and code case implementation
猜你喜欢

RT-Thread的main线程“卡死”的一种可能原因及解决方案

Gallery之图片浏览、组件学习

MySQL主从复制的原理以及实现

Priority inversion and deadlock

ESP8266使用arduino连接阿里云物联网

Oppo vooc fast charging circuit and protocol

open-mmlab labelImg mmdetection

mysql实现读写分离

Comparaison des solutions pour la plate - forme mobile Qualcomm & MTK & Kirin USB 3.0

Vert. x: A simple login access demo (simple use of router)
随机推荐
数据分析之缺失值填充(重点讲解多重插值法Miceforest)
共用体(union)详解【C语言】
STM32 how to locate the code segment that causes hard fault
XML file explanation: what is XML, XML configuration file, XML data file, XML file parsing tutorial
Analysis of charging architecture of glory magic 3pro
Linux Yum install MySQL
FTP file upload file implementation, regularly scan folders to upload files in the specified format to the server, C language to realize FTP file upload details and code case implementation
【ESP32学习-2】esp32地址映射
OPPO VOOC快充电路和协议
Gallery之图片浏览、组件学习
Pytorch实现简单线性回归Demo
ToggleButton实现一个开关灯的效果
Several declarations about pointers [C language]
Kconfig Kbuild
RT-Thread的main线程“卡死”的一种可能原因及解决方案
Come and walk into the JVM
Togglebutton realizes the effect of switching lights
Correspondence between STM32 model and contex M
arduino UNO R3的寄存器写法(1)-----引脚电平状态变化
Pytorch four commonly used optimizer tests











