Code Monkey home page Code Monkey logo

pongsate1 / fashion-parsing Goto Github PK

View Code? Open in Web Editor NEW
55.0 6.0 22.0 6.46 MB

Repository of my fashion-parsing project. This project is put on hold since I am doing another project now, but will debug if bugs are reported.

Home Page: http://vision.is.tohoku.ac.jp/clothing_parsing

License: Other

CMake 2.87% Makefile 0.65% C++ 78.20% Cuda 5.02% MATLAB 2.22% M 0.01% Python 8.63% HTML 0.51% Shell 0.42% Protocol Buffer 1.48%
python segmentation clothing fashion deep-learning computer-vision caffe

fashion-parsing's Introduction

Fashion-parsing

If you use this work, please cite https://arxiv.org/abs/1703.01386

This work extends fully-convolutional neural networks (FCN) for the clothing parsing problem.

We extend FCN architecture with a side-branch network which we refer outfit encoder to predict a consistent set of clothing labels to encourage combinatorial preference, and with conditional random field (CRF) to explicitly consider coherent label assignment to the given image.

Live demo at http://vision.is.tohoku.ac.jp/clothing_parsing

Project page http://vision.is.tohoku.ac.jp/~tangseng/clothing_parsing_project

Contents

  1. Data

    Data is in data/. There are three fashion datasets: fashionista-v0.2, fashionista-v1.0, and tmm_dataset_sharing. See the instruction below for data preparation.

  2. Models

    Models are in models/. There are 5 models used in fashion parsing: FCN-32s, FCN-16s, FCN-8s, Attribute Layers Training (codename: segc-8s-pre), Attribute Broadcast (codename: sege-8s), and Attribute filtering (codename: attrlog). The folder names are in - format. See the instruction below for training and running the model.

  3. Parsing output and evaluation result

    Evaluation results and symbolic links to parsing output are in /public/fashionpose. This folder will be created automatically when run the model. Evaluation results are in json format. The actual output files of Attribute Broadcast (codename: sege-8s), and Attribute filtering (codename: attrlog) model are in the model's folder.

  4. Script

    Python script and shell script are in examples/tangseng folder.

Instruction for fashion parsing

  1. Setup following environment: Python, Caffe, and MATLAB

  2. Data preparation Download and convert data into appropiate format according to README and script in each dataset's directory under data/.

  3. Download fcn-32s-pascalcontext.caffemodel according to th url in models/fcn-32s-pascalcontext/readme.md. This model is used as based model for training FCN-32s for fashion datasets.

  4. Train FCN-32s, FCN-16s, FCN-8s, Attribute Layers Training (codename: segc-8s-pre), Attribute Broadcast (codename: sege-8s), and Attribute filtering (codename: attrlog) by execute:

    ./examples/tangseng/train_all.sh

  5. Run Attribute broadcast (sege) or Attribute filtering (attrlog) network by execute:

    ./examples/tangseng/run_all.sh

    The output will be in models/-/. h5 segmentation output and json evaluation result are expected.

  6. Prepare data for smoothing using CRF by execute:

    ./examples/tangseng/convert_h5_to_png.sh

  7. Compile CRF by execute:

    make -C examples/tangseng/crf

  8. Run CRF smoothing by execute:

    ./examples/tangseng/run_crf.sh

  9. Run CRF evaluation by execute:

    ./examples/tangseng/crf_eval.sh

  10. Create symbolic links to output images and refined output images of networks by execute:

    ./examples/tangseng/createLinkScript.sh

    The links are in public/fashionpose/ along with evaluation result in json format. Json files can be open using following command:

    python -m json.tool <json_file> | less
    

Miscellaneous

I have uploaded my utility library as myutil.py. It contains functions for deprocess an image in h5 files to a regular image for plot, show segmentation maps with colors, etc.

fashion-parsing's People

Contributors

pongsate1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fashion-parsing's Issues

downloading your models?

train_all.sh is taking days (and it crashes due to local issues), is it possible to download your models directly. The whole folder models?
thanks

the result of project

Hi,

Thanks for your project, I have just tested on your live demo and maybe it is not good in some case:
image

As you can see, the model do not have shoe but it still have it. I hope you can give me some information about this case.

Thanks

Error when compiling

Hi,

I get this error when I build with make all:

CXX/LD -o .build_release/examples/tangseng/crf/Metric.bin
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/Scrt1.o: In function _start': (.text+0x20): undefined reference to main'
collect2: error: ld returned 1 exit status
Makefile:601: recipe for target '.build_release/examples/tangseng/crf/Metric.bin' failed
make: *** [.build_release/examples/tangseng/crf/Metric.bin] Error 1

I tried adding int main () {} in Metric.cpp to continue compiling, but the following error comes up:

CXX examples/tangseng/crf/main.cpp
In file included from examples/tangseng/crf/MaskRefine.h:2:0,
from examples/tangseng/crf/main.cpp:3:
examples/tangseng/crf/FullCRF.h:27:49: error: expected ‘,’ or ‘...’ before ‘&&’ token
PairwisePotential& operator=(PairwisePotential&& other);
^
examples/tangseng/crf/FullCRF.h:53:29: error: expected ‘,’ or ‘...’ before ‘&&’ token
FullCRF& operator=(FullCRF&& other);
^
examples/tangseng/crf/main.cpp: In function ‘int main(int, char**)’:
examples/tangseng/crf/main.cpp:175:18: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system("pause");
^
Makefile:552: recipe for target '.build_release/examples/tangseng/crf/main.o' failed
make: *** [.build_release/examples/tangseng/crf/main.o] Error 1

I have no idea why the initial error is happening. Any help would be appreciated.

Cannot write to snapshot prefix 'models/fcn-32s-tmm/train'. Make sure that the directory exists and is writeable.

Hi,

Thanks for your project. I have problem with link file:
I1125 15:47:17.463608 19683 hdf5_data_layer.cpp:80] Loading list of HDF5 filenames from: data/tmm_dataset_sharing/TMM_train.h5.txt
I1125 15:47:17.463634 19683 hdf5_data_layer.cpp:94] Number of HDF5 files: 4
F1125 15:47:17.464371 19683 hdf5.cpp:15] Check failed: H5LTfind_dataset(file_id, dataset_name_) Failed to find HDF5 dataset image

I run Matlab on another computer because my computer have problem, so I copy data to my computer again. So do it affect to link dataset???

Thanks

"out of memory" cuda error and required GPU

Hello,

When launching train_all.sh and using a GTX 980Ti 6GB (on Ubuntu 17.10), I encounter a "Check failed: error == cudaSuccess (2 vs. 0) out of memory".
How much GPU memory is required for the training ?

fasionpose datasets

Exceuse me,I‘m doing a research about human fasionpose,and I need the fasionpose datasets,but I can’t connect dataset‘s author,if you hava the dataset,could you please send me a download link?
thx a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.