GithubHelp home page GithubHelp logo

Debug problem about 6-pack HOT 5 CLOSED

j96w avatar j96w commented on July 1, 2024
Debug problem

from 6-pack.

Comments (5)

j96w avatar j96w commented on July 1, 2024

Hi, please refer to Issue#3. No error is because your program is halted by the "try-except" code in the dataloader. You can remove it during the debugging mode.

from 6-pack.

sunshantong avatar sunshantong commented on July 1, 2024

Hi, please refer to Issue#3. No error is because your program is halted by the "try-except" code in the dataloader. You can remove it during the debugging mode.

Thanks!

from 6-pack.

Sxy-17 avatar Sxy-17 commented on July 1, 2024

@sunshantong May I ask if you have solved this problem? I met the same problem as yours, and after commenting out the try-except, the following errors appear:

6-PACK-master/libs/transformations.py:1912: UserWarning: failed to import module _transformations
  warnings.warn('failed to import module %s' % name)
1 1349b2169a97a0ff54e1b6f41fdd78a
1 9b9a4bb5550f00ea586350d6e78ecc7
1 991d9df5bf2a33a1c9292f26f73f6538
1 2fa757f584a3be31a7ceedb2540a32b0
........
5 laptop_alienware_norm
5 laptop_mac_pro_norm
6 mug_daniel_norm
6 mug_anastasia_norm
6 mug_brown_starbucks_norm
/home/xxxx/.local/lib/python3.6/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead.
  warnings.warn(warning.format(ret))
Traceback (most recent call last):
  File "train.py", line 57, in <module>
    for i, data in enumerate(dataloader, 0):
  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in __next__
    return self._process_next_batch(batch)
  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
KeyError: 'Traceback (most recent call last):\n  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in <listcomp>\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/media/xxxx/921c3f71-709a-4be3-a7fe-e43d2bd2b602/home/xxxx/6-PACK-master/dataset/dataset_nocs.py", line 435, in __getitem__\n    choose_obj = random.sample(self.obj_name_list[self.cate_id], 1)[0]\nKeyError: 0\n'

@j96w
I am new here, so I would be very appreciated if you have any suggestions on this error, or on how to debug dataloader!! Thanks in advance!

from 6-pack.

sunshantong avatar sunshantong commented on July 1, 2024

@sunshantong May I ask if you have solved this problem? I met the same problem as yours, and after commenting out the try-except, the following errors appear:

6-PACK-master/libs/transformations.py:1912: UserWarning: failed to import module _transformations
  warnings.warn('failed to import module %s' % name)
1 1349b2169a97a0ff54e1b6f41fdd78a
1 9b9a4bb5550f00ea586350d6e78ecc7
1 991d9df5bf2a33a1c9292f26f73f6538
1 2fa757f584a3be31a7ceedb2540a32b0
........
5 laptop_alienware_norm
5 laptop_mac_pro_norm
6 mug_daniel_norm
6 mug_anastasia_norm
6 mug_brown_starbucks_norm
/home/xxxx/.local/lib/python3.6/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead.
  warnings.warn(warning.format(ret))
Traceback (most recent call last):
  File "train.py", line 57, in <module>
    for i, data in enumerate(dataloader, 0):
  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in __next__
    return self._process_next_batch(batch)
  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
KeyError: 'Traceback (most recent call last):\n  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in <listcomp>\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/media/xxxx/921c3f71-709a-4be3-a7fe-e43d2bd2b602/home/xxxx/6-PACK-master/dataset/dataset_nocs.py", line 435, in __getitem__\n    choose_obj = random.sample(self.obj_name_list[self.cate_id], 1)[0]\nKeyError: 0\n'

@j96w
I am new here, so I would be very appreciated if you have any suggestions on this error, or on how to debug dataloader!! Thanks in advance!

I remember it was caused by the bbox path. Try Changing bbox_path = (image_path + 'bbox.txt').replace(image_dir,pose_dir) to bbox_path = (image_path + 'bbox.txt') in data_preprocess.py line 70. But I'm not sure it's going to work for the new version of the code. Hope this can help you.

from 6-pack.

Sxy-17 avatar Sxy-17 commented on July 1, 2024

@sunshantong May I ask if you have solved this problem? I met the same problem as yours, and after commenting out the try-except, the following errors appear:

6-PACK-master/libs/transformations.py:1912: UserWarning: failed to import module _transformations
  warnings.warn('failed to import module %s' % name)
1 1349b2169a97a0ff54e1b6f41fdd78a
1 9b9a4bb5550f00ea586350d6e78ecc7
1 991d9df5bf2a33a1c9292f26f73f6538
1 2fa757f584a3be31a7ceedb2540a32b0
........
5 laptop_alienware_norm
5 laptop_mac_pro_norm
6 mug_daniel_norm
6 mug_anastasia_norm
6 mug_brown_starbucks_norm
/home/xxxx/.local/lib/python3.6/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead.
  warnings.warn(warning.format(ret))
Traceback (most recent call last):
  File "train.py", line 57, in <module>
    for i, data in enumerate(dataloader, 0):
  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in __next__
    return self._process_next_batch(batch)
  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
KeyError: 'Traceback (most recent call last):\n  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/home/xxxx/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in <listcomp>\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/media/xxxx/921c3f71-709a-4be3-a7fe-e43d2bd2b602/home/xxxx/6-PACK-master/dataset/dataset_nocs.py", line 435, in __getitem__\n    choose_obj = random.sample(self.obj_name_list[self.cate_id], 1)[0]\nKeyError: 0\n'

@j96w
I am new here, so I would be very appreciated if you have any suggestions on this error, or on how to debug dataloader!! Thanks in advance!

I remember it was caused by the bbox path. Try Changing bbox_path = (image_path + 'bbox.txt').replace(image_dir,pose_dir) to bbox_path = (image_path + 'bbox.txt') in data_preprocess.py line 70. But I'm not sure it's going to work for the new version of the code. Hope this can help you.

It seems not caused by the path of bbox, but thanks for your answer anyway~

from 6-pack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.