Skip to content
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

Issue with mimicking S3DIS data using custom point cloud data #16

Open
ome-13 opened this issue Feb 16, 2024 · 2 comments
Open

Issue with mimicking S3DIS data using custom point cloud data #16

ome-13 opened this issue Feb 16, 2024 · 2 comments

Comments

@ome-13
Copy link

ome-13 commented Feb 16, 2024

I am trying to mimic the S3DIS dataset using my own dataset, which consists of point cloud data from building facades. However, when I run the code, I encounter the following problem:

(growsp) ome13@DESKTOP-6SSAF8Q:~/GrowSP$ python train_S3DIS.py
/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/sklearn/utils/linear_assignment_.py:18: FutureWarning: The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
  warnings.warn(
Training Areas: ['Area_1', 'Area_2', 'Area_3', 'Area_4', 'Area_6']
Res16FPN18(
  (conv0p1s1): MinkowskiConvolution(in=6, out=32, kernel_size=[5, 5, 5], stride=[1, 1, 1], dilation=[1, 1, 1])
  (bn0): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (conv1p1s2): MinkowskiConvolution(in=32, out=32, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn1): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block1): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (conv2p2s2): MinkowskiConvolution(in=32, out=32, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn2): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block2): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=32, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=64, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
      (downsample): Sequential(
        (0): MinkowskiConvolution(in=32, out=64, kernel_size=[1, 1, 1], stride=[1, 1, 1], dilation=[1, 1, 1])
        (1): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
      )
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=64, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=64, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (conv3p4s2): MinkowskiConvolution(in=64, out=64, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn3): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block3): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=64, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=128, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
      (downsample): Sequential(
        (0): MinkowskiConvolution(in=64, out=128, kernel_size=[1, 1, 1], stride=[1, 1, 1], dilation=[1, 1, 1])
        (1): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
      )
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=128, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=128, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (conv4p8s2): MinkowskiConvolution(in=128, out=128, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn4): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block4): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=128, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=256, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
      (downsample): Sequential(
        (0): MinkowskiConvolution(in=128, out=256, kernel_size=[1, 1, 1], stride=[1, 1, 1], dilation=[1, 1, 1])
        (1): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
      )
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=256, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=256, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (delayer1): MinkowskiLinear(in_features=256, out_features=128, bias=False)
  (delayer2): MinkowskiLinear(in_features=128, out_features=128, bias=False)
  (delayer3): MinkowskiLinear(in_features=64, out_features=128, bias=False)
  (delayer4): MinkowskiLinear(in_features=32, out_features=128, bias=False)
  (relu): MinkowskiReLU()
)
computing point feats ....
[Open3D WARNING] [KDTreeFlann::SetRawData] Failed due to no data.
Traceback (most recent call last):
  File "train_S3DIS.py", line 307, in <module>
    main(args, logger)
  File "train_S3DIS.py", line 93, in main
    classifier = cluster(args, logger, cluster_loader, model, epoch, start_grow_epoch, is_Growing)
  File "train_S3DIS.py", line 143, in cluster
    feats, labels, sp_index, context = get_sp_feature(args, cluster_loader, model, current_growsp)
  File "/home/ome13/GrowSP/lib/utils.py", line 94, in get_sp_feature
    pfh = torch.cat(pfh, dim=0)
NotImplementedError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat.  This usually means that this function requires a non-empty list of Tensors, or that you (the operator writer) forgot to register a fallback function.  Available functions are [CPU, CUDA, QuantizedCPU, BackendSelect, Python, Named, Conjugate, Negative, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradLazy, AutogradXPU, AutogradMLC, AutogradHPU, AutogradNestedTensor, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, UNKNOWN_TENSOR_TYPE_ID, Autocast, Batched, VmapMode].

CPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/build/aten/src/ATen/RegisterCPU.cpp:18433 [kernel]
CUDA: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/build/aten/src/ATen/RegisterCUDA.cpp:26496 [kernel]
QuantizedCPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/build/aten/src/ATen/RegisterQuantizedCPU.cpp:1068 [kernel]
BackendSelect: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/BackendSelectFallbackKernel.cpp:3 [backend fallback]
Python: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/PythonFallbackKernel.cpp:47 [backend fallback]
Named: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/NamedRegistrations.cpp:7 [backend fallback]
Conjugate: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/ConjugateFallback.cpp:18 [backend fallback]
Negative: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/native/NegateFallback.cpp:18 [backend fallback]
ADInplaceOrView: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/VariableFallbackKernel.cpp:64 [backend fallback]
AutogradOther: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradCPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradCUDA: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradXLA: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradLazy: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradXPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradMLC: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradHPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradNestedTensor: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradPrivateUse1: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradPrivateUse2: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradPrivateUse3: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
Tracer: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/TraceType_3.cpp:11560 [kernel]
UNKNOWN_TENSOR_TYPE_ID: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/autocast_mode.cpp:466 [backend fallback]
Autocast: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/autocast_mode.cpp:305 [backend fallback]
Batched: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/BatchingRegistrations.cpp:1016 [backend fallback]
VmapMode: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/VmapModeRegistrations.cpp:33 [backend fallback]

(growsp) ome13@DESKTOP-6SSAF8Q:~/GrowSP$ python train_S3DIS.py
/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/sklearn/utils/linear_assignment_.py:18: FutureWarning: The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
  warnings.warn(
Training Areas: ['Area_1', 'Area_2', 'Area_3', 'Area_4', 'Area_6']
Traceback (most recent call last):
  File "train_S3DIS.py", line 307, in <module>
    main(args, logger)
  File "train_S3DIS.py", line 74, in main
    train_loader = DataLoader(trainset, batch_size=args.batch_size, shuffle=True, collate_fn=cfl_collate_fn(), num_workers=args.workers, pin_memory=True, worker_init_fn=worker_init_fn(seed))
  File "/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 268, in __init__
    sampler = RandomSampler(dataset, generator=generator)
  File "/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 102, in __init__
    raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

My data structure is like this:

S3DIS
├── ZHC_Building_Facade
│ ├── Area_1
│ │ ├── buildings_1
│ │ │ └── Annotations
│ │ │ ├── advboard_1.txt
│ │ │ ├── clutter_1.txt
│ │ │ ├── clutter_7.txt
│ │ │ ├── column_7.txt
│ │ │ ├── wall_11.txt
│ │ │ ├── wall_9.txt
│ │ │ ├── window_17.txt
│ │ │ ├── window_25.txt
│ │ │ └── window_6.txt
│ │ ├── buildings_2
│ │ ├── ...
│ ├── Area_2
│ ├── Area_3
│ ├── Area_4
│ ├── Area_5
│ ├── Area_6
│ ├── Area_7
├── initial_superpoints
│ ├── Area_1_buildings_10_superpoint.npy
│ ├── Area_2_buildings_7_superpoint.npy
│ ├── Area_4_buildings_2_superpoint.npy
│ ├── Area_5_buildings_8_superpoint.npy
│ ├── ...
└── input
├── Area_1_buildings_1.ply
├── Area_2_buildings_2.ply
├── Area_3_buildings_8.ply
├── Area_4_buildings_9.ply
├── ...

@zhang-zihui
Copy link
Contributor

Hi @ome-13,
This error means the pfh is an empty list, but on the previous code, we search for all valid superpoints to compute pfh feature.
So, can you check your superpoints whether they are all invalid?

@xwmxcz
Copy link

xwmxcz commented Jul 11, 2024

I am trying to mimic the S3DIS dataset using my own dataset, which consists of point cloud data from building facades. However, when I run the code, I encounter the following problem:

(growsp) ome13@DESKTOP-6SSAF8Q:~/GrowSP$ python train_S3DIS.py
/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/sklearn/utils/linear_assignment_.py:18: FutureWarning: The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
  warnings.warn(
Training Areas: ['Area_1', 'Area_2', 'Area_3', 'Area_4', 'Area_6']
Res16FPN18(
  (conv0p1s1): MinkowskiConvolution(in=6, out=32, kernel_size=[5, 5, 5], stride=[1, 1, 1], dilation=[1, 1, 1])
  (bn0): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (conv1p1s2): MinkowskiConvolution(in=32, out=32, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn1): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block1): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=32, out=32, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (conv2p2s2): MinkowskiConvolution(in=32, out=32, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn2): MinkowskiBatchNorm(32, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block2): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=32, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=64, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
      (downsample): Sequential(
        (0): MinkowskiConvolution(in=32, out=64, kernel_size=[1, 1, 1], stride=[1, 1, 1], dilation=[1, 1, 1])
        (1): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
      )
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=64, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=64, out=64, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (conv3p4s2): MinkowskiConvolution(in=64, out=64, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn3): MinkowskiBatchNorm(64, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block3): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=64, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=128, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
      (downsample): Sequential(
        (0): MinkowskiConvolution(in=64, out=128, kernel_size=[1, 1, 1], stride=[1, 1, 1], dilation=[1, 1, 1])
        (1): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
      )
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=128, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=128, out=128, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (conv4p8s2): MinkowskiConvolution(in=128, out=128, kernel_size=[2, 2, 2], stride=[2, 2, 2], dilation=[1, 1, 1])
  (bn4): MinkowskiBatchNorm(128, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
  (block4): Sequential(
    (0): BasicBlock(
      (conv1): MinkowskiConvolution(in=128, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=256, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
      (downsample): Sequential(
        (0): MinkowskiConvolution(in=128, out=256, kernel_size=[1, 1, 1], stride=[1, 1, 1], dilation=[1, 1, 1])
        (1): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.02, affine=True, track_running_stats=True)
      )
    )
    (1): BasicBlock(
      (conv1): MinkowskiConvolution(in=256, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm1): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (conv2): MinkowskiConvolution(in=256, out=256, kernel_size=[3, 3, 3], stride=[1, 1, 1], dilation=[1, 1, 1])
      (norm2): MinkowskiBatchNorm(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (relu): MinkowskiReLU()
    )
  )
  (delayer1): MinkowskiLinear(in_features=256, out_features=128, bias=False)
  (delayer2): MinkowskiLinear(in_features=128, out_features=128, bias=False)
  (delayer3): MinkowskiLinear(in_features=64, out_features=128, bias=False)
  (delayer4): MinkowskiLinear(in_features=32, out_features=128, bias=False)
  (relu): MinkowskiReLU()
)
computing point feats ....
[Open3D WARNING] [KDTreeFlann::SetRawData] Failed due to no data.
Traceback (most recent call last):
  File "train_S3DIS.py", line 307, in <module>
    main(args, logger)
  File "train_S3DIS.py", line 93, in main
    classifier = cluster(args, logger, cluster_loader, model, epoch, start_grow_epoch, is_Growing)
  File "train_S3DIS.py", line 143, in cluster
    feats, labels, sp_index, context = get_sp_feature(args, cluster_loader, model, current_growsp)
  File "/home/ome13/GrowSP/lib/utils.py", line 94, in get_sp_feature
    pfh = torch.cat(pfh, dim=0)
NotImplementedError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat.  This usually means that this function requires a non-empty list of Tensors, or that you (the operator writer) forgot to register a fallback function.  Available functions are [CPU, CUDA, QuantizedCPU, BackendSelect, Python, Named, Conjugate, Negative, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradLazy, AutogradXPU, AutogradMLC, AutogradHPU, AutogradNestedTensor, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, UNKNOWN_TENSOR_TYPE_ID, Autocast, Batched, VmapMode].

CPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/build/aten/src/ATen/RegisterCPU.cpp:18433 [kernel]
CUDA: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/build/aten/src/ATen/RegisterCUDA.cpp:26496 [kernel]
QuantizedCPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/build/aten/src/ATen/RegisterQuantizedCPU.cpp:1068 [kernel]
BackendSelect: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/BackendSelectFallbackKernel.cpp:3 [backend fallback]
Python: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/PythonFallbackKernel.cpp:47 [backend fallback]
Named: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/NamedRegistrations.cpp:7 [backend fallback]
Conjugate: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/ConjugateFallback.cpp:18 [backend fallback]
Negative: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/native/NegateFallback.cpp:18 [backend fallback]
ADInplaceOrView: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/core/VariableFallbackKernel.cpp:64 [backend fallback]
AutogradOther: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradCPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradCUDA: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradXLA: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradLazy: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradXPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradMLC: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradHPU: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradNestedTensor: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradPrivateUse1: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradPrivateUse2: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
AutogradPrivateUse3: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/VariableType_3.cpp:10141 [autograd kernel]
Tracer: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/torch/csrc/autograd/generated/TraceType_3.cpp:11560 [kernel]
UNKNOWN_TENSOR_TYPE_ID: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/autocast_mode.cpp:466 [backend fallback]
Autocast: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/autocast_mode.cpp:305 [backend fallback]
Batched: registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/BatchingRegistrations.cpp:1016 [backend fallback]
VmapMode: fallthrough registered at /opt/conda/conda-bld/pytorch_1639180588308/work/aten/src/ATen/VmapModeRegistrations.cpp:33 [backend fallback]

(growsp) ome13@DESKTOP-6SSAF8Q:~/GrowSP$ python train_S3DIS.py
/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/sklearn/utils/linear_assignment_.py:18: FutureWarning: The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
  warnings.warn(
Training Areas: ['Area_1', 'Area_2', 'Area_3', 'Area_4', 'Area_6']
Traceback (most recent call last):
  File "train_S3DIS.py", line 307, in <module>
    main(args, logger)
  File "train_S3DIS.py", line 74, in main
    train_loader = DataLoader(trainset, batch_size=args.batch_size, shuffle=True, collate_fn=cfl_collate_fn(), num_workers=args.workers, pin_memory=True, worker_init_fn=worker_init_fn(seed))
  File "/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 268, in __init__
    sampler = RandomSampler(dataset, generator=generator)
  File "/home/ome13/miniconda3/envs/growsp/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 102, in __init__
    raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

My data structure is like this:

S3DIS ├── ZHC_Building_Facade │ ├── Area_1 │ │ ├── buildings_1 │ │ │ └── Annotations │ │ │ ├── advboard_1.txt │ │ │ ├── clutter_1.txt │ │ │ ├── clutter_7.txt │ │ │ ├── column_7.txt │ │ │ ├── wall_11.txt │ │ │ ├── wall_9.txt │ │ │ ├── window_17.txt │ │ │ ├── window_25.txt │ │ │ └── window_6.txt │ │ ├── buildings_2 │ │ ├── ... │ ├── Area_2 │ ├── Area_3 │ ├── Area_4 │ ├── Area_5 │ ├── Area_6 │ ├── Area_7 ├── initial_superpoints │ ├── Area_1_buildings_10_superpoint.npy │ ├── Area_2_buildings_7_superpoint.npy │ ├── Area_4_buildings_2_superpoint.npy │ ├── Area_5_buildings_8_superpoint.npy │ ├── ... └── input ├── Area_1_buildings_1.ply ├── Area_2_buildings_2.ply ├── Area_3_buildings_8.ply ├── Area_4_buildings_9.ply ├── ...

hi,
1720690043798(1)
Why do I get the above error when using python initialSP_prepare_S3DIS.py? Can you help me solve it? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants