SMohammadi89 / PointView-GCN

The code and dataset will be available soon here
MIT License
59 stars 17 forks source link

Segmentation fault (core dumped) #7

Open Kracozebr opened 1 year ago

Kracozebr commented 1 year ago

I've tried to run your code:

cd Feature_extraction
python main.py 

But get segmentation fault.

Tried to debug and code crashes on this line:https://github.com/SMohammadi89/PointView-GCN/blob/200b7b2284951e2f2b1536ca673a72ba793bb474/Feature_extraction/pointnet_util.py#L37

I've checked size of tensors and tried to reproduce this error:

import torch

src = torch.randn(1, 512, 3)
dst = torch.randn(1, 1024, 3)
dst_permute = dst.permute(0, 2, 1)
# dist_permute = torch.randn(1, 3, 1024)

print("torch.matmul(src, dst_permute).size()")
print (torch.matmul(src, dst_permute).size())

dist = -2 * torch.matmul(src, dst.permute(0, 2, 1))
print("dist.size()")
print (dist.size())

src = torch.load("src.pt")
dst_permute = torch.load("dst_permute.pt")
dist = -2 * torch.matmul(src, dst_permute)
print("dist.size()")
print (dist.size())

The output:

torch.matmul(src, dst_permute).size()
torch.Size([1, 512, 1024])
dist.size()
torch.Size([1, 512, 1024])
dist.size()
torch.Size([1, 512, 1024])

But it works properly, I thought that it can be caused when matmul is processed with certain data, but I've stored the tensors and loaded them again to test it, but there is no error.

Can you help with this?

SMohammadi89 commented 1 year ago

Hi, thanks for your interest to our work. This is the problem of PointNet++ on your PC. Please check the requirements of PointNet ++ and install them all. If the problem doesn’t solve, let me know please

Kracozebr commented 1 year ago

Which dependencies to install? I've tried several from other models that i ran and they work 100% :

  1. https://github.com/SimingYan/IAE/tree/main/src/encoder/pointnet2
  2. https://github.com/diegovalsesia/HyCoRe/tree/main/pointnet2_ops_lib None of them do work.
Kracozebr commented 1 year ago

@SMohammadi89 Any suggestions?

SMohammadi89 commented 1 year ago

Hi, can you please copy past the error here? I have run the code again without any problem!

Kracozebr commented 1 year ago

There is nothing interesting:

root@ea1ad62c4908:~/devel/PointView-GCN/Feature_extraction# python main.py 
  0%|                                                                                                           | 0/183640 [00:00<?, ?it/s]
Segmentation fault (core dumped)

That's all. You said that you installed dependeces from pointnet2 could you be more specific which dependencies have you installed? I think the problem is in them.