xthan / polyvore

Code for ACM MM'17 paper "Learning Fashion Compatibility with Bidirectional LSTMs"
Apache License 2.0
158 stars 70 forks source link

Feed external image into the algorithm #15

Open kargarisaac opened 5 years ago

kargarisaac commented 5 years ago

Hello,

Is it possible to feed an external image (image outside of database) into the algorithm? I modified some parts of the code to do that but the results are not reasonable.

image

I use all the data (train+val+test) as my database. I don't know how to feed the external image in the right time step of lstm network. I need to do that, right? ( I mean identifying the type of input)

hrsma2i commented 5 years ago

All outfits in this Polyvore dataset are not in the same order, so you should sort the items in them by their category after you define coarse categories e.g. tops, bottoms, etc. They are not defined in the dataset which has only fine-grained categories.

You should also include the EOS (end of a sequence) and the BOS (beginning of a sequence) when computing the loss and generating outfits. It works better when adding the EOS and the BOS to the search space.

As you said, it is nice to filter the search space by a category.

kargarisaac commented 5 years ago

All outfits in this Polyvore dataset are not in the same order, so you should sort the items in them by their category after you define coarse categories e.g. tops, bottoms, etc. They are not defined in the dataset which has only fine-grained categories.

You should also include the EOS (end of a sequence) and the BOS (beginning of a sequence) when computing the loss and generating outfits. It works better when adding the EOS and the BOS to the search space.

As you said, it is nice to filter the search space by a category.

Thank you. I modified the set_generation.py code and read your code many times. I don't see anywhere that you set the place (time step) of input image. I mean does the network need to know what the class of input (top, bottom, ...) is? I feed an image and it works fine without knowing anything about the input image. I have another question. If I want to train this network on my own dataset, I need to create some folders for each dataset and sort the items in each folder based on the sequence (top, bottom, ...) and create a json file for that, right? What about EOS and BOS? how can I set them too?

kargarisaac commented 5 years ago

Another question. Is there any trained model or any file to create a dataset to train it?

hrsma2i commented 5 years ago

This repository is not mine. In my case, I sorted the items in each outfit in json file and saved it as a new json file.

EOS and BOS are zero vector as mentioned in the paper.

I reimplemented this model with another deep learning framework, Chainer which is the origine of PyTorch and easier to implement models. I can answer to your question if you use Chainer. There may also be another repo of this model implemented with PyTorch.

kargarisaac commented 5 years ago

This repository is not mine. In my case, I sorted the items in each outfit in json file and saved it as a new json file.

EOS and BOS are zero vector as mentioned in the paper.

I reimplemented this model with another deep learning framework, Chainer which is the origine of PyTorch and easier to implement models. I can answer to your question if you use Chainer. There may also be another repo of this model implemented with PyTorch.

Thank you. I saw the pytorch implementation too. My questions was only conceptual. Maybe you can help me. because you implemented it again and know more than me. Is your implementation open sourced?

abhinavcoder commented 5 years ago

My question is aligned with @kargarisaac , I want to give a query image (not from database), where should I enter its info? If I need to add it to the database by creating sequence then there's no usability of this method. Please help.