-
Notifications
You must be signed in to change notification settings - Fork 14
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
Run HOV-SG on own datassets #14
Comments
Logs that I am getting while running HOV-SG on high-res dataset. (hovsg_exp) ➜ HOV-SG git:(main) ✗ python application/create_graph.py main.dataset=hm3dsem main.dataset_path=/home/dev/repos/hov-sg-dataset-tools/hov-sg-dataset-tools/hov_sg_dataset_tools/output_highres/sim_office_dataset_highres/val main.save_path=data/sim_office_dataset_highres
[2024-08-07 20:04:35,523][root][INFO] - Loaded ViT-H-14 model config.
[2024-08-07 20:04:43,524][root][INFO] - Loading pretrained ViT-H-14 weights (checkpoints/laion2b_s32b_b79k.bin).
Creating RGB-D point cloud: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 358/358 [00:36<00:00, 9.79it/s]
Extracting features: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 358/358 [38:34<00:00, 6.47s/it]
Merging 3d masks hierarchically
0%| | 0/179 [00:00<?, ?it/s]/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:507: RuntimeWarning: invalid value encountered in scalar divide
obj_1_overlap = overlap_volume / bbox1_volume
/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:508: RuntimeWarning: invalid value encountered in scalar divide
obj_2_overlap = overlap_volume / bbox2_volume
/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:511: RuntimeWarning: invalid value encountered in scalar divide
iou = overlap_volume / (bbox1_volume + bbox2_volume - overlap_volume)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 179/179 [00:08<00:00, 20.59it/s]
th: 0.7251404494382022
99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 89/90 [00:11<00:00, 7.83it/s]
th: 0.7004213483146067
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 45/45 [00:21<00:00, 2.05it/s]
th: 0.6759895301327885
96%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 22/23 [00:41<00:01, 1.89s/it]
th: 0.6521258937691521
92%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ | 11/12 [01:22<00:07, 7.47s/it]
th: 0.6293986210418794
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [02:41<00:00, 26.84s/it]
th: 0.6093986210418794
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [05:12<00:00, 104.30s/it]
th: 0.5968986210418794
50%|████████████████████████████████████████████████████████████████████████████████████ | 1/2 [08:40<08:40, 520.20s/it]
th: 0.5968986210418794
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [15:04<00:00, 904.41s/it]
Fusing features: 4702it [00:04, 1151.07it/s]
number of masks: 4702
number of pcds in hovsg: 4702
-- removing small and empty masks --
number of masked pcds: 2351
number of mask_feats: 2351
masked pcds saved to disk in data/sim_office_dataset_highres/hm3dsem/00824-Dd4bFSTQ8gi
full pcd saved to disk in data/sim_office_dataset_highres/hm3dsem/00824-Dd4bFSTQ8gi
full pcd feats saved to disk in data/sim_office_dataset_highres/hm3dsem/00824-Dd4bFSTQ8gi
hm3dsem
segmenting floors...
downpcd (452, 3)
bins 933.3560382305654
distance 20.0
0.2647374062165059
min_peak_height 1.0
clustred_peaks [-6.80846019 -5.17783817 -4.57760921 0.49432553]
floors [[-6.808460189483645, -5.177838171996163], [-4.577609208503837, 0.4943255330063092]]
number of floors: 2
segmenting rooms...
grid_size: 0.05
occupancy_map shape: (40, 40)
range of dist: 0.0 5.656854
number of seeds, aka rooms: 1
area of seed 0: 155.5
min_area: 100.0
number of contours after remove small seeds: 1
room_vertices shape: (2, 1244)
Assign floor points to rooms: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 354.37it/s]
Computing room features: 358it [00:18, 19.47it/s]
/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:95: UserWarning: *c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*. Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.
plt.scatter(room_2d_points[:, 0], room_2d_points[:, 1], s=0.1, c=cmap(room_idx))
assign camera to room: 0%| | 0/358 [00:00<?, ?it/s]/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:112: UserWarning: *c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*. Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.
plt.scatter(pos[0], pos[1], s=3.0, c=pose_cmap(closest_room_idx))
assign camera to room: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 358/358 [00:00<00:00, 2842.38it/s]
[0 1 2 3 4 5 6 7 8 9]
number of rooms in floor 0 is 2
grid_size: 0.05
occupancy_map shape: (80, 480)
range of dist: 0.0 5.8309517
number of seeds, aka rooms: 9
area of seed 0: 250.0
area of seed 1: 47.0
area of seed 2: 69.5
area of seed 3: 81.0
area of seed 4: 105.5
area of seed 5: 0.0
area of seed 6: 114.5
area of seed 7: 143.5
area of seed 8: 88.0
min_area: 100.0
number of contours after remove small seeds: 4
room_vertices shape: (4, 2)
Assign floor points to rooms: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 5.06it/s]
Computing room features: 358it [00:17, 20.43it/s]
/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:95: UserWarning: *c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*. Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.
plt.scatter(room_2d_points[:, 0], room_2d_points[:, 1], s=0.1, c=cmap(room_idx))
assign camera to room: 0%| | 0/358 [00:00<?, ?it/s]/home/dev/repos/HOV-SG/hovsg/utils/graph_utils.py:112: UserWarning: *c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*. Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.
plt.scatter(pos[0], pos[1], s=3.0, c=pose_cmap(closest_room_idx))
assign camera to room: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 358/358 [00:00<00:00, 1782.93it/s]
[0 1 2 3 4 5 6 7 8 9]
[0 1 2 3 4 5 6 7 8 9]
[0 1 2 3 4 5 6 7 8 9]
[0 1 2 3 4 5 6 7 8 9]
number of rooms in floor 1 is 4
segmenting/identifying objects...
Floor: 0: 0%| | 0/2 [00:00<?, ?it/s/home/dev/repos/HOV-SG/hovsg/graph/graph.py:647: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). Consider using `matplotlib.pyplot.close()`.
fig, ax = plt.subplots()
Floor: 1: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [02:55<00:00, 87.60s/it]
number of objects: 2010
Creating graph...
reverse pose sequence
Error executing job with overrides: ['main.dataset=hm3dsem', 'main.dataset_path=/home/dev/repos/hov-sg-dataset-tools/hov-sg-dataset-tools/hov_sg_dataset_tools/output_highres/sim_office_dataset_highres/val', 'main.save_path=data/sim_office_dataset_highres']
Traceback (most recent call last):
File "/home/dev/repos/HOV-SG/application/create_graph.py", line 34, in main
hovsg.build_graph(save_path=save_dir)
File "/home/dev/repos/HOV-SG/hovsg/graph/graph.py", line 832, in build_graph
self.create_nav_graph()
File "/home/dev/repos/HOV-SG/hovsg/graph/graph.py", line 866, in create_nav_graph
sparse_stairs_voronoi = nav_graph.get_stairs_graph_with_poses_v2(
File "/home/dev/repos/HOV-SG/hovsg/graph/navigation_graph.py", line 844, in get_stairs_graph_with_poses_v2
min_height = np.min([pos[1] for pos in tar_poses])
File "/home/dev/miniforge3/envs/hovsg_exp/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 2953, in min
return _wrapreduction(a, np.minimum, 'min', axis, None, out,
File "/home/dev/miniforge3/envs/hovsg_exp/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 88, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace. |
It seems that the point cloud is empty. You could print the point cloud at this line to see what happened (insert I also notice that you are using the |
I also had a similar issue, in my case the problem was to do with the scaling of the depth, judging by the depth image posted here it could be the same. The depth array should be scaled by 1000.0 before saving and then in HOV-SG it will be scaled back down. If you haven't done the scaling before saving the depth PNG you should set the scale factor to 1.0, although you should probably do the scaling so you don't lose depth precision otherwise you are saving the depths as integers. |
@mga-97 In our dataset, since we saved the depth image as a |
@Tom-Huang Are you referring to the real world data you recorded? It seemed to me from the README that for "main.dataset: hm3dsem" the depth is PNG and the scaling used is here |
@mga-97 ah, you are right. I didn't notice the refactoring. |
Are you successful now? |
I want to run HOV-SG on own dataset.
I controlled simulated robot and gathered
RGB
images,depth
images andpos
. Than - reformatted this data in the structure, similar tohm3dsem
dataset.I've created 2 different datasets:
HOV-SG failed to build a proper Scene Graphs on those datasets (I will post full logs and results for each dataset in comments to this issue).
Command I've used for graph generation:
Config:
Could you help identifying possible problems and give some hints how I can debug the issue?
Details will be in comments to this issue.
Data examples.
RGB:
Depth:
Pos:
27.000001408.txt
The text was updated successfully, but these errors were encountered: