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

errors when training pointsup #4971

Open
yejr0229 opened this issue May 24, 2023 · 5 comments
Open

errors when training pointsup #4971

yejr0229 opened this issue May 24, 2023 · 5 comments

Comments

@yejr0229
Copy link

when I use this scrip "python train_net.py --config-file configs/mask_rcnn_R_50_FPN_3x_point_sup_point_aug_coco.yaml --num-gpus 2" to train pointsup,I use 2 3090gpus,then I encountered this error,I use '1.8.0+cu111'

@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label May 24, 2023
@github-actions
Copy link

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template.
The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

@yejr0229
Copy link
Author

there is the whole error:

Traceback (most recent call last):
File "train_net.py", line 115, in
args=(args,),
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/launch.py", line 79, in launch
daemon=False,
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes
while not context.join():
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 150, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 1 terminated with the following error:
Traceback (most recent call last):
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap
fn(i, *args)
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/launch.py", line 126, in _distributed_worker
main_func(*args)
File "/home/usr/detectron2/projects/PointSup/train_net.py", line 103, in main
return trainer.train()
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 484, in train
super().train(self.start_iter, self.max_iter)
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/train_loop.py", line 149, in train
self.run_step()
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 494, in run_step
self._trainer.run_step()
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/train_loop.py", line 267, in run_step
data = next(self._data_loader_iter)
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/common.py", line 234, in iter
for d in self.dataset:
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in next
data = self._next_data()
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/common.py", line 201, in iter
yield self.dataset[idx]
File "/home/usr/miniconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/common.py", line 90, in getitem
data = self._map_func(self._dataset[cur_idx])
File "/home/usr/detectron2/projects/PointSup/point_sup/dataset_mapper.py", line 115, in call
for obj in dataset_dict.pop("annotations")
File "/home/usr/detectron2/projects/PointSup/point_sup/dataset_mapper.py", line 116, in
if obj.get("iscrowd", 0) == 0
File "/home/usr/detectron2/projects/PointSup/point_sup/detection_utils.py", line 86, in transform_instance_annotations
annotation, transforms, image_size, keypoint_hflip_indices
TypeError: transform_instance_annotations() takes 3 positional arguments but 4 were given

@github-actions github-actions bot removed the needs-more-info More info is needed to complete the issue label May 24, 2023
@yejr0229
Copy link
Author

I use this scrip "python train_net.py --config-file configs/mask_rcnn_R_50_FPN_3x_point_sup_point_aug_coco.yaml --num-gpus 2" to train pointsup,I use 2 3090gpus,then I encountered this error,I use '1.8.0+cu111'

@zqy1
Copy link

zqy1 commented Nov 7, 2024

I'm having the same problem.

@Khola-naseem
Copy link

I resolved this issue by passing keypoint_hflip_indices as a keyword argument line 85 in point_sup/detection_utils.py file
Replace this
annotation = base_transform_instance_annotations(annotation, transforms, image_size, keypoint_hflip_indices)
with this:
annotation = base_transform_instance_annotations( annotation, transforms, image_size, keypoint_hflip_indices=keypoint_hflip_indices)

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