Git Product home page Git Product logo

Comments (5)

joe-siyuan-qiao avatar joe-siyuan-qiao commented on August 31, 2024

It will be included in http://images.cocodataset.org/annotations/annotations_trainval2017.zip from http://cocodataset.org/#download. Please also take a look at https://github.com/joe-siyuan-qiao/DetectoRS/tree/master/configs/htc to prepare the dataset.

from detectors.

EnternalTwinkle avatar EnternalTwinkle commented on August 31, 2024

hey man, have you solved the above problem? I also encountered a similar problem. So I want to ask you how to prepare seg_prefix=data_root + 'annotations/stuff_train2017_pixelmaps/'. Although I have referred https://github.com/joe-siyuan-qiao/DetectoRS/tree/master/configs/htc. I still cant figure it out.

from detectors.

rose-jinyang avatar rose-jinyang commented on August 31, 2024

Hi
I met the same issue.

Traceback (most recent call last):
File "tools/train.py", line 142, in
main()
File "tools/train.py", line 138, in main
meta=meta)
File "/mnt/Jin/DetectoRS/mmdet/apis/train.py", line 102, in train_detector
meta=meta)
File "/mnt/Jin/DetectoRS/mmdet/apis/train.py", line 181, in _dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/mmcv/runner/runner.py", line 359, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/mmcv/runner/runner.py", line 263, in train
self.model, data_batch, train_mode=True, **kwargs)
File "/mnt/Jin/DetectoRS/mmdet/apis/train.py", line 75, in batch_processor
losses = model(**data)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/parallel/distributed.py", line 447, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/mnt/Jin/DetectoRS/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(*args, **kwargs)
File "/mnt/Jin/DetectoRS/mmdet/models/detectors/base.py", line 147, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/mnt/Jin/DetectoRS/mmdet/models/detectors/htc.py", line 230, in forward_train
loss_seg = self.semantic_head.loss(semantic_pred, gt_semantic_seg)
File "/mnt/Jin/DetectoRS/mmdet/core/fp16/decorators.py", line 127, in new_func
return old_func(*args, **kwargs)
File "/mnt/Jin/DetectoRS/mmdet/models/mask_heads/fused_semantic_head.py", line 104, in loss
loss_semantic_seg = self.criterion(mask_pred, labels)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 916, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/functional.py", line 2021, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/functional.py", line 1840, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: 1only batches of spatial targets supported (non-empty 3D tensors) but got targets of size: : [1, 84, 124, 3]

I used default config file "DetectoRS_mstrain_400_1200_x101_32x4d_40e.py" and COCO 2017 dataset.
I tried to
Please let me know the reason asap.
Thanks

from detectors.

dsnqr avatar dsnqr commented on August 31, 2024

I alse used default config file ‘’DetectoRS_mstrain_400_1200_r50_40e.py
and COCO 2017 dataset,encountered the same problem as you.Has the problem been solved later? Can you let me know?

Traceback (most recent call last):
File "tools/train.py", line 143, in
main()
File "tools/train.py", line 139, in main
meta=meta)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/apis/train.py", line 111, in train_detector
meta=meta)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/apis/train.py", line 242, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmcv/runner/runner.py", line 384, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmcv/runner/runner.py", line 283, in train
self.model, data_batch, train_mode=True, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/apis/train.py", line 75, in batch_processor
losses = model(**data)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(*args, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/models/detectors/base.py", line 147, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/models/detectors/htc.py", line 230, in forward_train
loss_seg = self.semantic_head.loss(semantic_pred, gt_semantic_seg)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/core/fp16/decorators.py", line 127, in new_func
return old_func(*args, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/mmdet-1.1.0+612916b-py3.7-linux-x86_64.egg/mmdet/models/mask_heads/fused_semantic_head.py", line 104, in loss
loss_semantic_seg = self.criterion(mask_pred, labels)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 916, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/functional.py", line 2021, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/qh/.conda/envs/mm1/lib/python3.7/site-packages/torch/nn/functional.py", line 1840, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: 1only batches of spatial targets supported (non-empty 3D tensors) but got targets of size: : [1, 52, 64, 3]

Thank you very much.

from detectors.

dsnqr avatar dsnqr commented on August 31, 2024

hey man, have you solved the above problem? I also encountered a similar problem. So I want to ask you how to prepare seg_prefix=data_root + 'annotations/stuff_train2017_pixelmaps/'. Although I have referred https://github.com/joe-siyuan-qiao/DetectoRS/tree/master/configs/htc. I still cant figure it out.

How did you solve this problem later? Looking forward to your reply! @EnternalTwinkle

from detectors.

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.