liwentomng / orientedreppoints Goto Github PK
View Code? Open in Web Editor NEWThe code for “Oriented RepPoints for Aerial Object Detection (CVPR 2022)”
The code for “Oriented RepPoints for Aerial Object Detection (CVPR 2022)”
在训练时一个epoch没有跑完就会出现计算giou的错误,但是检查了下数据集应该没有问题。在有的数据集会出现这种问题,在大部分数据集上都能正常训练,请问这可能是什么原因呢?应该怎么解决呢?谢谢~
Traceback (most recent call last):
File "tools/train.py", line 154, in <module>
main()
File "tools/train.py", line 150, in main
meta=meta)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/apis/train.py", line 112, in train_detector
meta=meta)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/apis/train.py", line 245, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/mmcv/runner/runner.py", line 373, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/mmcv/runner/runner.py", line 275, in train
self.model, data_batch, train_mode=True, **kwargs)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/apis/train.py", line 75, in batch_processor
losses = model(**data)
File "/home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(*args, **kwargs)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/models/detectors/base.py", line 147, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/models/detectors/orientedreppoints_detector.py", line 36, in forward_train
*loss_inputs, gt_rbboxes_ignore=gt_rbboxes_ignore)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 465, in loss
rbox_weights_list_refine, pos_inds_list_refine)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/core/utils/misc.py", line 24, in multi_apply
return tuple(map(list, zip(*map_results)))
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 567, in points_quality_assessment
reduction_override='none')
File "/home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/models/losses/iou_loss.py", line 134, in forward
self.loss_weight)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/models/losses/iou_loss.py", line 78, in forward
convex_gious, grad = convex_giou(pred, target)
File "/home/f523/guazai/sdb/zhoujunfeng/OrientedRepPoints-main/mmdet/ops/iou/iou_wrapper.py", line 13, in convex_giou
convex_giou_grad = convex_giou_cuda.convex_giou(pred, target)
RuntimeError: cuda runtime error (700) : an illegal memory access was encountered at mmdet/ops/iou/src/convex_giou_kernel.cu:856
terminate called after throwing an instance of 'c10::Error'
what(): CUDA error: an illegal memory access was encountered (insert_events at /opt/conda/conda-bld/pytorch_1573049304260/work/c10/cuda/CUDACachingAllocator.cpp:569)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7f3b4d9a5687 in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0x17044 (0x7f3b4dbe1044 in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libc10_cuda.so)
frame #2: <unknown function> + 0x1cccb (0x7f3b4dbe6ccb in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libc10_cuda.so)
frame #3: c10::TensorImpl::release_resources() + 0x4d (0x7f3b4d992e9d in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #4: <unknown function> + 0x1c86c9 (0x7f3b4eb2d6c9 in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #5: <unknown function> + 0x4aff6b (0x7f3b4ee14f6b in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #6: <unknown function> + 0x4affa6 (0x7f3b4ee14fa6 in /home/f523/anaconda3/envs/redet/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
<omitting python frames>
frame #26: __libc_start_main + 0xf0 (0x7f3b53406840 in /lib/x86_64-linux-gnu/libc.so.6)
已放弃 (核心已转储)
Hi @LiWentomng , thanks for your execellent work!
In orientedreppoints_head.py, line 371 to line 381 seems to compute proposals to get targets of refine stage. But the computation of proposals are different from the funtion offset_to_pts(). More specifically, offset_to_pts() use pts_shift as yx_pts_shift, but line 371 to line 381 in orientedreppoints_head.py uses points_shift as xy_pts_shift.
Consequently, pts_preds_init is used differently in forward() and loss() and this may lead to some unpredicted results. Did I misunderstand your code? It's really confused, hope to get your respond soon!
可以对视频进行推理嘛
ImportError: cannot import name 'deform_conv_cuda' from 'mmdet.ops.dcn' ,请问这个错误是怎么回事,求解决,谢谢
from mmrotate.ops.chamfer_2d import chamfer_2d
File "/home/gs/anaconda3/envs/torch/lib/python3.7/site-packages/mmrotate/ops/chamfer_2d/init.py", line 1, in
from .dist_chamfer_2d import chamfer_2d
File "/home/gs/anaconda3/envs/torch/lib/python3.7/site-packages/mmrotate/ops/chamfer_2d/dist_chamfer_2d.py", line 5, in
from . import chamfer_2d
ImportError: cannot import name 'chamfer_2d' from 'mmrotate.ops.chamfer_2d' (/home/gs/anaconda3/envs/torch/lib/python3.7/site-packages/mmrotate/ops/chamfer_2d/init.py)
请问这个from . import chamfer_2d是从哪里导入的,跟源码不太一样。以及我这个报错有什么解决方法吗?
how to add reppoints to output result (detection box) ? as Figure 1 in paper
如何在检查结果里加入预测的点集,就像文章里图1(b)的检查结果
您好,请问可以提供一下swin_tiny的pytorch为1.4版本的预训练模型吗,现在网上所支持的pytorch版本都太高了,找不到相应的预训练模型。谢谢!
I have splited my DOTA dataset by using prepare_dota1_ms.py,then i tried to test OrientedRepPoints.
But something doesnot work,can you help me?
root@train-orientedreppoints-0:/data1/OrientedRepPoints# python tools/test.py configs/dota/orientedrepoints_r50_demo.py work_dirs/orientedreppoints_r50_demo/epoch_40.pth --out work_dirs/orientedreppoints_r50_demo/results.pkl
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
[ ] 0/4, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/test.py", line 170, in
main()
File "tools/test.py", line 148, in main
outputs = single_gpu_test(model, data_loader, args.show)
File "/data1/OrientedRepPoints/mmdet/apis/test.py", line 19, in single_gpu_test
result = model(return_loss=False, rescale=not show, **data)
File "/usr/local/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/usr/local/miniconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(*inputs[0], **kwargs[0])
File "/usr/local/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data1/OrientedRepPoints/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(*args, **kwargs)
File "/data1/OrientedRepPoints/mmdet/models/detectors/base.py", line 149, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/data1/OrientedRepPoints/mmdet/models/detectors/base.py", line 130, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/data1/OrientedRepPoints/mmdet/models/detectors/orientedreppoints_detector.py", line 38, in simple_test
bbox_list = self.bbox_head.get_bboxes(*bbox_inputs)
File "/data1/OrientedRepPoints/mmdet/models/anchor_heads/orientedreppoints_head.py", line 644, in get_bboxes
scale_factor, cfg, rescale, nms)
File "/data1/OrientedRepPoints/mmdet/models/anchor_heads/orientedreppoints_head.py", line 717, in get_bboxes_single
cfg.max_per_img, multi_reppoints=mlvl_reppoints if self.show_points else None)
File "/usr/local/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in getattr
type(self).name, name))
AttributeError: 'OrientedRepPointsHead' object has no attribute 'show_points'
Hello, I'm testing your code on Ascend NPU devices. The GIoU Loss in your reports contains several cuda ops from mmcv. What about the implementation of the pure torch-based GIoU Loss ?
如何将边界框坐标(x1,y1,x2,y2,x3,y3,x4,y4)转换成(x,y,w,h,theta)的形式。请问作者有具体的代码实现吗?
Hello author, I used mmrotate for training and testing. https://github.com/open-mmlab/mmrotateI encountered some issues with the test results, as shown in the figure below, where there are some regression boxes that do not fully enclose the target. I wanted to ask if you also encountered similar issues during your experiments, or if there were any mistakes I made during training.
Enviroment:ubuntu18.04
python 3.8
cuda 11.1
torch 1.9.1
mmcv 1.7.1
mmrotate 0.3.4
想请教一下论文中关于质量评估度量Q的计算,在代码中具体是在哪个py文件里
2022-07-08 10:56:37,311 - mmdet - INFO - load model from: work_dirs/swin_tiny_patch4_window7_224_torch1_4.pth
2022-07-08 10:56:37,507 - mmdet - WARNING - The model and loaded state dict do not match exactly
unexpected key in source state_dict: norm.weight, norm.bias, head.weight, head.bias, layers.0.blocks.1.attn_mask, layers.1.blocks.1.attn_mask, layers.2.blocks.1.attn_mask, layers.2.blocks.3.attn_mask, layers.2.blocks.5.attn_mask
missing keys in source state_dict: norm1.weight, norm1.bias, norm2.weight, norm2.bias, norm3.weight, norm3.bias
加载该预训练模型不完全匹配 且精度为76.2%达不到论文里的77.6% 请问一下是啥问题吗
谢谢!
Traceback (most recent call last):
File "tools/train.py", line 154, in
main()
File "tools/train.py", line 127, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 43, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in init
pretrained)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/single_stage.py", line 28, in init
self.bbox_head = builder.build_head(bbox_head)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 35, in build_head
return build(cfg, HEADS)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 89, in init
self._init_layers()
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 120, in init_layers
self.reppoints_cls_out = nn.Conv2d(self.point_feat_channels, self.cls_out_channels, 1, 1, 0)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 332, in init
False, pair(0), groups, bias, padding_mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 46, in init
self.reset_parameters()
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 49, in reset_parameters
init.kaiming_uniform(self.weight, a=math.sqrt(5))
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 310, in kaiming_uniform
fan = _calculate_correct_fan(tensor, mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 279, in _calculate_correct_fan
fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 210, in _calculate_fan_in_and_fan_out
if tensor[0][0].numel() > 2:
IndexError: index 0 is out of bounds for dimension 0 with size 0
Traceback (most recent call last):
File "tools/train.py", line 154, in
main()
File "tools/train.py", line 127, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 43, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in init
pretrained)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/single_stage.py", line 28, in init
self.bbox_head = builder.build_head(bbox_head)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 35, in build_head
return build(cfg, HEADS)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 89, in init
self._init_layers()
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 120, in init_layers
self.reppoints_cls_out = nn.Conv2d(self.point_feat_channels, self.cls_out_channels, 1, 1, 0)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 332, in init
False, pair(0), groups, bias, padding_mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 46, in init
self.reset_parameters()
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 49, in reset_parameters
init.kaiming_uniform(self.weight, a=math.sqrt(5))
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 310, in kaiming_uniform
fan = _calculate_correct_fan(tensor, mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 279, in _calculate_correct_fan
fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 210, in _calculate_fan_in_and_fan_out
if tensor[0][0].numel() > 2:
IndexError: index 0 is out of bounds for dimension 0 with size 0
Traceback (most recent call last):
File "tools/train.py", line 154, in
main()
File "tools/train.py", line 127, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 43, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in init
pretrained)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/single_stage.py", line 28, in init
self.bbox_head = builder.build_head(bbox_head)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 35, in build_head
return build(cfg, HEADS)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 89, in init
self._init_layers()
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 120, in init_layers
self.reppoints_cls_out = nn.Conv2d(self.point_feat_channels, self.cls_out_channels, 1, 1, 0)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 332, in init
False, pair(0), groups, bias, padding_mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 46, in init
self.reset_parameters()
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 49, in reset_parameters
init.kaiming_uniform(self.weight, a=math.sqrt(5))
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 310, in kaiming_uniform
fan = _calculate_correct_fan(tensor, mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 279, in _calculate_correct_fan
fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 210, in _calculate_fan_in_and_fan_out
if tensor[0][0].numel() > 2:
IndexError: index 0 is out of bounds for dimension 0 with size 0
Traceback (most recent call last):
File "tools/train.py", line 154, in
main()
File "tools/train.py", line 127, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 43, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in init
pretrained)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/detectors/single_stage.py", line 28, in init
self.bbox_head = builder.build_head(bbox_head)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 35, in build_head
return build(cfg, HEADS)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(**args)
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 89, in init
self._init_layers()
File "/media/wit-ai515-1080ti-02/data-6T/lxj/OrientedRepPoints-main/mmdet/models/anchor_heads/orientedreppoints_head.py", line 120, in init_layers
self.reppoints_cls_out = nn.Conv2d(self.point_feat_channels, self.cls_out_channels, 1, 1, 0)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 332, in init
False, pair(0), groups, bias, padding_mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 46, in init
self.reset_parameters()
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 49, in reset_parameters
init.kaiming_uniform(self.weight, a=math.sqrt(5))
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 310, in kaiming_uniform
fan = _calculate_correct_fan(tensor, mode)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 279, in _calculate_correct_fan
fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/nn/init.py", line 210, in _calculate_fan_in_and_fan_out
if tensor[0][0].numel() > 2:
IndexError: index 0 is out of bounds for dimension 0 with size 0
Traceback (most recent call last):
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/distributed/launch.py", line 263, in
main()
File "/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/lib/python3.7/site-packages/torch/distributed/launch.py", line 259, in main
cmd=cmd)
subprocess.CalledProcessError: Command '['/home/wit-ai515-1080ti-02/.conda/envs/orientedreppoints/bin/python', '-u', 'tools/train.py', '--local_rank=3', 'configs/dota/orientedrepoints_r50_demo.py', '--launcher', 'pytorch']' returned non-zero exit status 1.
Hi, thanks for the interesting work. I am interested in the detailed training setting on the DIOR-R dataset, I wonder if multi-scale training is used in this dataset to get the reported performance?
How to solve 'RuntimeError: cuda runtime error (700) : an illegal memory access was encountered at mmdet/ops/iou/src/convex_giou_kernel.cu:853' ?Thanks alot
您好。我们也遇到旋转框定位不准的问题了。想请问下r-50的运行速度如何呢
感谢!!!
你好,论文中在训练时oriented conversion function使用ConvexHull,但是我在代码里面并未看到(可能是我忽略了),请问这个代码在哪
'gcc' is not recognized as an internal or external command,
operable program or batch file.
E:\anaconda\envs\orientedreppoints\lib\site-packages\mmcv_init_.py:21: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
'On January 1, 2023, MMCV will release v2.0.0, in which it will remove '
Traceback (most recent call last):
File "tools/train.py", line 154, in
main()
File "tools/train.py", line 106, in main
env_info_dict = collect_env()
File "f:\orientedreppoints\mmdet\utils\collect_env.py", line 42, in collect_env
gcc = subprocess.check_output('gcc --version | head -n1', shell=True)
File "E:\anaconda\envs\orientedreppoints\lib\subprocess.py", line 411, in check_output
**kwargs).stdout
File "E:\anaconda\envs\orientedreppoints\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'gcc --version | head -n1' returned non-zero exit status 255.
File "/home/chenguhua/compete/OrientedRepPoints/mmdet/ops/dcn/deform_conv.py", line 87, in backward
deform_conv_cuda.deform_conv_backward_parameters_cuda(
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
作者您好,您遇到过这个问题么?请问怎么解决呢?
多有打扰,敬请谅解,谢谢您。
Thank you for your code, I'm learning how to use it, but I've had some problems and hope to get your help.
config: orientedreppoints_r50_demo.py
changes:
img_per_gpu=2 -> img_per_gpu=4
workers_per_gpu=2 -> workers_per_gpu=4
lr=0.01 -> lr=0.005
environment: 2 gpu(Tesla P40)
about mAP on val: 70.84.
classaps:[89.43 73.79 40.19 66.33 73.53 82.06 88.16 90.86 60.59 86.46 65.51 64.86 71.29 57.60 51.94 ]
my question: I use your checkpoints(form trainval-dataset) to detect dota-val-dataset and the mAP is about 82.
But the mAP 70.84(checkpoints form train-dota-dataset, test on val) feels lower than I expected(73 ~ 75). Is this normal?
mmrotate官方中R50+FPN的dotav1的map只有71.94,使用了ms增强之后的才只有75.21,论文中R50+FPN为75.97,请问这是经过ms增强后得到的map吗
只能用mmdet1.1版本么
请问加入没有标签的图片进行训练会不会有效果?
3090配置到setup.py出现‘RuntimeError: Error compiling objects for extension’;
pytorch版本:torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0
其他需要安装的包安装无误
请问是因为torch版本的问题吗?还是其他原因呢?
How to parse the results.pkl to the format needed for DOTA evaluation (Class AP and mAP )? Looking forward for your reply, thanks
I tried to train a swin-tiny detector, but I have got errors. If it is possible, could you please provide the corresponding environment for swin-tiny training. Thanks!
2022-11-24 15:54:27,351 - mmdet - INFO - load model from: pretrained/swin_tiny_patch4_window7_224.pth Traceback (most recent call last): File "tools/train.py", line 154, in <module> main() File "tools/train.py", line 127, in main cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) File "/home/zhangyt/OrientedRepPoints/mmdet/models/builder.py", line 43, in build_detector return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/home/zhangyt/OrientedRepPoints/mmdet/models/builder.py", line 15, in build return build_from_cfg(cfg, registry, default_args) File "/home/zhangyt/OrientedRepPoints/mmdet/utils/registry.py", line 79, in build_from_cfg return obj_cls(**args) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in __init__ pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/single_stage.py", line 31, in __init__ self.init_weights(pretrained=pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/single_stage.py", line 35, in init_weights self.backbone.init_weights(pretrained=pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/backbones/swin_transformer.py", line 595, in init_weights load_checkpoint(self, pretrained, strict=False, logger=logger) File "/home/zhangyt/OrientedRepPoints/mmcv_custom/checkpoint.py", line 306, in load_checkpoint checkpoint = _load_checkpoint(filename, map_location) File "/home/zhangyt/OrientedRepPoints/mmcv_custom/checkpoint.py", line 282, in _load_checkpoint checkpoint = torch.load(filename, map_location=map_location) File "/home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "/home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/serialization.py", line 224, in __init__ super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /opt/conda/conda-bld/pytorch_1579022060824/work/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. A$tempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /opt/conda/conda-bld/pytorch_1579022060824/work/caffe2/serialize/inline_container.cc:132) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7efc0602d627 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7efc0a8fe9ab in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7efc0a8ffbc4 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #3: <unknown function> + 0x6d2146 (0x7efc3855e146 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #4: <unknown function> + 0x28ba06 (0x7efc38117a06 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch_python.so) <omitting python frames> frame #6: python() [0x4d4352] frame #8: python() [0x4d0e59] frame #10: python() [0x4ba1a9] frame #14: python() [0x4d0c7e] frame #16: python() [0x4ba1a9] frame #20: python() [0x4ba06f] frame #24: python() [0x4ba06f] frame #28: python() [0x4ba06f] frame #32: python() [0x4ba06f] frame #36: python() [0x4ba06f] frame #40: python() [0x4ba06f] frame #44: python() [0x4d0c7e] frame #45: python() [0x4bbe28] frame #50: python() [0x4ba06f] frame #54: python() [0x4ba06f] frame #58: python() [0x4ba06f] frame #61: python() [0x4ba06f]
是类似yolo的(batch_size, num_object,x_center,y_center,wide,height,obj_conf,category_conf0.....)的嘛,或者能告诉我怎么从代码中查看嘛?只找到了他写入pkl文件中的输出格式list[num_epoch/batch_size * list[batch_size * list[num_classes * array(n, [18, 8, score])]][0] ],之后解析pkl文件后得到每个类的分数和旋转框的四个点坐标
请问作者有相关博客仔细介绍一下这一部分吗?我有点没搞懂具体流程,大致流程论文里讲的比较清楚:
point assigner先分配初始正样本点 -> 先进行一次梯度不更新的前向传播计算这些正样本的分类loss + 定位loss + 方向loss -> 再根据这些loss值从小到大排序取topk,其余的质量太低重新标为负样本 -> 重采样后的正样本点正常进行训练
但是配置文件中point assigner每个gt分配一个初始正样本点,后续的topk再怎么取也是1吧,岂不是重采样没有作用?
然后我debug的时候,训练初期gt可能为10,num_total_pos_init可能为9(这个我明白,物体挨得比较紧的话,后面的gt会把前面的gt匹配到的正样本覆盖掉),重采样后的num_pos可能为9.
训练后期,gt可能为10,num_total_pos_init为9,num_pos可能为50,这个重采样后的正样本数量是怎么升上去的?
希望作者能帮忙解惑
您好,dota数据集划分使用您提供的prepare_dota1_ms,然后使用测试命令测试您提供的模型,直接报错说是标签文件格式不支持,是什么原因呢?
请问dota数据集的处理是用prepare_dota1_ms.py处理数据集吗?我在您的代码里还看到一个prepare_dota1_train_val.py的一个脚本呢?这个脚本里面的没有DOTA2COCO.py呢。我将我的dota数据集 分成train/val/test进行裁剪,但是split过程中出现libpng error read error然后就出错了,您能帮助我一下吗?
MinAeraRect:intends to find the rotated rectangle with the minimum area from the learned point set over an oriented object.
您好,我在看您的论文的时候发现对这一方面没有多余的解释,我想知道您具体是怎么做的呢,没有找到代码的相关位置。感谢!
Traceback (most recent call last):
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/lzk/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in
cli.main()
File "/home/lzk/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/lzk/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "/home/lzk/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/lzk/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/lzk/.vscode/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/home/lzk/mydata/OrientedRepPoints-main/tools/train.py", line 154, in
main()
File "/home/lzk/mydata/OrientedRepPoints-main/tools/train.py", line 143, in main
train_detector(
File "/mnt/home/lzk/OrientedRepPoints-main/mmdet/apis/train.py", line 105, in train_detector
_non_dist_train(
File "/mnt/home/lzk/OrientedRepPoints-main/mmdet/apis/train.py", line 244, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 43, in train
self.call_hook('after_train_iter')
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/mmcv/runner/base_runner.py", line 282, in call_hook
getattr(hook, fn_name)(self)
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/mmcv/runner/hooks/optimizer.py", line 21, in after_train_iter
runner.outputs['loss'].backward()
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/torch/_tensor.py", line 307, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/torch/autograd/init.py", line 154, in backward
Variable._execution_engine.run_backward(
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/torch/autograd/function.py", line 199, in apply
return user_fn(self, *args)
File "/home/lzk/mydata/anaconda3/envs/reppointobb/lib/python3.8/site-packages/torch/autograd/function.py", line 340, in wrapper
outputs = fn(ctx, *args)
File "/mnt/home/lzk/OrientedRepPoints-main/mmdet/ops/dcn/deform_conv.py", line 87, in backward
deform_conv_cuda.deform_conv_backward_parameters_cuda(
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
请问一下跑hrsc数据集这里应该修改哪里
数据在哪里下载呀
opendatasets中貌似没有给出dior的定义,我还不太懂这块,能帮一下不,谢谢
I tried to train the model on DOTAv1, but i meet the problem when i was trying to get the final result.
"There is something wrong with your submission as follows:
KeyError('P1508',)
You can submit standard formatted results again."
So i am wondering the solution to this problem, looking forward to your reply
NearestGTCorner 的代码可以提供吗
I'm wondering if you have tested your model DOTA-v1.5 dataset?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.