• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    Python
  • Created over 6 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pytorch implementation of three Multiple Instance Learning or Multi-classification papers

Multiple-instance-learning

Pytorch implementation of three Multiple Instance Learning or Multi-classification papers, the performace of the visual_concept method is the best.

三种多示例学习方法实现,用于图像的多标签,其中 visual_concept效果最好

Data prepare

We will not provide the original dataset, but you can build it using your own dataset. Among them, resized2014 is image dataset, img_tag.txt is the mapping dict file of image to tags, having that, you can generate the zh_vocab.pkl vocabulary file using https://github.com/Epiphqny/Multiple-instance-learning/blob/master/data_process/build_vocab.py

Examples

img_tag.txt(with number id represent different image name):

1\tab girl,bottle,car

2\tab boy

3\tab child,bike

...

zh_vocab.pkl:

self.idx2word={1:girl,2:bottle,3:boy,4:car...}

self.word2idx={girl:1,bottle:2,boy:3,car:4...}

Just an example, the realization may have some variation, the lines in the text file are in json format.