THU-VCLab / HGGD

Official code of paper "Efficient Heatmap-Guided 6-Dof Grasp Detection in Cluttered Scenes"
MIT License
51 stars 6 forks source link

Hyper-params for getting to work with 480x640 images? #15

Closed gtziafas closed 3 months ago

gtziafas commented 3 months ago

Hey, thanks for releasing the code for the project!

I have one question, what do I need to change if I want to work with 480x640 images?

For now, in order to make them compatible with your framework out-of-the-box, I upscale the images to 720x1280, send them to the point-cloud helper to get the view_points and then call the networks, as you do in your demo.

My issue is that the final grasp predictions are going to be expressed in the upscaled pointcloud coordinates. So if I visualize the pointcloud I get from the resized 720x1280 images I get nice and tight grasps Selection_525 but if I visualize them together with the original resolution pointcloud it is not (obviously).

I tried to manually post-process the translation component of the proposed grasps, e.g. multiplying by 0.5 to fit the resolution change, by still doesnt work.

Is it possible to make your demo.py run for image resolution (480, 640)? Following your implementation at demo.py I did the following changes:

If I run the demo with this setting, I get the following error:

Traceback (most recent call last):
  File "grasp_proposal_test.py", line 353, in <module>
    pred_gg = inference(view_points,
  File "grasp_proposal_test.py", line 149, in inference
    pred_2d, perpoint_features = anchornet(x)
  File "/home/p300488/miniconda3/envs/hggd/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/p300488/6d_grasp_ws/src/hggd_grasp_server/src/inference/models/anchornet.py", line 213, in forward
    x = layer(x + xs[self.depth - i])
RuntimeError: The size of tensor a (29) must match the size of tensor b (30) at non-singleton dimension 3

I assume that maybe there are some other hyper-parameters that need to be modified? Or some other change to make it run for my desired resolution? Please let me know if there is an easy fix for this!! Thank you!

gtziafas commented 3 months ago

nvm, just had to modify the intrinsic parameters in dataset.config.py , thanks again!