Git Product home page Git Product logo

mgsd's Introduction

MGSD

Multi-view Graph Representation with Similarity Diffusion for General Zero-Shot Learning

Data Preparation

ImageNet and part visual features

  1. Download ImageNet.

An ImageNet root directory should contain image folders, each folder with the wordnet id of the class.

Glove Word Embedding

  1. Download: http://nlp.stanford.edu/data/glove.6B.zip
  2. Unzip it, find and put glove.6B.300d.txt to graph/.

Multi-view Graph and Similarity Graph

  1. cd graph/
  2. Run graph.py, and get `multi_view_graph.json
  3. Run similar.py, and get `similar-10.json

Pretrained ResNet50

  1. Download: https://figshare.com/articles/dataset/data_rar/20342646, get fc-weights.json and resnet50-base.pth
  2. Put files :cd visual
  3. Run 'python resnet_process.py' get visual features of imagenet in datasets/imagenet

Train Graph Networks

Run python train.py, and get F.pred results for testing.

Testing (General and detailed test)

Run python evaluate.py with the args:

  • --pred: the .pred file for testing.
  • --test-set: choose test set, choices: [Hierarchy, Most Populated, Least Populated, All]
  • --split: choose test set, choices: ['2-hops, 3-hops, all,' 'lp-500, lp-1000, lp-5000,' 'mp-500, mp-1000, mp-5000']
  • (optional) --keep-ratio for the ratio of testing data, --consider-trains to include training classes' classifiers, --test-train for testing with train class images only.

mgsd's People

Contributors

1423test avatar

Stargazers

 avatar Shuzheng Si avatar

Watchers

 avatar

mgsd's Issues

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.