项目作者: minar09

项目描述 :
FCN, U-Net models implementation in TensorFlow for fashion clothing parsing
高级语言: Python
项目地址: git://github.com/minar09/Fashion-Clothing-Parsing.git
创建时间: 2019-01-02T01:23:04Z
项目社区:https://github.com/minar09/Fashion-Clothing-Parsing

开源协议:MIT License

下载


Fashion parsing models in TensorFlow

This is the source code of our project for Fashion Clothing Parsing. (EMCOM Lab, SeoulTech, Korea)

  1. Tensorflow implementation of Fully Convolutional Networks for Semantic Segmentation (FCNs).
  2. TensorFlow implementation of U-Net
  3. Improved networks based on U-Net

The implementation is largely based on the reference code provided by the authors of the paper link.

  1. Prerequisites
  2. Dataset
  3. Training
  4. Testing
  5. Visualizing
  6. CRF
  7. BFSCORE

Directory Structure

  1. ├── parseDemo20180417
  2. └── clothparsing.py
  3. ├── tests
  4. ├── __init__.py
  5. ├── gt.png
  6. ├── inference.py
  7. ├── inp.png
  8. ├── output.png
  9. └── pred.png
  10. └── test_crf.py
  11. └── test_labels.py
  12. └── .gitignore
  13. └── __init__.py
  14. └── BatchDatasetReader.py
  15. └── bfscore.py
  16. └── CalculateUtil.py
  17. └── denseCRF.py
  18. └── EvalMetrics.py
  19. └── FCN.py
  20. └── function_definitions.py
  21. └── LICENSE
  22. └── read_10k_data.py
  23. └── read_CFPD_data.py
  24. └── read_LIP_data.py
  25. └── README.md
  26. └── requirements.txt
  27. └── TensorflowUtils.py
  28. └── test_human.py
  29. └── UNet.py
  30. └── UNetAttention.py
  31. └── UNetMSc.py
  32. └── UNetPlus.py
  33. └── UNetPlusMSc.py

Prerequisites

  • For required packages installation, run pip install -r requirements.txt
  • pydensecrf installation in windows with conda: conda install -c conda-forge pydensecrf. For linux, use pip: pip install pydensecrf.
  • Check dataset directory in read_dataset function of corresponding data reading script, for example, for LIP dataset, check paths in read_LIP_data.py and modify as necessary.

Dataset

  • Right now, there are dataset supports for 3 datasets. Set your directory path in the corresponding dataset reader script.
  • CFPD (For preparing CFPD dataset, you can visit here: https://github.com/minar09/dataset-CFPD-windows)
  • LIP
  • 10k (Fashion)
  • If you want to use your own dataset, please create your dataset reader. (Check read_CFPD_data.py for example, on how to put directory and stuff)

Training

  • To train model simply execute python FCN.py or python UNet.py
  • You can add training flag as well: python FCN.py --mode=train
  • debug flag can be set during training to add information regarding activations, gradients, variables etc.
  • Set your hyper-parameters in the corresponding model script

Testing

  • To test and evaluate results use flag --mode=test
  • After testing and evaluation is complete, final results will be printed in the console, and the corresponding files will be saved in the “logs” directory.
  • Set your hyper-parameters in the corresponding model script

Visualizing

  • To visualize results for a random batch of images use flag --mode=visualize
  • Set your hyper-parameters in the corresponding model script

CRF

  • Running testing will apply CRF by default.
  • If you want to run standalone, run python denseCRF.py, after setting your paths.

BFSCORE