maxjiang93 / ugscnn Goto Github PK
View Code? Open in Web Editor NEWSpherical CNNs on Unstructured Grids Using Parameterized Differential Operators
License: Other
Spherical CNNs on Unstructured Grids Using Parameterized Differential Operators
License: Other
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()
I try to run your code for reproducing the experimental results . After running exp3_2d3ds, I wanted to save the semantic segmentation results as RGB images for viewing the classification like Figure 6 in your paper. Could you offer this code?
Thanks!
could you provide the pretrained model in these task?
Thanks!
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?
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!
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.
The climate data is not downloadable from provided link: http://island.me.berkeley.edu/ugscnn/data/climate_sphere_l5.zip. It appears this is not maintained.
Do you have the data and would it be possible to upload to google drive to make it accessible?
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:
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):
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.