Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: Couldn't find function center in BoundingBoxes or BoundingBox #64

Closed
CHB-learner opened this issue May 8, 2023 · 2 comments

Comments

@CHB-learner
Copy link

after

python train_network.py --dataset cornell --dataset-path /home/ubuntu/机械臂入门教程/DATASETS/Cornell_Grasping_Dataset --description training_cornell

root : INFO Beginning Epoch 00
Traceback (most recent call last):
File "/home/ubuntu/机械臂入门教程/robotic-grasping/train_network.py", line 345, in
run()
File "/home/ubuntu/机械臂入门教程/robotic-grasping/train_network.py", line 318, in run
train_results = train(epoch, net, device, train_data, optimizer, args.batches_per_epoch, vis=args.vis)
File "/home/ubuntu/机械臂入门教程/robotic-grasping/train_network.py", line 163, in train
for x, y, _, _, _ in train_data:
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 634, in next
data = self._next_data()
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
return self._process_data(data)
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
data.reraise()
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/_utils.py", line 644, in reraise
raise exception
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/miniconda3/envs/bot_play/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/机械臂入门教程/robotic-grasping/utils/data/grasp_data.py", line 65, in getitem
depth_img = self.get_depth(idx, rot, zoom_factor)
File "/home/ubuntu/机械臂入门教程/robotic-grasping/utils/data/cornell_data.py", line 52, in get_depth
center, left, top = self._get_crop_attrs(idx)
File "/home/ubuntu/机械臂入门教程/robotic-grasping/utils/data/cornell_data.py", line 37, in _get_crop_attrs
center = gtbbs.center
File "/home/ubuntu/机械臂入门教程/robotic-grasping/utils/dataset_processing/grasp.py", line 43, in getattr
raise AttributeError("Couldn't find function %s in BoundingBoxes or BoundingBox" % attr)
AttributeError: Couldn't find function center in BoundingBoxes or BoundingBox

@destroy314
Copy link

I have encountered this before, I think it may be caused by the too-high version of python or some packages, and the problem was solved after configuring the environment using the command below.
#57 (comment)

@zhenjing
Copy link

zhenjing commented Jun 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants