SIAnalytics / RHINO

Official implementation of the paper "Hausdorff Distance Matching with Adaptive Query Denoising for Rotated Detection Transformer"
Other
25 stars 0 forks source link

config file for baseline rotated-dino #2

Closed yingyu13 closed 1 week ago

yingyu13 commented 4 months ago

Hi, thanks for your great work! Could you provide the config file for baseline rotated-dino, please? I want to reproduce the baseline result.

kouyuanbo commented 4 months ago

I tried to construct a plain rotated dino according to the description in the paper,but only get about 74 ap vs 76.10 in Table 1 in the paper. I don't know where is the mistake

nijkah commented 4 months ago

@yingyu13 Thank you for your interest. You can train the baseline (rotated-dino) with this configuration file. https://github.com/SIAnalytics/RHINO/blob/main/configs/rhino/rhino-4scale_r50_2xb2-12e_dota.py This uses 'RBoxL1Cost' and does not use the adaptive query denoising.

nijkah commented 4 months ago

@kouyuanbo As we stated in the paper, the rotated DINO baseline deteriorates in 36-epoch training compared to 12-epoch training. Can I ask you to check this? And the 'total batch size 8' (I used 4 batch size x 2 GPUs) is also an important point.

kouyuanbo commented 3 months ago

@yingyu13 Thank you for your interest. You can train the baseline (rotated-dino) with this configuration file. https://github.com/SIAnalytics/RHINO/blob/main/configs/rhino/rhino-4scale_r50_2xb2-12e_dota.py This uses 'RBoxL1Cost' and does not use the adaptive query denoising.

Actually using this config directly will get an error,because of the dimension of tensor is not match.I guess there should be an "version='v2'" in 'rhino-4scale_r50_2xb2-12e_dota.py'.

kouyuanbo commented 3 months ago

And when use rhino-4scale_r50_2xb2-12e_dota.py,the error be like:

Traceback (most recent call last):
  File "tools/train.py", line 121, in <module>
    main()
  File "tools/train.py", line 117, in main
    runner.train()
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1721, in train
    model = self.train_loop.run()  # type: ignore
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmengine/runner/loops.py", line 96, in run
    self.run_epoch()
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmengine/runner/loops.py", line 112, in run_epoch
    self.run_iter(idx, data_batch)
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmengine/runner/loops.py", line 128, in run_iter
    outputs = self.runner.model.train_step(
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 114, in train_step
    losses = self._run_forward(data, mode='loss')  # type: ignore
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 340, in _run_forward
    results = self(**data, mode=mode)
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 92, in forward
    return self.loss(inputs, data_samples)
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmdet/models/detectors/base_detr.py", line 101, in loss
    losses = self.bbox_head.loss(
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/mmdet/models/dense_heads/dino_head.py", line 69, in loss
    outs = self(hidden_states, references)
  File "/data1/miniconda3/envs/kyb_rhino/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data4/2022/kyb/RHINO-main/mmrotate/models/dense_heads/rhino_head.py", line 72, in forward
    tmp_reg_preds += reference
RuntimeError: The size of tensor a (5) must match the size of tensor b (4) at non-singleton dimension 2
nijkah commented 3 months ago

Oh, I forgot to update that. Thank you for providing information. I'll update the code.

yingyu13 commented 3 months ago

@nijkah, when will you update the code? I got the same error when use rhino-4scale_r50_2xb2-12e_dota.py. Thanks so much. Besides, can you also provide the training log and model weight?

yingyu13 commented 3 months ago

@yingyu13 Thank you for your interest. You can train the baseline (rotated-dino) with this configuration file. https://github.com/SIAnalytics/RHINO/blob/main/configs/rhino/rhino-4scale_r50_2xb2-12e_dota.py This uses 'RBoxL1Cost' and does not use the adaptive query denoising.

Actually using this config directly will get an error,because of the dimension of tensor is not match.I guess there should be an "version='v2'" in 'rhino-4scale_r50_2xb2-12e_dota.py'.

I have tried to add "version='v2'" in rhino-4scale_r50_2xb2-12e_dota.py and got mAP 74.98,lower than 76.10 in Table 1.

xgiaogiao commented 3 months ago

@yingyu13 Thank you for your interest. You can train the baseline (rotated-dino) with this configuration file. https://github.com/SIAnalytics/RHINO/blob/main/configs/rhino/rhino-4scale_r50_2xb2-12e_dota.py This uses 'RBoxL1Cost' and does not use the adaptive query denoising.感谢您的关注。您可以使用此配置文件训练基线 (rotated-dino)。https://github.com/SIAnalytics/RHINO/blob/main/configs/rhino/rhino-4scale_r50_2xb2-12e_dota.py 这使用“RBoxL1Cost”,不使用自适应查询去噪。

Actually using this config directly will get an error,because of the dimension of tensor is not match.I guess there should be an "version='v2'" in 'rhino-4scale_r50_2xb2-12e_dota.py'.实际上直接使用这个配置会出错,因为张量的维度不匹配。我想在“rhino-4scale_r50_2xb2-12e_dota.py”中应该有一个“version='v2'”。

I have tried to add "version='v2'" in rhino-4scale_r50_2xb2-12e_dota.py and got mAP 74.98,lower than 76.10 in Table 1.我尝试在rhino-4scale_r50_2xb2-12e_dota.py中添加“version='v2'”,得到 mAP 74.98,低于表 1 中的 76.10。

Can you offer me,version='v2 is code? 2495040472@qq.com

nijkah commented 2 months ago

@yingyu13 @xgiaogiao I apologize for the late response. I updated the code.

@yingyu13 Could you please confirm if the training was done with a batch size of 8 (4 batch size x 2 GPUs)? The hyperparameters for batch size and learning rate can affect the final performance.