GithubHelp home page GithubHelp logo

sounakdey / doodle2search Goto Github PK

View Code? Open in Web Editor NEW
74.0 74.0 25.0 10.49 MB

Doodle to Search: Practical Zero Shot Sketch Based Image Retrieval

Home Page: https://sounakdey.github.io/doodle2search.github.io/

Shell 14.49% Python 85.51%

doodle2search's People

Contributors

sounakdey 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

doodle2search's Issues

Question on the Presision@200

In th code 'test.py' at line 108, the Presision@200 is computed as:

# Precision@200 means at the place 200th
   precision_200 = np.mean(sort_str_sim[:, 200])

As the sort_str_sim is actually the sorted version for a tensor with [n_sketches, n_images, n_clssses], it has the true label information on sketches and images. But it has no information on the precision and recall. The number should be computed using average_precision_score().

Does anyone know how to compute the Precision@200 value?

Some problems about word embeddings

w2v_class.append(np.array(model[voca]))

hi~
Your work is quite excellent, but I'm a little confused about the word embeddings.
I'm wondering how to deal with the situation where the class label is not available in linguistic model's vocabulary. For example, the class label 'car_(sedan)' and 'hot_air_balloon' of Sketchy-Extend dataset are not in google_300_corpus model's vocabulary, but I do not find any solutions to this situation in your codes.
By the way, according to your released word embeddings, I guess you normalize the word vectors, but the codes lack this process.

Even if the network is unblocked, the data set cannot be obtained

Even if the network is unblocked, the data set cannot be obtained;I tried to run the .sh file, but it didn't work once; I directly used URL stitching and searched on Google, and an error was prompted when the data was downloaded halfway.So, how can I get the dataset downloaded by the .sh file?

Dataset link failed

Hi, I can not download the dataset from the link you provided, could you update the link? Thanks.

MAP@200 calculation might be wrong

Hi, I think you are MAP calculation is wrong, especially MAP@200. You have ignored the total number of related documents in the MAP@200 calculation. That is why your MAP@200 value is big. I hope I am wrong but it seems you are wrong. You can check the MAP calculation of this paper that you have not cited: https://github.com/qliu24/SAKE

How to produce the class semantic vector?

As I got through the code, and tried to run the experiments. One of the key problems is to produce the class semantic vector using the word2vec or other NLP method. But the problem is that there are some class words that do not exist in the google-news-300. Even there are some simimlar ones, but I can not find how to convert these similar ones into google-news-300 format. For example, I can not find the "axe" in google-news-300 in any form. Although the authors provided the genereted semantic labels (in word2vec), we still confuse on how to generate it.

@sounakdey , do you please give us a hint on how did you deal with these problem? Thank you very much.

Training on sketchy TypeError: 'int' object is not iterable

Respected Authors,
I am unable to run the code for the sketchy dataset. It mentioned class labels file is missing so i created a labels file for the dataset. I am unable to comprehend the error in the code. It would be really nice if you can let me know what can I do to reproduce the results.

python3 src/train.py sketchy_extend --data_path /data/anurag/doodledata/sketchy
Parameters:	Namespace(attn=False, batch_size=20, data_path='/data/anurag/doodledata/sketchy', dataset='sketchy_extend', decay=0.0005, early_stop=20, emb_size=256, epochs=1000, exp_idf=None, gamma=0.1, grl_lambda=0.5, learning_rate=0.0001, load=None, log=None, log_interval=20, momentum=0.9, ngpu=1, nopretrain=True, plot=False, prefetch=2, save=None, schedule=[], seed=42, w_domain=1, w_semantic=1, w_triplet=1)
Prepare data
Traceback (most recent call last):
  File "src/train.py", line 287, in <module>
    main()
  File "src/train.py", line 99, in main
    train_data, [valid_sk_data, valid_im_data], [test_sk_data, test_im_data], dict_class = load_data(args, transform)    
  File "/data/anurag/codes/baselines/doodle2search/src/data/generator_train.py", line 18, in load_data
    return Sketchy_Extended(args, transform)
  File "/data/anurag/codes/baselines/doodle2search/src/data/sketchy_extended.py", line 35, in Sketchy_Extended
    class_emb = create_class_embeddings(list_class, args.dataset)
  File "/data/anurag/codes/baselines/doodle2search/src/data/class_word2vec.py", line 9, in create_class_embeddings
    model = Word2Vec(google_300_corpus)
  File "/home/anurag/anaconda3/lib/python3.6/site-packages/gensim/models/word2vec.py", line 783, in __init__
    fast_version=FAST_VERSION)
  File "/home/anurag/anaconda3/lib/python3.6/site-packages/gensim/models/base_any2vec.py", line 759, in __init__
    self.build_vocab(sentences=sentences, corpus_file=corpus_file, trim_rule=trim_rule)
  File "/home/anurag/anaconda3/lib/python3.6/site-packages/gensim/models/base_any2vec.py", line 936, in build_vocab
    sentences=sentences, corpus_file=corpus_file, progress_per=progress_per, trim_rule=trim_rule)
  File "/home/anurag/anaconda3/lib/python3.6/site-packages/gensim/models/word2vec.py", line 1592, in scan_vocab
    total_words, corpus_count = self._scan_vocab(sentences, progress_per, trim_rule)
  File "/home/anurag/anaconda3/lib/python3.6/site-packages/gensim/models/word2vec.py", line 1561, in _scan_vocab
    for sentence_no, sentence in enumerate(sentences):
  File "/home/anurag/anaconda3/lib/python3.6/site-packages/gensim/models/keyedvectors.py", line 355, in __getitem__
    return vstack([self.get_vector(entity) for entity in entities])
TypeError: 'int' object is not iterable

can't reproduce accurate MAP

Respected Authors,
Your paper is great. I have two question to ask you.
The first one is that after training on Sketchy-Extend dataset, I can't reproduce your result. Your mAP result is 0.3691 in the paper, but I only got 0.0589. Can you publish your pretrained model?
The second one is I can't produce sketchy_semantic_label by word2Vec, it told me "word 'XXX' is not in vocabulary"。Can you help me deal with this problem?
Thank you!

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.