Coder Social home page Coder Social logo

ch-sa / labelcloud Goto Github PK

View Code? Open in Web Editor NEW
531.0 14.0 98.0 26.12 MB

A lightweight tool for labeling 3D bounding boxes in point clouds.

Home Page: https://ch-sa.github.io/labelCloud/

License: GNU General Public License v3.0

Python 100.00%
annotation 3d-object-detection tool machine-learning computer-vision labeling point-clouds bounding-boxes 6d-pose-estimation

labelcloud's Introduction

Contributions welcome!

labelCloud

ℹ️ Interactive Documentation

A lightweight tool for labeling 3D bounding boxes in point clouds.

Overview of the Labeling Tool

Setup

ℹ️ Currently labelCloud supports Python 3.7 to 3.9.

via pip (PyPI)

pip install labelCloud
labelCloud --example  # start labelCloud with example point cloud

via git (manually)

git clone https://github.com/ch-sa/labelCloud.git  # 1. Clone repository
pip install -r requirements.txt  # 2. Install requirements
# 3. Copy point clouds into `pointclouds` folder.
python3 labelCloud.py  # 4. Start labelCloud

Configure the software to your needs by editing the config.ini file or settings (see Configuration).

Labeling

labelCloud supports two different ways of labeling (picking & spanning) as well as multiple mouse and keyboard options for subsequent correction.

Screencast of the Labeling Methods (See also https://www.youtube.com/watch?v=8GF9n1WeR8A for a short introduction and preview of the tool.)

Picking Mode

  • Pick the location of the bounding box (front-top edge).
  • Adjust the z-rotation by scrolling with your mouse wheel.

Spanning Mode

  • Subsequently span the length, width and height of the bounding box by selecting four vertices.
  • The layers for the last two vertices (width & height) will be locked to allow easy selection.

Correction

  • Use the buttons on the left-hand side or shortcuts to correct the translation, dimension and rotation of the bounding box.
  • Resize the bounding box by holding your cursor above one side and scrolling with the mouse wheel.

By default the x- and y-rotation of bounding boxes will be prohibited. For labeling 9 DoF-Bounding Boxes deactivate z-Rotation Only Mode in the menu, settings or config.ini file. The bouding boxes can then be freely rotated around all three axes.

Semantic Segmentation (bounding box-based)

labelCloud also supports the creation of segmentation labels based on bounding boxes. To activate the semantic segmentation mode, toggle the segmentation button in the startup dialog. Then label as usual and push the Assign button whenever all points inside the current bounding box should be labeled with the current class.

The resulting labels will be stored as *.bin files inside labels/segmentation/. Each *.bin file contains an array with the shape of (number of points, ) with dtype np.int8. Each entry represents the index of the label of the corresponding point in the original point cloud.

Import & Export Options

labelCloud is built for a versatile use and aims at supporting all common point cloud file and label formats for storing 3D bounding boxes. The tool is designed to be easily adaptable to multiple use cases. The welcome dialog will ask for the most common parameters (mode, classes, export format).

For more configuration, edit the corresponding fields in labels/_classes.json for label configuration or config.ini for general settings (see Configuration) for a description of all parameters).

Supported Import Formats

Type File Formats
Colored *.pcd, *.ply, *.pts, *.xyzrgb
Colorless *.xyz, *.xyzn, *.bin (KITTI)

Supported Export Formats

Label Format Description
centroid_rel Centroid [x, y, z]; Dimensions [length, width, height];
Relative Rotations as Euler angles in radians (-pi..+pi) [yaw, pitch, roll]
centroid_abs Centroid [x, y, z]; Dimensions [length, width, height];
Absolute Rotations as Euler angles in degrees (0..360°) [yaw, pitch, roll]
vertices 8 Vertices of the bounding box each with [x, y, z] (see Conventions for order)
kitti Centroid; Dimensions; z-Rotation (See specification); Requires calibration files
kitti_untransformed See above, but without transformations (if you just want to use the same label structure).

You can easily create your own exporter by subclassing the abstract BaseLabelFormat. All rotations are counterclockwise (i.e. a z-rotation of 90°/π is from the positive x- to the negative y-axis!).

Shortcuts

Shortcut Description
Navigation
Left Mouse Button Rotates the camera around Point Cloud centroid
Right Mouse Button Translates the camera
Mouse Wheel Zooms into the Point Cloud
Correction
W, A, S, D Translates the Bounding Box back, left, front, right
Ctrl + Right Mouse Button Translates the Bounding Box in all dimensions
Q, E Lifts the Bounding Box up, down
Z, X Rotates the Boundign Box around z-Axis
C, V Rotates the Boundign Box around y-Axis
B, N Rotates the Boundign Box around x-Axis
Scrolling with the Cursor above a Bounding Box Side ("Side Pulling") Changes the Dimension of the Bounding Box
R/Left, F/Right Previous/Next sample
T/Up, G/Down Previous/Next bbox
Y/,,H/. Change current bbox class to previous/next in list
1-9 Select any of first 9 bboxes with number keys
General
Del Deletes Current Bounding Box
P/Home Resets Perspective
Esc Cancels Selected Points

See Conventions for the principles on which the software is built.

Usage & Attribution

When using the tool feel free to drop me a mail with feedback or a description of your use case (christoph.sager[at]gmail.com). If you are using the tool for a scientific project please consider citing our publication:

# CAD Journal
@article{Sager_2022,
    doi = {10.14733/cadaps.2022.1191-1206},
    url = {http://cad-journal.net/files/vol_19/CAD_19(6)_2022_1191-1206.pdf},
    year = 2022,
    month = {mar},
    publisher = {{CAD} Solutions, {LLC}},
    volume = {19},
    number = {6},
    pages = {1191--1206},
    author = {Christoph Sager and Patrick Zschech and Niklas Kuhl},
    title = {{labelCloud}: A Lightweight Labeling Tool for Domain-Agnostic 3D Object Detection in Point Clouds},
    journal = {Computer-Aided Design and Applications}
} 

# CAD Conference
@misc{sager2021labelcloud,
  title={labelCloud: A Lightweight Domain-Independent Labeling Tool for 3D Object Detection in Point Clouds}, 
  author={Christoph Sager and Patrick Zschech and Niklas Kühl},
  year={2021},
  eprint={2103.04970},
  archivePrefix={arXiv},
  primaryClass={cs.CV}
}

Acknowledgment

I would like to thank the Robotron RCV-Team for the support in the preparation and user evaluation of the software. The software was developed as part of my diploma thesis titled "labelCloud: Development of a Labeling Tool for 3D Object Detection in Point Clouds" at the Chair for Business Informatics, especially Intelligent Systems of the TU Dresden. The ongoing research can be followed in our project on ResearchGate.

labelcloud's People

Contributors

ch-sa avatar chingyulin avatar chohyoungseo avatar divelix avatar francescofact avatar halfwake avatar spacewalk01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

labelcloud's Issues

Viewer: Camera center of rotation is weird

When holding left click, you can rotate the view inside the viewer.
However, the center rotation point is always the center of the world, which is weird.
I would expect the camera to rotate around the point you are looking at (like in most 3D modeling tools), or the camera position itself (like in first person video games).

Hi

Hi, I want to use this labeling tool
It Successfully loaded the file But it can't visualization my ply file

Please,,!!!!Could you help me?????

Document controls in software

I propose to add some text in the software (below the GUI control panel? perhaps a "help" window?) that says:

Hover your mouse over the face of bounding box and scroll to adjust its size in that dimension!
Press [CTRL] + click hold and drag a bounding box to rotate it!

Clipping with custom files

Hi,

I can't manage to correctly view my point cloud which is originally a .las file.
It seems to load correctly (no warning nor error in labelCloud logs), however view is completely broken. You can see in the following screenshot that even the ground grid doesn't show well. If I move the mouse, it is clipping somehow else.

image

Note that because .las files aren't supported, I converted it to .ply (big-endian storage) using PDAL and CloudCompare which give me the same clipping results.

Also note that your exemplary.ply file display well, even if I reload it.

My setup is :

  • Ubuntu 20.04.2
  • python 3.8.10
  • installed through pip 20.2.3

The same .ply file displays well in CloudCompare :
image

I attach the file here in case you want to test :
tree_05_01_z0.zip

when i run `python labelCloud.py`, it happens. pointclouds/000000.bin is comes from KITTI.

Got keys from plugin meta data ("svg", "svgz", "svg.gz")
QFactoryLoader::QFactoryLoader() checking directory path "/root/anaconda3/envs/labelcloud/bin/iconengines" ...
Loading next point cloud...
Loading point cloud from pointclouds/000000.bin using NumpyHandler.
============================================================= Loading 000000.bin =============================================================
Generated colors for colorless point cloud based on height.
Successfully loaded point cloud from pointclouds/000000.bin!
Number of Points:          115384            
Number of Colors:          115384            
Point Cloud Center:        [ 0.89  1.19 -0.97]        
Point Cloud Minimums:      [-71.04 -21.1   -5.16]     
Point Cloud Maximums:      [73.04 53.8   2.67]        
Initial Translation:       [  -0.89   -1.19 -161.6 ]  
==============================================================================================================================================
There is currently no active bounding box to manipulate.
There is currently no active bounding box to manipulate.
Alignmode was changed to False!
Loaded 0 bboxes!
There is currently no active bounding box to manipulate.
Intialized widget.
Resized widget.
QFactoryLoader::QFactoryLoader() checking directory path "/root/anaconda3/envs/labelcloud/lib/python3.7/site-packages/PyQt5/Qt/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/root/anaconda3/envs/labelcloud/bin/accessible" ...
Showing GUI...
QFactoryLoader::QFactoryLoader() checking directory path "/root/anaconda3/envs/labelcloud/lib/python3.7/site-packages/PyQt5/Qt/plugins/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/root/anaconda3/envs/labelcloud/bin/accessiblebridge" ...
Traceback (most recent call last):
  File "/root/alusi/labelCloud-master/labelCloud/view/viewer.py", line 85, in paintGL
    self.pcd_manager.pointcloud.draw_pointcloud()
  File "/root/alusi/labelCloud-master/labelCloud/model/point_cloud.py", line 216, in draw_pointcloud
    GL.glVertexPointer(3, GL.GL_FLOAT, stride, None)
  File "src/latebind.pyx", line 39, in OpenGL_accelerate.latebind.LateBind.__call__
  File "src/wrapper.pyx", line 321, in OpenGL_accelerate.wrapper.Wrapper.__call__
  File "/root/anaconda3/envs/labelcloud/lib/python3.7/site-packages/OpenGL/arrays/arrayhelpers.py", line 156, in __call__
    contextdata.setValue( self.constant, pyArgs[self.pointerIndex] )
  File "/root/anaconda3/envs/labelcloud/lib/python3.7/site-packages/OpenGL/contextdata.py", line 58, in setValue
    context = getContext( context )
  File "/root/anaconda3/envs/labelcloud/lib/python3.7/site-packages/OpenGL/contextdata.py", line 41, in getContext
    """Attempt to retrieve context when no valid context"""
OpenGL.error.Error: Attempt to retrieve context when no valid context
Aborted

pcl not shown under docker

hello,

I've had to install labelCloud in a docker container.
when I execute it , the window frame/menu/buttons are all shown.
but the actual point cloud is not rendered.
the main part of the window that should display the point cloud ( data from exemplary.ply) is black with white text - looks like part of the terminal.

no error messages are actually written to the terminal.
(regardless ) here's the output that is written :

mypath# python3 labelCloud.py 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Set export strategy to CentroidFormat.
Saving rotations absolutely to positve x-axis in degrees (0..360°).
mypath.../labelCloud
Loading next point cloud...
==================== Loading exemplary.ply ====================
Number of Points: 86357
Point Cloud Center:		[ 0.03 -0.37  0.29]
Point Cloud Minimums:	[-2.02 -1.42 -0.03]
Point Cloud Maximums:	[0.98 0.95 0.94]
Initial Translation:	[-0.03  0.37 -4.22]
Successfully loaded point cloud from pointclouds/exemplary.ply!
=================================================================
There is currently no active bounding box to manipulate.
There is currently no active bounding box to manipulate.
Alignmode was changed to False!
Imported 1 labels from labels/exemplary.json.
Loaded 1 bboxes!
There is currently no active bounding box to manipulate.
COMPLETER CLASSNAMES: {'cart', 'box'}

here's what it looks like
labelCloud

please advise.
Omer

About KITTI format label

I want to know that how to make the transformation between velodyne coordinate and camera coordinate.
I find that in the source code, the transformation is "centroid = (-centroid[1], centroid[2] + 2.3, centroid[0])"
which means that
camera coord velodyne coord
x = -y
y = z+2.3
z = x

I want to know why the transformation is defined like this.
As I know that in KITTI dataset the coordinate are defined bellow:
Camera: x = right, y = down, z = forward
Velodyne: x = forward, y = left, z = up
and they use callib data to transform the coordinate specifically.

Panning viewport does not shift the origin of rotation at the object

Hi all,

I am trying to use your great tool for annotating objects in point clouds reconstructed by a structure from motion method, which are noisy and don't have a canonical orientation. I pretty much failed to do it using the tool. Here is the point cloud of a car that I would like to draw a bounding box around. The first problem is with positioning the camera such that it is centered around the object of interest. Panning the viewport with right mouse actually does not put the object in the center so that I could rotate around it using the left mouse button. And with that I find it really difficult to draw the bounding box using the Span mode with Z-rotation only Mode switched off.

Error with loading ordered PCD files. Cannot load files with Nan values!

Hi, u should add a drop Nan function to PCD loader.

Could not parse stylesheet of object GUI(0x24c73677170, name = "MainWindow")
Showing GUI...
Resized widget.
Resized widget.
Loading next point cloud...
==================== Loading 2022-01-18-09-45-22_0.pcd ====================
Number of Points: 78750
Generating colors for colorless point cloud!
Traceback (most recent call last):
File "c:\users\roboball\appdata\local\programs\python\python37\lib\site-packages\labelCloud\view\gui.py", line 600, in change_pointcloud_folder
self.controller.pcd_manager.get_next_pcd()
File "c:\users\roboball\appdata\local\programs\python\python37\lib\site-packages\labelCloud\control\pcd_manager.py", line 104, in get_next_pcd
self.pointcloud = self.load_pointcloud(self.get_current_path())
File "c:\users\roboball\appdata\local\programs\python\python37\lib\site-packages\labelCloud\control\pcd_manager.py", line 202, in load_pointcloud
tmp_pcd.colors = color_pointcloud(tmp_pcd.points, min_height, max_height)
File "c:\users\roboball\appdata\local\programs\python\python37\lib\site-packages\labelCloud\control\pcd_manager.py", line 38, in color_pointcloud
colors[ind] = palette[round((height - z_min) / (z_max - z_min) * palette_len)]
ValueError: cannot convert float NaN to integer

openGL error

image

Python Version: 3.7.11
Numpy Version: 1.21.5
open3d Version: 0.14.1
openGL Version: 3.1.5
PyQt5 Version: 5.14.1

When I wanted to run labelCloud.py, I faced this problem.
Does anyone know how to solve this problem?
Thanks!

pcd point cloud not shown

hello,

i've manged to load a pcd file, here's the log:

==================== Loading first.pcd ====================
Number of Points: 577761
Point Cloud Center:		[460.1  604.01 732.4 ]
Point Cloud Minimums:	[  1.  98. 297.]
Point Cloud Maximums:	[1200.  971. 1351.]
Initial Translation:	[ -460.1   -604.01 -2551.92]
Successfully loaded point cloud from /home/omerbrandis/ffrobotics/labelCloud/ffrpointclouds/first.pcd!
=================================================================

but the point cloud is not displayed.
( I was able to see the point cloud defined in exemplary.ply).

here's the display
labelcloud2

please advise
Omer.

is_dir => is_dir()

Describe the bug
Fails while setting "Show related 2D Images in new Window"

To Reproduce
Steps to reproduce the behavior:

  1. Go to Settings
  2. Click on "Show related 2D Images in new Window"
  3. click Save
  4. See error

Traceback (most recent call last):
File "C:\Users\felix\anaconda3\lib\site-packages\labelCloud\view\settings_dialog.py", line 175, in save
path_to_label_folder=config["FILE"]["label_folder"],
File "C:\Users\felix\anaconda3\lib\site-packages\labelCloud\control\label_manager.py", line 53, in init
if not self.label_folder.is_dir():
AttributeError: 'str' object has no attribute 'is_dir'

Windows + Anaconda using 3.7

Bounding box is not aligned with selected area

As seen from the intro video, the bounding box is more like to be designed for a thick object. In my case, my point cloud object is as slender as a paper. I don't mind adjusting the bounding box to be thin. However, the fact is that its position is a little bit away from the selected area. You may see below:

a rough area is selected in yellow:
Screenshot 2021-07-23 at 1 57 14 PM
after estimating its thickness, the bounding box seems a bit off from expectation.
Screenshot 2021-07-23 at 1 57 58 PM

I'm not sure if it is possible to have drawing lines feature. Thank you for your time.

PyQt5 error

I have installed the requirements.txt and get the following error when i use python labelCloud.py:
from PyQt5.QtWidgets import QApplication, QDesktopWidget
ImportError: DLL load failed: The specified module cannot be found.
Do you know how to fix it?

not a bug, just some doubt about change side function

in bbox. py->translate_side function, through translate_point function can achieve the purpose of changing a side, and the result is right. but I can't understand that a side can be changed alone through the translation center. Theoretically, the translation center should be the overall offset of bbox. Can you help explain it

vertices label format

Hi, thank you for sharing this project
I am trying to create a 3d bounding box on my pint cloud but I could not save it as vertices label format, can you help me how to do that?

[Proposal] error msg "no point clouds found" more explicit

If you do not have any valid point cloud files in your specified pointcloud directory, you will get the error msg

labelCloud could not find any valid point cloud files inside the specified folder.

My proposal is to also print the configured path, where the software is looking for the files (e.g. "~/pointclouds").

If i push the ctrl key, execution end.

Ctrl + mouse left click control rotation problem -> If i push the ctrl key, execution end.

pcd_z_rotation = self.pcdc.get_pointcloud().rot_z -> code problem

I don't know reason this problem.

image

What is the coordinate of the bounding boxes?

I am trying to label the 3D bounding boxes on 2D images. I have the 3D point cloud of a scene in the world coordinate. When I label the 3D bounding box in the point cloud using labelCloud and project it into the image plane, there is some misalignment for the generated 9 coordinates(center and 8 corners).
I want to know if the generated labels (3D bounding boxes) are in the same coordinate of my point cloud? Or if labelCloud applies a translation and rotation to point cloud and the label is based on the new coordinate system?

Feature request: Working with multispectral pointclouds

Good day.
On the future of 3D data, more and more wavelengths are been used additional to RGB (i.e. temperature, etc).
Is it possible to implement annotation using multi wavelength point cloud?. Clearly not all wavelenghts/colors need to be shown

Thanks in advance

pip install labelCloud does not work

OS: Win10 x64
Python 3.9.2

pip install labelCloud
Collecting labelCloud
Downloading labelCloud-0.6.4-py3-none-any.whl (260 kB)
|████████████████████████████████| 260 kB 2.2 MB/s
Collecting PyQt5~=5.14.1
Downloading PyQt5-5.14.2.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB ...
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\users\bubbe\appdata\local\programs\python\python39\python.exe' 'C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\bubbe\AppData\Local\Temp\tmpal040w4u'
cwd: C:\Users\bubbe\AppData\Local\Temp\pip-install-48z_p51c\pyqt5_3807600e6d41409182b0d5ea228be56a
Complete output (29 lines):
Traceback (most recent call last):
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 363, in
main()
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-tlwffaew\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-tlwffaew\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-tlwffaew\overlay\Lib\site-packages\sipbuild\project.py", line 479, in setup
self.apply_user_defaults(tool)
File "project.py", line 62, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-tlwffaew\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-tlwffaew\overlay\Lib\site-packages\sipbuild\project.py", line 225, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-tlwffaew\overlay\Lib\site-packages\pyqtbuild\builder.py", line 66, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException

WARNING: Discarding https://files.pythonhosted.org/packages/4d/81/b9a66a28fb9a7bbeb60e266f06ebc4703e7e42b99e3609bf1b58ddd232b9/PyQt5-5.14.2.tar.gz#sha256=bd230c6fd699eabf1ceb51e13a8b79b74c00a80272c622427b80141a22269eb0 (from https://pypi.org/simple/pyqt5/) (requires-python:>=3.5). Command errored out with exit status 1: 'C:\users\bubbe\appdata\local\programs\python\python39\python.exe' 'C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\bubbe\AppData\Local\Temp\tmpal040w4u' Check the logs for full command output.
Downloading PyQt5-5.14.1.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB ...
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\users\bubbe\appdata\local\programs\python\python39\python.exe' 'C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\bubbe\AppData\Local\Temp\tmpyuxhoqdb'
cwd: C:\Users\bubbe\AppData\Local\Temp\pip-install-48z_p51c\pyqt5_527f5f53c4c34826ab593af595c10255
Complete output (29 lines):
Traceback (most recent call last):
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 363, in
main()
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-nd_g59vu\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-nd_g59vu\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-nd_g59vu\overlay\Lib\site-packages\sipbuild\project.py", line 479, in setup
self.apply_user_defaults(tool)
File "project.py", line 62, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-nd_g59vu\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-nd_g59vu\overlay\Lib\site-packages\sipbuild\project.py", line 225, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\bubbe\AppData\Local\Temp\pip-build-env-nd_g59vu\overlay\Lib\site-packages\pyqtbuild\builder.py", line 66, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException

WARNING: Discarding https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz#sha256=2f230f2dbd767099de7a0cb915abdf0cbc3256a0b5bb910eb09b99117db7a65b (from https://pypi.org/simple/pyqt5/) (requires-python:>=3.5). Command errored out with exit status 1: 'C:\users\bubbe\appdata\local\programs\python\python39\python.exe' 'C:\users\bubbe\appdata\local\programs\python\python39\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\bubbe\AppData\Local\Temp\tmpyuxhoqdb' Check the logs for full command output.
Collecting labelCloud
Downloading labelCloud-0.6.3-py3-none-any.whl (257 kB)
|████████████████████████████████| 257 kB ...
Downloading labelCloud-0.6.2-py3-none-any.whl (257 kB)
|████████████████████████████████| 257 kB ...
Downloading labelCloud-0.6.1-py3-none-any.whl (248 kB)
|████████████████████████████████| 248 kB ...
Downloading labelCloud-0.0.2-py3-none-any.whl (258 kB)
|████████████████████████████████| 258 kB ...
Downloading labelCloud-0.0.1-py3-none-any.whl (250 kB)
|████████████████████████████████| 250 kB ...
ERROR: Cannot install labelcloud==0.0.1, labelcloud==0.0.2, labelcloud==0.6.1, labelcloud==0.6.2, labelcloud==0.6.3 and labelcloud==0.6.4 because these package versions have conflicting dependencies.

The conflict is caused by:
labelcloud 0.6.4 depends on PyQt5~=5.14.1
labelcloud 0.6.3 depends on open3d~=0.13.0
labelcloud 0.6.2 depends on open3d~=0.13.0
labelcloud 0.0.2 depends on open3d~=0.13.0
labelcloud 0.0.1 depends on open3d~=0.13.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Can labelCloud run in Jupter notebook

Hi, I was wondering if I can run the code in jupyter notebook. I tried to copy the code in labelCloud.py and run it in jupyter notebook but I get labelcloud not responding.
import sys
from PyQt5 import QtWidgets

sys.path.append('\Label_cloud_test\labelCloud-master\labelCloud')
from control.controller import Controller
from view.gui import GUI

def get_main_app():
app = QtWidgets.QApplication(sys.argv)
control = Controller()
view = GUI(control)
app.installEventFilter(view)
# Start GUI
view.show()
return app, view

get_main_app()

Shortcuts not working

On Ubuntu 18.04, python 3.6.9 the following shortcuts do not react:
Ctrl + A , Ctrl + S
Additionally , the R shortcut work with Ctrl + R

Manually enter dimension/rotation

Hello, thank you for this great tool !

It would be interesting to have a feature to manually enter the dimension/rotation in the box (highlighted in yellow in the picture below). This allows more precise bounding boxes when the scene is composed of different size objects and avoids modifying the config.ini file.
image

export KITTI format

hello,

I tried to label my own pcd file and export as KITTI format.
what should I do to export tor KITTI format (txt file)

thanks.

KITTI and CARLA data

Hi, I have a problem with the data imported in kitti format, both from the official website and from the CARLA simulator.
In labelCloud velodynes and bounding boxes are mismatched. Scrinshots below.

s1
s2
s3

Do you have any idea what to do, to use your tool with this data?

Point cloud visualization is sparse

My point clouds are visualized as they have far less points than they actually have.
I attach 2 pictures: the first shows the visualization I get, while the second shows the correct one.

As a further note, the exemplary pointcloud provided by you is visualized correctly.

I'm running on Ubuntu 20.04.3 LTS and python 3.8.10.
This error happens both when installing labelCloud via pip and when performing a manual installation downloading the github repo.

Screenshot from 2022-03-21 18-27-02
image

How to label both pointcloud and image?

This is a very excellent tool for labeling point cloud. But I want to know how can I get both labels from images and point clouds? Part of information of labels (which come from image) are all zeros now.

File Format Issue

Here i have .ply file ( Type: plain text) which is genereated by laser . Also i have the same file which is converted into Binary .PLY file which is required for annotation .
Here the problem is that i'm not able to read/visual the .PLY file which of the type plain text in labelcloud also when i convert into binary .ply format

OR Is it a file size issue.??

PFA

Screenshot from 2021-10-01 09-45-44
Screenshot from 2021-10-01 09-46-52

show_2d_image = True,

Traceback (most recent call last):
  File "~/labelCloud-master/labelCloud/view/gui.py", line 310, in <lambda>
    self.button_2D.pressed.connect(lambda: self.show_2d_image())
  File "~/labelCloud-master/labelCloud/view/gui.py", line 441, in show_2d_image
    image_name = next(filter(image_file_pattern.search, files_in_image_folder))
TypeError: expected string or bytes-like object
[FILE]
; source of point clouds
pointcloud_folder = dataset_sampling/
; sink for label files
label_folder = dataset_labels/
;2d image folder
image_folder = dataset_images/

dataset_images/BJ2-01-2-137-04-01-009-046-1-001-D.png
dataset_sampling/BJ2-01-2-137-04-01-009-046-1-001-D.ply

Multi view annotation

I have seen some other labeling software. When labeling, I can see the top, side and front view of the point_cloud and 3DBOX at the same time and can also edit them.I suggest the author do the same, which can improve efficiency,thanks~

Possible Bug

Hi @ch-sa
i just want to inform you, when I saved a label on the point clouds and close the program and open it again, the 3d bounding box is not the same coordinates as it was and if I save it without any modification it gives me different coordinates.
so I think this is a possible bug
best regards

Can't use the mouse to change the size of Bounding Boxes.

Hi,

I am trying to use this labeling tool, but I cannot use my mouse to change the size of the bounding boxes. Instead, there is another curser available which is impossible to use for all locations. I have also attached the image for more clarification.
Screen Shot 2021-04-18 at 12 05 00 PM

Can I label with comparing original images?

Hi, again. I'm always thank for your project.

Out of curiosity, if I want to see original 2D image when I label pcd files, is there any possible solution to do that?

To simplify, here's what I mean to say:

image

As can see above, is there any possible solution to split windows and show different type of files?
(Since it's hard for newbie to recognize things just using pcd files)
Thanks in advance for your help :-)

error occured when initializeGL func running

Hi, this is my first time dealing with 3D data and I'm happy to start with your project. It's seems really nice and I want to study more.

By the way, when I tried to run labelCloud.py I got error messages as follows:

line 61, in initializeGL
    GL.glEnable(GL.GL_DEPTH_TEST)  # for visualization of depth
  File "C:\Users\user\.conda\envs\labeling\lib\site-packages\OpenGL\platform\baseplatform.py", line 415, in __call__
    return self( *args, **named )
  File "C:\Users\user\.conda\envs\labeling\lib\site-packages\OpenGL\error.py", line 230, in glCheckError
    raise self._errorClass(
OpenGL.error.GLError: GLError(
        err = 1282,
        description = b'invalid operation',
        baseOperation = glEnable,
        cArguments = (GL_DEPTH_TEST,)
)

I used virtualenv through Anaconda python 3.8 (since my local can't download visual c++ build tools for importing open3d)

this is my entire code captured.

(labeling_env) C:\Users\user\Desktop\labeling\github_project\labelCloud>python labelCloud.py
Set export strategy to CentroidFormat.
Saving rotations absolutely to positve x-axis in degrees (0..360°).
C:\Users\user\Desktop\labeling\github_project\labelCloud
Loading next point cloud...
==================== Loading 000000.bin ====================
Number of Points: 115384
Generating colors for colorless point cloud!
Point Cloud Center:             [ 0.89  1.19 -0.97]
Point Cloud Minimums:   [-71.04 -21.1   -5.16]
Point Cloud Maximums:   [73.04 53.8   2.67]
Initial Translation:    [  -0.89   -1.19 -161.6 ]
Successfully loaded point cloud from pointclouds/000000.bin!
=================================================================
There is currently no active bounding box to manipulate.
There is currently no active bounding box to manipulate.
Alignmode was changed to False!
Loaded 0 bboxes!
There is currently no active bounding box to manipulate.
COMPLETER CLASSNAMES: {'cart', 'box'}
Traceback (most recent call last):
  File "C:\Users\user\Desktop\labeling\github_project\labelCloud\labelCloud\view\viewer.py", line 61, in initializeGL
    GL.glEnable(GL.GL_DEPTH_TEST)  # for visualization of depth
  File "C:\Users\user\.conda\envs\labeling_env\lib\site-packages\OpenGL\platform\baseplatform.py", line 415, in __call__
    return self( *args, **named )
  File "C:\Users\user\.conda\envs\labeling_env\lib\site-packages\OpenGL\error.py", line 230, in glCheckError
    raise self._errorClass(
OpenGL.error.GLError: GLError(
        err = 1282,
        description = b'invalid operation',
        baseOperation = glEnable,
        cArguments = (GL_DEPTH_TEST,)
)

can you help me solving this problem?
at first, it seems okay but even gui doen't start at all.

image

what would be the problem? as this is my first time using openGL, I don't have any knowledge here. plz help me (the gui says it stopped to operate)

some parts of PLY file cut off in labelCloud tool

Screenshot 2021-07-22 at 7 47 17 PM

This is parts of my model visualized by labelCloud. However, when I zoom in or zoom out using touchpad. Significant parts are missing like this:

Screenshot 2021-07-22 at 7 48 32 PM

The grey area will increase when I zoomed out. May I ask for a possible solution on it? Thanks in advance.

Value Error: cannot convert float NaN to integer (fail to load .pcd data) + score? in kitti

Hi, I almost get familiar with labelCloud. it's very interesting.
However, I have some questions with this project.

  1. I got value Error: cannot convert float NaN to integer when I try to start labelCloud with .pcd data.
    other (.bin, examplary.ply) files are okay to label but .pcd got error. What is the problem with this .pcd file?

image

  1. If I use Kitti, I get only 15 params for output (your readme says 16 params, socre is absent)

image

is this right output of kitti? if score is only for result, how can I get and use score?
Thank You

Can't draw .ply

It seems not be able to draw .ply with just [x,y,z,r,g,b] data despite loaded with oped3d successfully.
--------my .ply with open3d--------------
ply
format binary_little_endian 1.0
comment Created by Open3D
element vertex 986723
property double x
property double y
property double z
property uchar red
property uchar green
property uchar blue
end_header

---------standard .ply with open3d----(This works-----------
ply
format binary_little_endian 1.0
comment PCL generated
element vertex 196133
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property float nx
property float ny
property float nz
property float curvature
element camera 1
property float view_px
property float view_py
property float view_pz
property float x_axisx
property float x_axisy
property float x_axisz
property float y_axisx
property float y_axisy
property float y_axisz
property float z_axisx
property float z_axisy
property float z_axisz
property float focal
property float scalex
property float scaley
property float centerx
property float centery
property int viewportx
property int viewporty
property float k1
property float k2
end_header

Implement editable text fields for bb parameters

Proposal:
Implement text fields that

  • show the current value of position & dimensions (size) of the bounding box
  • show the current values of the euler angles of the bounding box rotation (in degrees)

Nice to have would be the ability to edit those text fields to set the values this way.

Can labelCloud be used for small objects?

PC.zip
Hi Christoph,

I was wondering if labelcloud could be used with small objects (in the range of 18mm to 100 mm). I have tried to change the values of some parameters in the config.ini file but was not good. I have attached a pointcloud file (.ply) with one object with the setting I have changed. Would it be possible to have a look at it and let me know if it possible with this kind of objects?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.