Fsoft-AIC / LGD

Dataset and Code for CVPR 2024 paper "Language-driven Grasp Detection."
https://airvlab.github.io/grasp-anything/
MIT License
22 stars 2 forks source link

About run_offline.py #9

Open LogSSim opened 1 week ago

LogSSim commented 1 week ago

I ran the run_offline.py file. However, I found that several parameters were missing in the model input. File "/data3/urs/code/LGD/run_offline.py", line 64, in pred = net.predict(xc) File "/data3/urs/code/LGD/inference/models/grasp_model.py", line 87, in predict pos_pred, cos_pred, sin_pred, width_pred = self(xc) File "/home/urs/ENTER/envs/lgd/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/home/urs/ENTER/envs/lgd/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl return forward_call(args, **kwargs) TypeError: forward() missing 5 required positional arguments: 'img', 't', 'query', 'alpha', and 'idx'

andvg3 commented 1 week ago

Hi,

At the moment, we do not provide the offline inference as you mentioned. The code was taken from the previous paper without updating. Please keep in mind that you have to pass text, image for the parameters of the forward pass of LGD.

Sorry for inconvenience. We will discuss in the future about the possibility of releasing offline inference.

Best regards, An Vuong

LogSSim commented 1 week ago

@andvg3 ok, Thanks. So if I want to test on the RLbench dataset. What should I do?

andvg3 commented 6 days ago

Hi, you can check the evaluation script and write a custom RLBench dataset loader. You can refer to evaluation script:

$ python evaluate.py --dataset grasp-anywhere --dataset-path data/grasp-anything --add-file-path data/grasp-anything++/seen --iou-eval --seen 0 --use-depth 0 --network <path_to_pretrained_network>

To inference at simulation level, you can inject the LGD code and pass required parameters, including: text (img), image (query). For the rest of the parameters, you can use the parameters by our dataset.

Please let me know if you need any assistance.

Best regards, An