yangxue0827 / h2rbox-mmrotate Goto Github PK
View Code? Open in Web Editor NEWPyTorch Implementation for H2RBox
License: Apache License 2.0
PyTorch Implementation for H2RBox
License: Apache License 2.0
In your h2rbox v2 paper, it was stated that v1's code can only run 7% on the HRSC dataset, but during my experiment, I ran 76% with original configuration files. What do you think is the problem with this。
First of all, thank you for your open source code.
My question is very simple. As mentioned in the paper, you use horizontal boxes to predict rotation boxes, but the dotav1 dataset has both horizontal box and rotation box annotations. I also saw a preprocessing operation in the code to convert the rotation box annotation to the horizontal box annotation. So when I download and process the dataset, should I use the rotation box annotation file "labelTxt. zip" or the horizontal box annotation file "Train_Task2ugt. zip"?
I did not see any similar instructions in the readme file. I hope you can solve my confusion, thank you!
大佬您好,测试结果可视化的检测框输出默认的是水平的,想问下怎么在图像上可视化输出预测得到的旋转框呢,感谢!
---检查发现是config里面rec_class修改导致没学到角度,抱歉打扰了。
I am Vansin, the technical operator of OpenMMLab. In September of last year, we announced the release of OpenMMLab 2.0 at the World Artificial Intelligence Conference in Shanghai. We invite you to upgrade your algorithm library to OpenMMLab 2.0 using MMEngine, which can be used for both research and commercial purposes. If you have any questions, please feel free to join us on the OpenMMLab Discord at https://discord.gg/amFNsyUBvm or add me on WeChat (van-sin) and I will invite you to the OpenMMLab WeChat group.
Here are the OpenMMLab 2.0 repos branches:
OpenMMLab 1.0 branch | OpenMMLab 2.0 branch | |
---|---|---|
MMEngine | 0.x | |
MMCV | 1.x | 2.x |
MMDetection | 0.x 、1.x、2.x | 3.x |
MMAction2 | 0.x | 1.x |
MMClassification | 0.x | 1.x |
MMSegmentation | 0.x | 1.x |
MMDetection3D | 0.x | 1.x |
MMEditing | 0.x | 1.x |
MMPose | 0.x | 1.x |
MMDeploy | 0.x | 1.x |
MMTracking | 0.x | 1.x |
MMOCR | 0.x | 1.x |
MMRazor | 0.x | 1.x |
MMSelfSup | 0.x | 1.x |
MMRotate | 1.x | 1.x |
MMYOLO | 0.x |
Attention: please create a new virtual environment for OpenMMLab 2.0.
我已经关注到你在h2rbox上做的关于ssdd和hrsid数据集上的信息,请问,你能给我一份这两个数据集的水平框的标注信息吗?原始的是.xml的格式的,我们也需要.txt格式的标注的信息在h2rbox上运行.
Describe the bug
H2RBoxHead' object has no attribute 'seprate_angle'
Reproduction
python -m torch.distributed.launch --nproc_per_node=2 --nnodes=1 \
./tools/train.py configs/h2rbox/h2rbox_r50_fpn_1x_dota_le90.py\
--launcher pytorch \
--work-dir ./output \
Bug fix
The RotatedFCOSHead has attribute 'separate_angle' not 'seprate_angle' , it seems that you have spelt it wrong.
作者您好,请问在您的框架下可以正常使用图片的mosaic增强方法吗?还想期待一下H2RBox-v2大概什么时候发布呢?
Hi,
Thanks for your excellent work. I tried to run your code with 8 GPUs (with mmrotate 1.x), but runtimeError was encountered. I also tried to train with 1 GPU, it works fine. Did you run your code with multiple GPUs? Any suggestions?
Error traceback
If applicable, paste the error trackback here.
raceback (most recent call last):
File "tools/train.py", line 122, in <module>
main()
File "tools/train.py", line 118, in main
runner.train()
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1686, in train
model = self.train_loop.run() # type: ignore
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/loops.py", line 90, in run
self.run_epoch()
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/loops.py", line 106, in run_epoch
self.run_iter(idx, data_batch)
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/loops.py", line 122, in run_iter
outputs = self.runner.model.train_step(
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/model/wrappers/distributed.py", line 121, in train_step
losses = self._run_forward(data, mode='loss')
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/model/wrappers/distributed.py", line 161, in _run_forward
results = self(**data, mode=mode)
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/envs/openmmlab/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 692, in forward
if self.reducer._rebuild_buckets():
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by (1) passing the ke
yword argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`; (2) making sure all `forward` function outputs participate in calculating loss. If you already have done the above two steps, then the distributed data parallel
module wasn't able to locate the output tensors in the return value of your module's `forward` function. Please include the loss function and the structure of the return value of `forward` of your module when reporting this issue (e.g. list, dict, iterab
le).
Can you give your config file and results on the HRSID dataset?
I trained on HRSID but the result looks bad.
Excuse me, what is the extraction code of the SSDD dataset? Thanks
raceback (most recent call last):
File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mmcv/utils/misc.py", line 73, in import_modules_from_strings
imported_tmp = import_module(imp)
File "/root/anaconda3/envs/openmmlab/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'h2rbox'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tools/train.py", line 192, in
main()
File "tools/train.py", line 85, in main
cfg = Config.fromfile(args.config)
File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mmcv/utils/config.py", line 343, in fromfile
import_modules_from_strings(**cfg_dict['custom_imports'])
File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mmcv/utils/misc.py", line 80, in import_modules_from_strings
raise ImportError
ImportError
python 3.8 torch 1.8.0 cuda10.2
不知道是什么环境配置错了,希望能够得到您的解答,非常感谢
`def kfiou3d_loss(pred, target, fun='expm1', tau=0.0, alpha=1.0, sqrt=False):
xyz_p, Rwh_p, Swh_p, Sl_p = pred
xyz_t, Rwh_t, Swh_t, Sl_t = target
Sigmawh_p = Rwh_p.bmm(Swh_p.square()).bmm(Rwh_p.permute(0, 2, 1))
Sigmawh_t = Rwh_t.bmm(Swh_t.square()).bmm(Rwh_t.permute(0, 2, 1))
Sigmawh_sum = Sigmawh_p + Sigmawh_t
Sigmawh_sum_det = (Sigmawh_sum[..., 0, 0] * Sigmawh_sum[..., 1, 1] -
Sigmawh_sum[..., 1, 0] * Sigmawh_sum[..., 0, 1])
Sigmal_sum_det = (Sl_p.square() + Sl_t.square())
Sigma_sum_det = Sigmawh_sum_det * Sigmal_sum_det
vol_p = Swh_p.diagonal(dim1=-2, dim2=-1).prod(dim=-1) * Sl_p
vol_t = Swh_t.diagonal(dim1=-2, dim2=-1).prod(dim=-1) * Sl_t
kf_intersection = vol_p * vol_t / Sigma_sum_det.clamp(min=1e-7).sqrt()
kf_union = (vol_p + vol_t - kf_intersection).clamp(min=1e-7)
kfiou = kf_intersection / kf_union
loss_kfiou = postprocess(1 - 4.656854249492381 * kfiou, fun=fun, tau=0.0)
return loss_kfiou`
请问在kfiou3d版本的计算中,xyz_p, Rwh_p, Swh_p, Sl_p的含义分别是什么,如何获取?
作者您好,我认为您的工作非常好,我想请问一下您能否公布一下DOTA-v1.0中1x schdule using MS的每一个类别的mAP吗,谢谢!
hello,我直接用mmrotation 2.0训练h2rbox模型,直接用普通的检测标注数据就行了吗?
SAR图像与光学图像不一致性,SSDD在H2rbox上的效果不佳,包括在mmrotate上的一些旋转检测器效果也不是很好,我也才接触旋转检测算法,想请教您如何看待SAR舰船的旋转检测,希望能得到您的宝贵建议。
can you share your trained model for testing purpose?
(zyf) root@container-b8cd11b052-650e1e62:~/autodl-tmp/h2rbox-mmrotate# python tools/train.py configs/h2rbox/h2rbox_r50_fpn_3x_ssdd_le90.py
/root/miniconda3/envs/zyf/lib/python3.7/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 "/root/miniconda3/envs/zyf/lib/python3.7/site-packages/mmcv/utils/misc.py", line 73, in import_modules_from_strings
imported_tmp = import_module(imp)
File "/root/miniconda3/envs/zyf/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'h2rbox'
A placeholder for the command.
Environment
python mmrotate/utils/collect_env.py
to collect necessary environment information and paste it here.$PATH
, $LD_LIBRARY_PATH
, $PYTHONPATH
, etc.)Error traceback
If applicable, paste the error trackback here.
A placeholder for trackback.
Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
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.