Giter Club home page Giter Club logo

equiadapt's People

Contributors

arnab39 avatar danibene avatar jikaelgagnon avatar oumarkaba avatar sibasmarak 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

Watchers

 avatar  avatar  avatar  avatar  avatar

equiadapt's Issues

Issue with running inverse_canonicalization

Hello all,

Thanks for sharing such amazing work! I'm very interested in using and implementing your code, particularly for equivariant tasks.
For learning to use your library, I've been playing around with your notebook under tutorials/images/understanding_discrete_canonicalization.ipynb. The notebook is very straightforward and easy to understand, so congrats for that :)

As a step further, I tried to add the function invert_canonicalization to play with it as follows:

for image in train_loader_tqdm:
  image = image.to(device)
  canonicalized_image = canonicalizer.canonicalize(image)
  outputs = canonicalizer.invert_canonicalization(canonicalized_image)
  [...]

When doing this, some problems and questions were raised:

  • First of all, the function was throwing a KeyError because it was searching for a key element named "group" in the canonicalization_info_dict dictionary. However, this key is called "group_element" and not group. I've fixed this, and I will send you the pull request soon :)
  • Secondly, I have a question regarding the function get_action_on_image_features under /images/utils.py:
    • Why does the dimension feature_map. shape [1] need to be multiple of num_group? In this example, these dimensions are 3 and 4, respectively. However, with that requirement, the image's channel size would have to be 4 or 8, for example. As far as I understand, this function reverses the canonicalization, that is, rotates the image by a certain angle. So why is the expected dimension different than that of the image? Have I misunderstood what this function is aiming to do?
    • What would happen if the output of the prediction_network (not used in this particular example but exemplified in your README) has a different shape than the input required by the prediction_network? For example, the input is an image, and the output is a vector. In that case, we'd like to apply the rotation action to the vector instead of an input image. Do you store the canonicalization (or inverse canonicalization) transform somewhere so that it can be applied to whichever data shape? I've seen that you have a list of angles under group_element_dict["group_element"]["rotation"]; however, I don't quite understand what these angles represent. Shouldn't it be just one angle?

Thank you so much :)

Olaya

Installation issue

I am using python version 3.8.10 on Ubuntu. I tried installing with pip install -e . and got the following error:

pip install -e .
Obtaining file:///home/danibene/dev/EquivariantAdaptation
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting torch (from equiadapt==0.1.0)
  Downloading torch-2.2.1-cp38-cp38-manylinux1_x86_64.whl.metadata (25 kB)
Collecting numpy (from equiadapt==0.1.0)
  Downloading numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.6 kB)
Collecting torchvision (from equiadapt==0.1.0)
  Downloading torchvision-0.17.1-cp38-cp38-manylinux1_x86_64.whl.metadata (6.6 kB)
Collecting kornia (from equiadapt==0.1.0)
  Using cached kornia-0.7.1-py2.py3-none-any.whl.metadata (12 kB)
Collecting escnn (from equiadapt==0.1.0)
  Downloading escnn-1.0.11-py3-none-any.whl.metadata (19 kB)
Collecting scipy (from escnn->equiadapt==0.1.0)
  Downloading scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.9/58.9 kB 2.6 MB/s eta 0:00:00
Collecting lie-learn (from escnn->equiadapt==0.1.0)
  Downloading lie_learn-0.0.1.post1-cp38-cp38-manylinux1_x86_64.whl (16.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 4.0 MB/s eta 0:00:00
Collecting joblib (from escnn->equiadapt==0.1.0)
  Using cached joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)
Collecting pymanopt (from escnn->equiadapt==0.1.0)
  Downloading pymanopt-2.2.0-py3-none-any.whl.metadata (7.0 kB)
Collecting autograd (from escnn->equiadapt==0.1.0)
  Downloading autograd-1.6.2-py3-none-any.whl.metadata (706 bytes)
Collecting py3nj (from escnn->equiadapt==0.1.0)
  Downloading py3nj-0.2.1.tar.gz (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.0/50.0 kB 3.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      + meson setup /tmp/pip-install-ebb6c36w/py3nj_fa03e97b2b054d2ba2b257c6d1531242 /tmp/pip-install-ebb6c36w/py3nj_fa03e97b2b054d2ba2b257c6d1531242/.mesonpy-4yh1y07p -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-ebb6c36w/py3nj_fa03e97b2b054d2ba2b257c6d1531242/.mesonpy-4yh1y07p/meson-python-native-file.ini
      The Meson build system
      Version: 1.3.2
      Source dir: /tmp/pip-install-ebb6c36w/py3nj_fa03e97b2b054d2ba2b257c6d1531242
      Build dir: /tmp/pip-install-ebb6c36w/py3nj_fa03e97b2b054d2ba2b257c6d1531242/.mesonpy-4yh1y07p
      Build type: native build
      Project name: py3nj
      Project version: 0.2.1
      
      ../meson.build:1:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]
      The following exception(s) were encountered:
      Running `gfortran --version` gave "[Errno 2] No such file or directory: 'gfortran'"
      Running `gfortran -V` gave "[Errno 2] No such file or directory: 'gfortran'"
      Running `flang --version` gave "[Errno 2] No such file or directory: 'flang'"
      Running `flang -V` gave "[Errno 2] No such file or directory: 'flang'"
      Running `nvfortran --version` gave "[Errno 2] No such file or directory: 'nvfortran'"
      Running `nvfortran -V` gave "[Errno 2] No such file or directory: 'nvfortran'"
      Running `pgfortran --version` gave "[Errno 2] No such file or directory: 'pgfortran'"
      Running `pgfortran -V` gave "[Errno 2] No such file or directory: 'pgfortran'"
      Running `ifort --version` gave "[Errno 2] No such file or directory: 'ifort'"
      Running `ifort -V` gave "[Errno 2] No such file or directory: 'ifort'"
      Running `ifx --version` gave "[Errno 2] No such file or directory: 'ifx'"
      Running `ifx -V` gave "[Errno 2] No such file or directory: 'ifx'"
      Running `g95 --version` gave "[Errno 2] No such file or directory: 'g95'"
      Running `g95 -V` gave "[Errno 2] No such file or directory: 'g95'"
      
      A full log can be found at /tmp/pip-install-ebb6c36w/py3nj_fa03e97b2b054d2ba2b257c6d1531242/.mesonpy-4yh1y07p/meson-logs/meson-log.txt
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

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.