ethz-asl / vgn

Real-time 6 DOF grasp detection in clutter.
BSD 3-Clause "New" or "Revised" License
257 stars 55 forks source link

Negative voxel index triggered error when training #2

Closed Steve-Tod closed 4 years ago

Steve-Tod commented 4 years ago

Hi, I constructed the dataset using the following commands: mpirun -np 16 python scripts/generate_data.py --scene pile data/data_blocks_raw python scripts/construct_dataset.py data/data_blocks_raw data/data_blocks

Then I train the network with: python scripts/train_vgn.py --dataset data/data_blocks. After one step, I got an error: image

I use pdb to debug and found that the error is caused by the negative index in the select function. The index here is the voxel coordinates.

Then I iterate through the data with the scripts in data.ipynb. And I found a few data points have negative coordinates after the round operation (-1 and -2).

Apart from ignoring these data, how can I modify the code to avoid this happening during the dataset generation?

mbreyer commented 4 years ago

I wrote a Jupyter notebook to balance and clean the data, which gets rid of this problem. Otherwise, one could of course already skip those points inside the data collection script.

Steve-Tod commented 4 years ago

Got it, thanks!