catgrasp icon indicating copy to clipboard operation
catgrasp copied to clipboard

Where to find NUNOCS training data?

Open camkisailus opened this issue 2 years ago • 1 comments

HI! I am interested in your project! When I clone the repo, I am able to successfully build the code within the Docker container, but when I run python train_nunocs.py no training or validation data is found and error is:

(catgrasp) root@XPS:/home/catgrasp# python train_nunocs.py
    phase=train #self.files=0
    phase=val #self.files=0
    Traceback (most recent call last):
      File "train_nunocs.py", line 38, in <module>
        trainer = TrainerNunocs(cfg)
      File "/home/catgrasp/trainer_nunocs.py", line 31, in __init__
        self.train_loader = torch.utils.data.DataLoader(self.train_data, batch_size=self.cfg['batch_size'], shuffle=True, num_workers=self.cfg['n_workers'], pin_memory=False, drop_last=True,worker_init_fn=worker_init_fn)
      File "/opt/conda/envs/catgrasp/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in __init__
        sampler = RandomSampler(dataset)
      File "/opt/conda/envs/catgrasp/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 94, in __init__
        "value, but got num_samples={}".format(self.num_samples))
    ValueError: num_samples should be a positive integer value, but got num_samples=0

. I followed the instructions to download the data directory from https://archive.cs.rutgers.edu/pracsys/catgrasp/ but still no success. Do I need to download more data? Any help would be greatly appreciated!

In the future I would like to try to train my own NUNOCS Net for different object classes, so learning to train from scratch is necessary

camkisailus avatar Sep 16 '22 14:09 camkisailus

Hi, notice that you got this:

phase=train #self.files=0
phase=val #self.files=0

It means it cannot find the files. Can you make sure it's loading from the directory that you download the data?

wenbowen123 avatar Sep 16 '22 18:09 wenbowen123

I get the same problem。the data place is

Data

  catgrasp
  ├── artifacts
  ├── data
  └── urdf

but the place in config_nunocs.yml is

train_root: "dataset/nut/train_isolated_nunocs"
val_root: "dataset/nut/test_isolated_nunocs"

I don't understand ,did I misread it?

cypacjy avatar Jul 25 '23 02:07 cypacjy

Have you run generate_pile_data.py and tool.py?

tina-1007 avatar Jul 26 '23 08:07 tina-1007

ok,I ignored these manipulation,and started to train the data straightforward.

cypacjy avatar Jul 28 '23 03:07 cypacjy