graspnet/graspnetAPI

How to generate a GraspGroup for evaluation

Junyu-Zhu opened this issue · 5 comments

Hi, first thank you for the excellent work. I've read the graspAPI doc, it is good with so many detailed expressions and codes. But at evaluation part, I need to prepare my own data and generate a GraspGroup. Does it mean I need to generate dataset according to the format descriped in API doc by my own camera? like 255 npy to each 189 scences. Or do I missed parts about transforming your dataset to evaluation GraspGroup format descriped in API doc. If not, can you give me some explanations to generate the so called GraspGroup for evaluation. Thanks a lot.

Hi, do you mean that you trained a network and want to evaluate it? What does the "prepare my own data and generate a GraspGroup" mean?

It's about the API document at 4.7 Evaluation part. At 4.7.1 Data Preparation, it tells "The first step of evaluation is to prepare your own data. You need to run your code and generate a GraspGroup for each image in each scene. Then call the save_npy function of GraspGroup to dump the results." And my question is, what shoule be included in so called "my own data" and is this for evaluating trained network?

I see, it means to prepare the network's results.
To generate a GraspGroup and save it, you can directly input a 2D numpy array for the GraspGroup class:

gg=GraspGroup(np.array([ [score_1, width_1, height_1, depth_1, rotation_matrix_1(9), translation_1(3), object_id_1],
        [score_2, width_2, height_2, depth_2, rotation_matrix_2(9), translation_2(3), object_id_2],
        ...,
        [score_N, width_N, height_N, depth_N, rotation_matrix_N(9), translation_N(3), object_id_N] ]))
gg.save_npy(save_path)

, where your algorithm predicts N grasp poses for an image.

For the object_id, you can simply input 0. For the meaning of other entries, you should refer to the doc for Grasp Label Format-API Loaded Labels

Thank you for your reply, I will have a try.