Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is supervised loss L^s applied to both source and target data? #21

Closed
Hayoung93 opened this issue Mar 24, 2023 · 2 comments
Closed

Is supervised loss L^s applied to both source and target data? #21

Hayoung93 opened this issue Mar 24, 2023 · 2 comments

Comments

@Hayoung93
Copy link

Hi, I read your paper very interestingly and currently following your code implementation.

Unlike classification branch which doesn't use target domain's label information, it seems that the code of detection branch is using target domain's ground truth bboxes. Is it intentional or did I miss something?

Thank you.

The cls branch:

x_s, labels_s = next(train_source_iter)
x_t, _ = next(train_target_iter)

At the det branch:

for iteration, ((source_images, source_targets, idx1), (target_images, target_targets, idx2)) in enumerate(zip(source_data_loader, target_data_loader), start_iter):
data_time = time.time() - end
arguments["iteration"] = iteration
scheduler.step()
images = (source_images+target_images).to(device)
targets = [target.to(device) for target in list(source_targets+target_targets)]
loss_dict = model(images, targets)

@krumo
Copy link
Collaborator

krumo commented Mar 24, 2023

Hi, thanks for your interest! For domain adaptation detection, the target ground truth is loaded but not used in loss computation. Our strategy is to use a flag to filter out losses on target domain data when computing task losses on RPN and bbox head. To avoid confusion, we also use a pseudo label to replace the annotations of target domain when loading data.

@Hayoung93
Copy link
Author

Thanks for the explanation! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants