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

Labels shift in height when repeatedly loaded #163

Closed
Luki132 opened this issue Jun 19, 2024 · 9 comments · Fixed by #167
Closed

Labels shift in height when repeatedly loaded #163

Luki132 opened this issue Jun 19, 2024 · 9 comments · Fixed by #167
Assignees
Labels
bug Something isn't working

Comments

@Luki132
Copy link

Luki132 commented Jun 19, 2024

Describe the bug
Labels shift in height when repeatedly loaded. This occurs, for instance, when toggling between two scenes with labels.

To Reproduce
Steps to reproduce the behavior:

  1. Open two point cloud scenes and add a label to each.
  2. Switch between the two scenes ten times.
  3. Observe the labels gradually shifting in height.

Expected behavior
The labels should remain consistent in their original positions, regardless of the number of times they are accessed.

Screenshots
Screenshot showing the height shift of two labeled objects (a person on a bicycle) after repeatedly opening the labels.
Bevor:

bevor

After:

after

Desktop (please complete the following information):

  • OS: Windows 10 Enterprise
  • Python Version: 3.7.8
  • Installation: manual/ git
@Luki132 Luki132 changed the title Labels shift in height when loading again Labels shift in height when repeatedly loaded Jul 10, 2024
@ch-sa
Copy link
Owner

ch-sa commented Jul 19, 2024

Hello @Luki132,

I tried to replicate your issue with multiple export formats but failed to do so.

Can you tell me which export format you selected and maybe provide an example point cloud and label?

Also providing the full config.ini and _classes.json would help.

@ch-sa ch-sa added the bug Something isn't working label Jul 19, 2024
@NArcher22
Copy link

NArcher22 commented Jul 23, 2024

I'm having the same issue described above. Every time I relaunch the app, the labels shift in height.

Laptop:
OS - Windows 11
Python version - 3.9.0
Installation - manual/git

Error:
I also receive the following errors when launching the app (I thought it might be related).
"Could not create pixmap from C:UsersxperimentallabelCloudlabelCloudresourcesicons\cube-outline.svg"
"Could not create pixmap from C:UsersxperimentallabelCloudlabelCloudresourcesicons\cube-outline_white.svg"
The path here is incorrect as it is missing the "" symbols. It should be: "C:\Users\Experimental\labelCloud\labelCloud\resources\icons\cube-outline.svg"
"C:\Users\Experimental\labelCloud\labelCloud\resources\icons\cube-outline_white.svg"

config.ini:
[FILE]
; source of point clouds
pointcloud_folder = pointclouds/
; sink for label files
label_folder = labels/
; definition of classes and export format
class_definitions = labels/_classes.json
; only for kitti = calibration file for each point cloud
calib_folder = calib/
; sink for segmentation files (*.bin point clouds) [optional]
segmentation_folder = labels/segmentation/
; 2d image folder [optional]
image_folder = images/

[POINTCLOUD]
; drawing size for points in point cloud
point_size = 4.0
; point color for colorless point clouds (r,g,b)
colorless_color = 0.9, 0.9, 0.9
; colerize colorless point clouds by height value [optional]
colorless_colorize = True
; standard step for point cloud translation (for mouse move)
std_translation = 0.03
; standard step for zooming (for scrolling)
std_zoom = 0.0025
; blend the color with segmentation labels [optional]
color_with_label = True
; mix ratio between label colors and rgb colors [optional]
label_color_mix_ratio = 0.3

[LABEL]
; number of decimal places for exporting the bounding box parameter.
export_precision = 8
; default length of the bounding box (for picking mode)
std_boundingbox_length = 0.75
; default width of the bounding box (for picking mode)
std_boundingbox_width = 0.55
; default height of the bounding box (for picking mode)
std_boundingbox_height = 0.15
; standard step for translating the bounding box with button or key (in meter)
std_translation = 0.03
; standard step for rotating the bounding box with button or key (in degree)
std_rotation = 0.5
; standard step for scaling the bounding box with button
std_scaling = 0.03
; minimum value for the length, width and height of a bounding box
min_boundingbox_dimension = 0.01
; propagate labels to next point cloud if it has no labels yet
propagate_labels = False

[USER_INTERFACE]
; only allow z-rotation of bounding boxes. set false to also label x- & y-rotation
z_rotation_only = False
; visualizes the pointcloud floor (x-y-plane) as a grid
show_floor = False
; visualizes the object's orientation with an arrow
show_orientation = True
; background color of the point cloud viewer (rgb)
background_color = 100, 100, 100
; number of decimal places shown for the parameters of the active bounding box
viewing_precision = 2
; near and far clipping plane for opengl (where objects are visible, in meter)
near_plane = 0.1
far_plane = 300
; keep last perspective between point clouds [optional]
keep_perspective = False
; show button to visualize related images in a separate window [optional]
show_2d_image = True
; delete the bounding box after assigning the label to the points [optional]
delete_box_after_assign = False

_classes.json:
{
"classes": [
{
"name": "Car",
"id": 0,
"color": "#0000ff"
}
],
"default": 0,
"type": "object_detection",
"format": "kitti",
"created_with": {
"name": "labelCloud",
"version": "1.1.0"
}
}

Let me know if you need any more information.

@ch-sa
Copy link
Owner

ch-sa commented Jul 24, 2024

@NArcher22 thanks for the data!

Might be Windows-related, if I cannot reproduce.

I will give it another try.

For the icons seems like the path is broken (likely due to windows \) but this should not have an effect on the label position.

You could do two more things:

  1. Check if this also happens, when installing with pip install labelCloud.

  2. Send me the label data before and after save (I want to find out, if there is a constant diff).

@NArcher22
Copy link

NArcher22 commented Jul 25, 2024

@ch-sa Thank you for responding.

  1. I have installed labelCloud separately with pip and the shift still occurs. This did remove the path error I had before but now I have this error:
    "Could not parse stylesheet of object GUI(0x23842f1b150, name = "MainWindow")"
    Which I think could possibly be due to the same reason (windows \).

  2. The label files and related screenshots are posted below for the original imported data, after saving once and after saving twice.
    Original imported data:

test_image_before_save [label_before_save.txt](https://github.com/user-attachments/files/16369363/label_before_save.txt)

After saving once:
test_image_after_save
label_after_save.txt

After saving twice:
test_image_after_2_saves
label_after_2_saves.txt

Please let me know if you discover anything.

ch-sa added a commit that referenced this issue Aug 18, 2024
@ch-sa
Copy link
Owner

ch-sa commented Aug 18, 2024

I fixed the path issue for the icon.

The Qt stylesheets always require a POSIX-like path and no \ even on windows.

For the issue of shifting heights I still could not reproduce it (even on windows).

Though I only tested with other label formats since I did not had calibration files at hand.

Did the issue only appear with the kitti label format or also with other formats?

@ch-sa
Copy link
Owner

ch-sa commented Aug 18, 2024

Ok, now I can replicate it as well.

The issue appears only when using the kitti label format and binary point clouds with calibration files.
So I assume the bug must be somewhere in here:
https://github.com/ch-sa/labelCloud/blob/master/labelCloud/io/labels/kitti.py

@ch-sa
Copy link
Owner

ch-sa commented Aug 18, 2024

Found the issue: Not the correct dimension was used on export with kitti format.
See linked PR: #167

Thanks for reporting.

@ch-sa
Copy link
Owner

ch-sa commented Aug 18, 2024

Fix is merged to master and published to PyPI with v1.1.1.

@haidongqing2022
Copy link

When I saved the point cloud annotation to the Kitti dataset format, after adding the calibration file, the saving format is still the same as the kitti_untransformed.
like this:Pedestrian 0 0 0 0 0 0 0 1.68 0.7 0.36 -2.2647945 1.10808719 9.39963404 1.57079633
Pedestrian 0 0 0 0 0 0 0 0.15 2.38 0.75 -10.80678875 1.12563597 7.5329695 0.48869219
The position of the 2D box has been 0 and I would like to know how to fix it.
the calibration txt is below(I download in the kitti dataset website, If it works, the position of the 2dbox is not 0,Although the data is not on the Kitti website, it should not be 0.):
P0: 7.215377000000e+02 0.000000000000e+00 6.095593000000e+02 0.000000000000e+00 0.000000000000e+00 7.215377000000e+02 1.728540000000e+02 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 0.000000000000e+00
P1: 7.215377000000e+02 0.000000000000e+00 6.095593000000e+02 -3.875744000000e+02 0.000000000000e+00 7.215377000000e+02 1.728540000000e+02 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 0.000000000000e+00
P2: 7.215377000000e+02 0.000000000000e+00 6.095593000000e+02 4.485728000000e+01 0.000000000000e+00 7.215377000000e+02 1.728540000000e+02 2.163791000000e-01 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 2.745884000000e-03
P3: 7.215377000000e+02 0.000000000000e+00 6.095593000000e+02 -3.395242000000e+02 0.000000000000e+00 7.215377000000e+02 1.728540000000e+02 2.199936000000e+00 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 2.729905000000e-03
R0_rect: 9.999239000000e-01 9.837760000000e-03 -7.445048000000e-03 -9.869795000000e-03 9.999421000000e-01 -4.278459000000e-03 7.402527000000e-03 4.351614000000e-03 9.999631000000e-01
Tr_velo_to_cam: 7.533745000000e-03 -9.999714000000e-01 -6.166020000000e-04 -4.069766000000e-03 1.480249000000e-02 7.280733000000e-04 -9.998902000000e-01 -7.631618000000e-02 9.998621000000e-01 7.523790000000e-03 1.480755000000e-02 -2.717806000000e-01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants