amundra15 / livehand

Official PyTorch implementation of the ICCV '23 paper LiveHand
MIT License
58 stars 5 forks source link

Are there any bugs in the prepare_dataset.py? #15

Open LuXiao0228 opened 3 weeks ago

LuXiao0228 commented 3 weeks ago

While I was using data processing code to process test/Capture0, the following error occurred. Have you encountered this error before, or might you have any suggestions for a possible solution?

Traceback (most recent call last): File "/amax/xiaolu/code/avatars/livehand/preprocessing/InterHands2.6M/prepare_dataset.py", line 385, in mano_mask_gc_lc = largest_component(mano_mask_gc) File "/amax/xiaolu/code/avatars/livehand/preprocessing/InterHands2.6M/prepare_dataset.py", line 233, in largest_component max_label, max_size = max([(i, stats[i, cv2.CC_STAT_AREA]) for i in range(1, nb_components)], key=lambda x: x[1]) # Note: range() starts from 1 since 0 is the background label. ValueError: max() arg is an empty sequence munmap_chunk(): invalid pointer Aborted (core dumped)

amundra15 commented 2 weeks ago

Hi, I did not encounter this issue, but someone else reported it too. We are using a heuristics-based approach to generate the refined FG-BG masks. I think the issue is happening because the connected component estimation is failing for some reason. I suggest saving the intermediate variables (masks) as binary images to see which step is failing.