Coder Social home page Coder Social logo

zeta1999 / hyperbolic_zsl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shaotengliu/hyperbolic_zsl

0.0 0.0 0.0 73.04 MB

Hyperbolic Visual Embedding Learning for Zero-Shot Recognition (CVPR 2020)

Makefile 0.02% Python 3.93% Dockerfile 0.01% Shell 0.04% PowerShell 0.01% Batchfile 0.01% Jupyter Notebook 95.96% CSS 0.03% C 0.01%

hyperbolic_zsl's Introduction

Hyperbolic ZSL

This is the PyTorch implementation of paper: Hyperbolic Visual Embedding Learning for Zero-Shot Recognition (CVPR 2020)

framework

Using Our Code

git clone [email protected]:ShaoTengLiu/Hyperbolic_ZSL.git
cd Hyperbolic_ZSL/code

Hyperbolic_ZSL/code is the default root directory.

Environment Requirements

  • anaconda is recommended
  • PyTorch version 1.0 or higher
  • At least one GPU with adequate memory
  • python 3.7 (python 2 may be possible with modifications)

Use environment.yml for quick start.

conda env create -f environment.yml

Data Preparation

Generate data and put them in these folders:

  • ../data/train/img: pretrained feature from ResNet of ImageNet
  • ../data/val/img: pretrained feature from ResNet of ImageNet
  • ../data/train/label: pretrained word embedding from chosen word model
  • ../data/val/label: pretrained word embedding from chosen word model

Quick Start

One can run our code via

CUDA_VISIBLE_DEVICES=1 python devise_hype.py \
    --word_model poincare \
    --model_folder model_path \
    --loss_path loss_path \
    --dimension 300
  • model_path: the folder to save models
  • loss_path: the .jpg tp save loss curve

To run DeViSE in Euclidean space via

CUDA_VISIBLE_DEVICES=2 python devise.py \
    --word_model glove \
    --model_folder model_path \
    --loss_path loss_path \
    --dimension 600

Acknowledgement

Tools for computation in Riemannian geometry are not developed by us. One can extend his model to hyperbolic space with these tools. Thanks to these good repos.

Code refactoring is still continuing

hyperbolic_zsl's People

Contributors

shaotengliu avatar

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.