Giter VIP home page Giter VIP logo

ugscnn's People

Contributors

hjwdzh avatar maxjiang93 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  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  avatar  avatar  avatar  avatar

ugscnn's Issues

Unzip after download needed

Hi!
I spotted that current gen_mesh.py only downloads .zip files and that's it.
It bring us to the errors during experiments/exp1_sphere_mnist/prepare_data.py:
Command:

python prepare_data.py --bandwidth 60 --mnist_data_folder raw_data --output_file /workdir/ugscnn/mnist_ico4.zip --no_rotate_train --no_rotate_test --mesh_file /workdir/ugscnn/mesh_files/icosphere_4.pkl

Output:

getting mnist data
/opt/conda/envs/s2cnn/lib/python3.10/site-packages/torchvision/datasets/mnist.py:76: UserWarning: train_data has been renamed data
  warnings.warn("train_data has been renamed data")
/opt/conda/envs/s2cnn/lib/python3.10/site-packages/torchvision/datasets/mnist.py:66: UserWarning: train_labels has been renamed targets
  warnings.warn("train_labels has been renamed targets")
/opt/conda/envs/s2cnn/lib/python3.10/site-packages/torchvision/datasets/mnist.py:81: UserWarning: test_data has been renamed data
  warnings.warn("test_data has been renamed data")
/opt/conda/envs/s2cnn/lib/python3.10/site-packages/torchvision/datasets/mnist.py:71: UserWarning: test_labels has been renamed targets
  warnings.warn("test_labels has been renamed targets")
projecting train data set
60000/60000
projecting test data set
10000/10000
Traceback (most recent call last):
  File "/workdir/ugscnn/experiments/exp1_sphere_mnist/prepare_data.py", line 316, in <module>
    main()
  File "/workdir/ugscnn/experiments/exp1_sphere_mnist/prepare_data.py", line 283, in main
    p = pickle.load(open(args.mesh_file, "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/workdir/ugscnn/mesh_files/icosphere_4.pkl'

I tried to commit and push the fix into a separate branch, but I don't have rights to accomplish this.
Here is the proper version of gen_mesh.py, feel free to copy paste:

import sys
import os

import gdown
import zipfile


def main():
    try:
        sys.path.append("meshcnn")
        from mesh import export_spheres
        export_spheres(range(8), "mesh_files")
    except ImportError:
        print("ImportError occurred. Will download precomputed mesh files instead...")
        import subprocess
        dest = "mesh_files"
        if not os.path.exists(dest):
            os.makedirs(dest)
        fname = 'icosphere_{}.pkl'
        url = 'https://drive.google.com/uc?id=17RermILq8jGu1Oz2LgX-k98FnfzAzOW2'
        output = "mesh_files.zip"
        try:
            gdown.download(url, output, quiet=False)
        except Exception as e:
            print(e)
        with zipfile.ZipFile(output, 'r') as zip_ref:
            zip_ref.extractall()
if __name__ == '__main__':
    main()

How to re -project s2 signal back to rectangle image?

Hi,
I think you did a great job and thanks for your sharing.
However, if I want to use this spherical cnn in some image-to-image task, for example, segmentation or depth estimation for spherical images, I need re-project the output s2 signal back to a 2D image.
I saw the function "interp_r2tos2" using RegularGridInterpolator to interpolate and sample, and get a set of points with their (ele, azi) coordinates and the RGB value, right? but how to sample these points back to a rectangle image with range of (-PI/2,PI/2) in vertical direction and (-PI,PI) in horizontal direction?

pkl files cannot be downloaded

hello author:
The pkl ifles cannot downloaded, could you share them with me?
or when to generate pkl files locally, the pyigl cannot be installed, could you share me the pyigl package that you used.
on the other hand, the higher version igl can be installed, but it has no the eigen, please tell me the solution.
Thanks!

Input padding in MeshConv_transpose

Hi,
thank you for the great work and for sharing it.

I'm referring to line 90, within ugscnn/meshcnn/ops.py, in MeshConv_transpose:
# pad input with zeros up to next mesh resolution
ones_pad = torch.ones(*input.size()[:2], self.nv_pad).to(input.device)
input = torch.cat((input, ones_pad), dim=-1)

doesn't padding the input with a constant (being it zeros or ones) result
in a bad input to the MeshConv, as the gradients will be artificially large due
to real data being alternated with this arbitrary constant?

Will this in turn restrict the ability of the MeshConv_transpose to properly map the
low resolution data to high resolution, especially when the output of the architecture
is at an higher level than the input, thus not having the skip connection available
as an input to the Up class in ugscnn/experiments/exp4_sphere_climate/model.py?

Is my reasoning in this case correct?

Thank you in advance for your help.

Improper projection of MNIST data onto the sphere?

I've been trying to visualize the spherical MNIST inputs and they seem to be corrupted somehow.

When I write the colors to the vertices of an icosphere, I get this visualization of the MNIST spherical data as generated by the provided code:

snapshot01

Is this what I'm supposed to be seeing? It seems to me that this does not look very much like a number. I also visualized the projections from the part of your data processing code that was borrowed from the S2CNN code from Cohen et al., and the numbers look like this (same image as above):

test2500

From that paper, I presume this is a stereographic projection. The number is clearly distorted, but its also clearly a number. It's unclear to me why the icospherical version is so patchy. Can you please elaborate on this?

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.