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

How to run the modified baseline? #3

Open
xxxzhi opened this issue Aug 19, 2020 · 8 comments
Open

How to run the modified baseline? #3

xxxzhi opened this issue Aug 19, 2020 · 8 comments

Comments

@xxxzhi
Copy link

xxxzhi commented Aug 19, 2020

Hi, would you like to provide a script to run the modified baseline?

@Dong-JinKim
Copy link
Owner

For now, in order to run the modified baseline, you have to change the code of (exp/hoi_classifier/models.hoi_classifier_model.py).
These are the 2 lines of code you have to change.

[L27]
self.classifier = nn.Linear(input_size,117*num_cluster)
->
self.classifier = nn.Linear(input_size,117)

[L106]
self.USE_cluster = True
->
self.USE_cluster = False

I will update the code that has an option for modified baseline model, and I will let you know as soon as possible.

Best regards,
Dong-Jin.

@xxxzhi
Copy link
Author

xxxzhi commented Aug 27, 2020

Ok, Thanks for your reply.

@Dong-JinKim I also need to change the loss here?

loss = 0.7 * loss_cls + 0.3 * loss_distillation + 0.1* loss_cluster

to

loss = loss_cls

@xxxzhi
Copy link
Author

xxxzhi commented Aug 27, 2020

Do you remove the tensorboard code? I can not find the tensorboard logs.

@Dong-JinKim
Copy link
Owner

I somehow had a problem with tensorboard, so I removed the code for tensorboard for now.
You can use the tensorboard by replacing the code L147-157 of exp/hoi_classifier/train.py with the following code:

        if step%100==0:
            log_value('train_loss',loss.data[0],step)
            log_value('max_prob',max_prob,step)
            log_value('max_prob_tp',max_prob_tp,step)
            print(exp_const.exp_name)

        if step%5000==0:
            val_loss = eval_model(model,dataset_val,exp_const,num_samples=2500)
            log_value('val_loss',val_loss,step)
            log_str = \
                'Epoch: {} | Iter: {} | Step: {} | Val Loss: {:.8f}'
            log_str = log_str.format(
                epoch,
                i,
                step,
                loss.data[0],
                val_loss)
            print(log_str)

And for the first question, that's right. you also need to change the loss to:

loss = loss_cls

@xxxzhi
Copy link
Author

xxxzhi commented Aug 27, 2020

Thanks for your reply.

The human features and object features in this project are extracted first? I mean, the network will not update the backbone (e.g. Resnet152) parameters.

@Dong-JinKim
Copy link
Owner

That's right.
The human and the object features are pre-extracted, so the model is only updated up to the region feature part.

@xxxzhi
Copy link
Author

xxxzhi commented Aug 28, 2020

thanks for your reply.
oh, that's interesting! Have you tried to update the backbone in an end-to-end way? I mean trying to extract human and object features and train HOI classifier jiontly like iCAN. My recent paper also follows this way. I think it should be a bit better. If not, have you ever think about the reason?

Have you ever evaluated the performance of your object detector on HICO-DET test dataset?

@xxxzhi
Copy link
Author

xxxzhi commented Aug 28, 2020

I find there are many different ways to implement HOI detection. Thus, it is a bit difficult to compare current methods directly. I mean what kinds of methods are complimentary, what kinds of methods have similar purpose? I also find the results of some recent papers looks like a score fusion of several methods. That's extremely wired.

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