oakink / OakInk

[CVPR 2022] OakInk: A Large-scale Knowledge Repository for Understanding Hand-Object Interaction
https://oakink.net
MIT License
94 stars 4 forks source link

Empty array when visualizing some of OakInk-Shape data #2

Closed SupreethN closed 2 years ago

SupreethN commented 2 years ago

I am trying to run viz_oakink_shape.py. But for some categories such as apple with intents [use, hold, liftup, handover] and split train, I get the following error: What are some possible reasons for this? Maybe there is no hand present for grasp?


  File "viz_oakink_shape.py", line 53, in <module>
    main(arg)
  File "viz_oakink_shape.py", line 28, in main
    oi_shape = OakInkShape(category=category, intent_mode=intent, data_split=split)
  File "/home/snarasimhaswamy/OakInk/oikit/oi_shape/oi_shape.py", line 126, in __init__
    batch_hand_shape = torch.from_numpy(np.stack(batch_hand_shape))
  File "<__array_function__ internals>", line 180, in stack
  File "/opt/conda/envs/oakink/lib/python3.8/site-packages/numpy/core/shape_base.py", line 422, in stack
    raise ValueError('need at least one array to stack')
ValueError: need at least one array to stack 
KailinLi commented 2 years ago

Currently, we randomly select 80% of objects for training, 10% for validation, and the rest 10% for testing. The apple category has only one CAD model, the C90001. And unfortunately, this object is randomly assigned to the test set. Therefore, you can not find any grasps of an apple in the train split. You can use OakInkShape(category="apple", data_split="test") or just OakInkShape(category="apple") to visualize the grasps of the apple.

SupreethN commented 2 years ago

Thank you for the quick response!