Skip to content

Error when changing point cloud and label directories in segmentation mode #172

@brufe163

Description

@brufe163

Describe the bug
When I'm trying to use my custom dataset (.pcd files) for segmentation, if I change the directory of the pointclouds and labels, the following error is displayed:

Loading segmentation labels from labels/segmentation/000.bin.
Traceback (most recent call last):
  File "/home/bruno/miniconda3/envs/dust-filtering/lib/python3.11/site-packages/labelCloud/view/gui.py", line 611, in change_pointcloud_folder
    self.controller.pcd_manager.get_next_pcd()
  File "/home/bruno/miniconda3/envs/dust-filtering/lib/python3.11/site-packages/labelCloud/control/pcd_manager.py", line 104, in get_next_pcd
    self.pointcloud = PointCloud.from_file(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/bruno/miniconda3/envs/dust-filtering/lib/python3.11/site-packages/labelCloud/model/point_cloud.py", line 174, in from_file
    labels = seg_handler.read_or_create_labels(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bruno/miniconda3/envs/dust-filtering/lib/python3.11/site-packages/labelCloud/io/segmentations/base.py", line 26, in read_or_create_labels
    raise ValueError(
ValueError: The segmentation label doesn't match with the point cloud, label file contains {labels.shape[0]} while point cloud contains {num_points}.
Aborted (core dumped)

To Reproduce
Steps to reproduce the behavior:

  1. Run labelCloud on the terminal
  2. Select segmentation mode, modify classes, click on save
  3. Go to File and click on Set Label Folder, and change it
  4. Go to File again and click on Set Point Cloud Folder, and change it
  5. Done

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.6 LTS 64-bit
  • Python Version: 3.11.9
  • Installation: pip, on conda environment

Additional context
Sometimes it just works, but I haven't figured out why. It's a really great and useful tool but lately it's just not working :(
Thanks in advance!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions