-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assertion error when validating #11
Comments
Sorry since I haven't encountered this issue, so I don't understand the specific reason for this error. You could try to check and provide the code and instructions you use, especially the parts of the main code that are corresponding to the error. |
Hi authors! I also encounter this issue.
It seems like there's an issue with code in scannet.py
and in ocnn/octree/points.py
I print labels shape and get: |
Hello! I check out the dimension of my point label, it is actually the dimension is one.And in my ocnn/octree/points.py there isn't the dimension assertion. I will attach my dimension results as well as the points.py
----- 原始邮件 -----
发件人: "xuefanliu" ***@***.***>
收件人: "IRMVLab/Point-Mamba" ***@***.***>
抄送: "RuiJi Yu" ***@***.***>, "Comment" ***@***.***>
发送时间: 星期二, 2024年 5 月 28日 上午 2:36:28
主题: Re: [IRMVLab/Point-Mamba] assertion error when validating (Issue #11)
> ```
> File "/home/user/conda/envs/pointmamba/lib/python3.10/site-packages/ocnn/octree/points.py", line 59, in check_input
> assert self.labels.dim() == 2
> ```
Sorry since I haven't encountered this issue, so I don't understand the specific reason for this error. You could try to check and provide the code and instructions you use, especially the parts of the main code that are corresponding to the error.
Hi authors! I also encounter this issue.
```
Traceback (most recent call last):
File "/home/lxf/Workspace/Science/PointMamba/segmentation.py", line 184, in <module>
SegSolver.main()
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/thsolver/solver.py", line 433, in main
cls.worker(0, FLAGS)
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/thsolver/solver.py", line 422, in worker
the_solver.run()
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/thsolver/solver.py", line 397, in run
eval('self.%s()' % self.FLAGS.SOLVER.run)
File "<string>", line 1, in <module>
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/thsolver/solver.py", line 320, in train
self.train_epoch(epoch)
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/thsolver/solver.py", line 149, in train_epoch
batch = next(self.train_iter)
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
data = self._next_data()
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
return self._process_data(data)
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/_utils.py", line 694, in reraise
raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/thsolver/dataset.py", line 44, in __getitem__
output = self.transform(sample, idx) # data augmentation + build octree
File "/home/lxf/Workspace/Science/PointMamba/datasets/scannet.py", line 142, in __call__
points = Points(torch.from_numpy(xyz), torch.from_numpy(sample['normals']),
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/ocnn/octree/points.py", line 45, in __init__
self.check_input()
File "/home/lxf/anaconda3/envs/pointmamba/lib/python3.10/site-packages/ocnn/octree/points.py", line 59, in check_input
assert self.labels.dim() == 2
AssertionError
```
It seems like there's an issue with code in scannet.py
```
points = Points(torch.from_numpy(xyz), torch.from_numpy(sample['normals']),
torch.from_numpy(color), torch.from_numpy(sample['labels']))
```
and in ocnn/octree/points.py
```
if self.labels is not None:
assert self.labels.dim() == 2
assert self.labels.size(0) == self.points.size(0)
```
I print labels shape and get: `Labels shape: torch.Size([237360])`. Is this correct shape of labels?
And why does OCNN require the dimension of labels to be 2?
…--
Reply to this email directly or view it on GitHub:
#11 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
what is the version of your ocnn? current version has assertion, https://github.com/octree-nn/ocnn-pytorch/blob/master/ocnn/octree/points.py#L59 |
Hi authors! Thanks for your reply! I change the OCNN version to 2.2.0 and solve the issue. Perhaps the OCNN version can be specified in requirements.txt so that the dimension of labels does not need to be changed. |
Thanks for your advice, I will specify the ocnn version in requirement.txt later, thank you!
----- 原始邮件 -----
发件人: "xuefanliu" ***@***.***>
收件人: "IRMVLab/Point-Mamba" ***@***.***>
抄送: "RuiJi Yu" ***@***.***>, "Comment" ***@***.***>
发送时间: 星期三, 2024年 5 月 29日 下午 7:11:41
主题: Re: [IRMVLab/Point-Mamba] assertion error when validating (Issue #11)
Hello! I check out the dimension of my point label, it is actually the dimension is one.And in my ocnn/octree/points.py there isn't the dimension assertion. I will attach my dimension results as well as the points.py
Hi authors! Thanks for your reply! I change the OCNN version to 2.2.0 and solve the issue. Perhaps the OCNN version can be specified in requirements.txt so that the dimension of labels does not need to be changed.
…--
Reply to this email directly or view it on GitHub:
#11 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
The text was updated successfully, but these errors were encountered: