Jumpat / SegAnyGAussians

The official implementation of SAGA (Segment Any 3D GAussians)
Apache License 2.0
544 stars 39 forks source link

Why this is infinite loop? #98

Open soohyoen opened 1 month ago

soohyoen commented 1 month ago

I encounters infinite loop when i run a saga_gui.py

First, the torch version caused the following error in def pca.

TypeError: linalg_eig() got an unexpected keyword argument 'eigenvectors'

So I changed it to the code below and the gui screen doesn't pop up when I run it and it's stuck in loading model file done.

`

def pca(self, X, n_components=3):

  n = X.shape[0]
  mean = torch.mean(X, dim=0)
  X = X - mean
  covariance_matrix = (1/n) * torch.matmul(X.T, X).float()

  eigenvalues, eigenvectors = torch.linalg.eig(covariance_matrix)

  # Convert complex eigenvalues and eigenvectors to real parts
  eigenvalues = eigenvalues.real
  eigenvectors = eigenvectors.real

  # Sort eigenvectors based on eigenvalues in descending order
  idx = torch.argsort(-eigenvalues)
  eigenvectors = eigenvectors[:, idx]

  proj_mat = eigenvectors[:, :n_components]
  return proj_mat

`

Why is this like that?

soohyoen commented 1 month ago

I think this problem doesn't get gui screen using ssh server.

How can we fix the problem?

Jumpat commented 1 month ago

Hi. Sorry for the late response. But the SAGA gui currently cannot support remote server (at least I failed). You may need x11 forwarding for this but I'm not sure whether it can work. You can use the notebook provided by us as a replacement.