We present TextileNet, a material taxonomy-based fashion textile dataset to close the gap in current research on textile material identification in clothing.
We developed the TextileNet dataset (illustrated in the figure below) based on fibre and fabric labels. We achieved this through carefully designing two taxonomies, one for fibres and another for fabrics in close collaboration with material domain experts.
conda install pytorch torchvision torchaudio cpuonly -c pytorch
The user has to first download our dataset as a zip file from the following links either from One drive or Google drive.
-
Google drive
-
One Drive
After extracting both of the these downloaded files to a directory (say data
), the user should have the following file structure
project
│ README.md
│
└───data
└───fibre
└───abaca
│ └───a.jpeg
│ b.jpeg
│ ...
└───acrylic
└───alpaca
│ ...
└───fabric
└───canvas
│ └───a.jpeg
│ b.jpeg
│ ...
└───chambray
└───chenille
│ ...
The user then have to launch our download script to add further data to these directories. In case the user does not want a full-scale download, for testing purposes, one can run:
python prepare_data.py --parent_dir ./data/fibre --partition fibre --test --processes 4
For a full scale download, fill in n
with a process count for parallel downloads.
# for fibre
python prepare_data.py --parent_dir ./data/fibre --partition fibre --processes n
# for fabric
python prepare_data.py --parent_dir ./data/fabric --partition fabric --processes n
Our baseline models can be trained using the following commands
- Change
--data
for fibre or fabric - Change
--data_parent_dirt
to point to the correct parent directory for datasets
cd src
# for resnet
CUDA_VISIBLE_DEVICES=0,1,2,3 python train_resnet.py --data fibre --batch_size 512 --num_classes 33 --num_workers 32 --seed 0
# for vit
CUDA_VISIBLE_DEVICES=0,1,2,3 python train_vits.py --data fibre --batch_size 512 --num_classes 33 --num_workers 32 --seed 0
-
The baselines can also be downloaded from:
-
The TextileNet labels and class ids:
We report their top-1 and top-5 accuracy, more details are in the paper:
Dataset Partition | Network | Accuracy (top1/5) |
---|---|---|
TextileNet-fibre | Resnet50 | 49.74±0.27 / 87.32±0.14 |
TextileNet-fibre | ViT | 53.32±0.64 / 88.46±0.26 |
TextileNet-fabric | Resnet50 | 65.28±0.67 / 90.36±0.31 |
TextileNet-fabric | ViT | 67.32±0.45 / 92.12±0.26 |
@article{zhong2023textilenet,
title={TextileNet: A Material Taxonomy-based Fashion Textile Dataset},
author={Zhong, Shu and Ribul, Miriam and Cho, Youngjun and Obrist, Marianna},
journal={arXiv preprint arXiv:2301.06160},
year={2023}
}
The data collection code is released with the MIT license. For TextileNet dataset, the author has applied a Creative Commons Attribution (CC BY) licence to any Author Accepted Manuscript version arising.