Code Monkey home page Code Monkey logo

hyperbolicimagesegmentation's Introduction

Hyperbolic Image Segmentation, CVPR 2022

This is the implementation of paper Hyperbolic Image Segmentation (CVPR 2022).

Figure 1

Repository structure

  • assets : images and stuff
  • datasets : contains integer to class dictionaries, and JSON files that contain the hierarchies used.
  • hesp : the actual code containing layers, models, losses, etc.
  • samples : helper files, bash scripts, and train.py

Code is not complete yet.

How to use the code?

For installation, first run pip install -e . to register the package.

Then, run sh requirements.sh to install the requirements.

The code needs Tensorflow 1, the experiments are performed using Tensorflow 1.14. The tensorflow installed by the script is tensorflow-cpu. Change the commands to install tensorflow on GPU.

To train a model, use this code in samples directory.

python train.py --mode segmenter --batch_size 5 --dataset coco --geometry hyperbolic --dim 256 --c 0.1 --freeze_bn --train --test --backbone_init Path_to_resnet/resnet_v2_101_2017_04_14/resnet_v2_101.ckpt --output_stride 16 --segmenter_ident check

The code will train and test a hyperbolic model using coco stuff dataset, with batch size 5, curvature 0.1, freeze batch normalization, output stride 16. The result will be saved in a folder named poincare-hesp/save/segmenter/hierarchical_coco_d256_hyperbolic_c0.1_os16_resnet_v2_101_bs5_lr0.001_fbnTrue_fbbFalse_check in the samples directory.

To get the dataset tfrecord files and resnet pretrained weights, use this link.

Citation

Please consider citing this work using this BibTex entry,

@article{ghadimiatigh2022hyperbolic,
  title={Hyperbolic Image Segmentation},
  author={GhadimiAtigh, Mina and Schoep, Julian and Acar, Erman and van Noord, Nanne and Mettes, Pascal},
  journal={arXiv preprint arXiv:2203.05898},
  year={2022}
}

hyperbolicimagesegmentation's People

Contributors

minaghadimiatigh 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyperbolicimagesegmentation's Issues

Adding a license

Hi, thanks for the interesting paper! I would be curious to test your implementation and ideas on some custom datasets. However, I noticed that you have not added a license to the code release. Would you consider adding a license?

Code for plotting the gyroplanes

Hi - Thank you for the great piece of work!

I was wondering if you were planning on posting the code used for plotting the classes gyroplane on the Poincare ball (i.e. Fig. 1) ? I tried to find more information in the supplementary material as for how these were plotted but in vain.

Thank you!
Darius

'. record' file not found

Hi! Thanks for sharing the code!
I tried to reproduce this work but had some trouble finding 'coco_train.record' and 'coco_val.record'.
Will these files be shared? Or shall I download them from elsewhere?
Thank you!

about "hyp_mlr" function

Thanks for open-sourcing such as a wonderful work, could you please kindly help answer these questions?

  1. The function “hyp_mlr” in hesp/utils/layers.py seems like contradictory to Eq. 7 in your paper Hyperbolic Image Segmentation. It looks like you did not divide ||wy|| when computing the input to sinh-1, also you did not multiply \lambda^{c}_{p_y}.

  2. Eq. 12 in your paper said that you multiply conditional probabilities along the ancestor to current descendant, however in function “get_joints” in hesp/embedding_space/abstract_embedding_space.py, It seems like you add them instead of multiplying, then in “decide” function you choose the maximum added conditionals as the prediction.

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.