Hlings / AcroFOD

(ECCV2022) The official PyTorch implementation of the "AcroFOD: An Adaptive Method for Cross-domain Few-shot Object Detection".
Apache License 2.0
55 stars 7 forks source link

Domain-aware Augmentation #15

Closed zhangyu619 closed 1 year ago

zhangyu619 commented 1 year ago

Hello, recently read this paper you wrote and found it very helpful, want to understand your code, but I am a beginner some details do not read too well, please ask the paper's Domain-aware Augmentation and Directive Optimization Strategy in which part of the code embodied in the specific, thank you!

Hlings commented 1 year ago

For domain-aware augmentation, I first merge the source and target data into the same dataloader (see the yaml config file ). Then, I perform the augmentation here for the image-level augmentation. The instance-level (copy-paste) augmentation can refer to the copy_paste_da.py file.

For the Optimization Strategy, I implement that before the epoch training, see here (Lines 292-330 in the train.MMD.py)

I hope this reply finds you well :)

zhangyu619 commented 1 year ago

感谢您的回复!我会回去仔细阅读的

zhangyu619 commented 1 year ago

你好Cityscapes_8cls_foggy这个数据集分享好像过期了,能麻烦再分享一下吗,谢谢!

Hlings commented 1 year ago

Hi 我已经更新了一下链接,现在试一下可以了嘛?

zhangyu619 commented 1 year ago

谢谢大佬,已经可以了

zhangyu619 commented 1 year ago

还有个问题,我看您论文中C-F是将Cityscapes作为源域,Foggy version of Cityscapes作为目标域来训练的,但是我看您给的数据集的意思好像是将Foggy version of Cityscapes作为源域,从Cityscapes中取出8张图像来作为目标域训练,还有就是目标域选取图像有什么要求吗,假如我选的这8张图像不能包含所有的类别,这样会不会影响最后的效果,您能稍微给我解释一下吗,谢谢!

Hlings commented 1 year ago

Hi 可以参考这里的回答和这个issue

zhangyu619 commented 1 year ago

感谢您的回复!

beautifulmm commented 1 year ago

For domain-aware augmentation, I first merge the source and target data into the same dataloader (see the yaml config file ). Then, I perform the augmentation here for the image-level augmentation. The instance-level (copy-paste) augmentation can refer to the copy_paste_da.py file.

For the Optimization Strategy, I implement that before the epoch training, see here (Lines 292-330 in the train.MMD.py)

I hope this reply finds you well :)

For domain-aware augmentation, I first merge the source and target data into the same dataloader (see the yaml config file ). Then, I perform the augmentation here for the image-level augmentation. The instance-level (copy-paste) augmentation can refer to the copy_paste_da.py file.

For the Optimization Strategy, I implement that before the epoch training, see here (Lines 292-330 in the train.MMD.py)

I hope this reply finds you well :)

请问image-level的augmentation是在datasets.py的从第几行到第几行,可以再具体一点嘛,期待大佬回复~

Hlings commented 1 year ago

Hi datasets.py 中 Lines 504-507是mosaic 可以看那个load_mosaic的函数 Lines 510-514是 Mixup Lines 676-678是copy-paste 具体可以看那个 copy_paste的函数