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

The dimension about the Av and Ao #4

Open
bnuss98 opened this issue May 24, 2021 · 10 comments
Open

The dimension about the Av and Ao #4

bnuss98 opened this issue May 24, 2021 · 10 comments

Comments

@bnuss98
Copy link

bnuss98 commented May 24, 2021

Hello, it's very kind and excellent of you to share your work! The logic of this article is very clear, but as a green-hand, I am confused about the Nv and No in Av and Ao. The Nv and No are the numbers of verbs and objects about which dataset or things else? Looking forward to your answer~ ^_^

@zhihou7
Copy link
Owner

zhihou7 commented May 24, 2021

Hi, N_v and N_o are the numbers of verb categories and object categories respectively. For example, on HICO-DET, N_v is 117 and N_o is 80. A_v is the verb-HOI co-occurrence matrix and A_o is the object-HOI co-occurrence matrix. You can see this line of the code:

def get_convert_matrix(verb_class_num=117, obj_class_num=80):

For example, if the i HOI category is composed by verb j and object k, we have A_v[j][i] == 1 and A_o[k][I] == 1.

Regards,

@bnuss98
Copy link
Author

bnuss98 commented May 24, 2021

Thanks! I am also confused that lo is the label of an object, is it also an one-hot label? But what is the label dimension for a new object? y = (loAo)&(lvAv), so the lo should be 1*80, but the new object is not in HOI's obj_class.

@bnuss98
Copy link
Author

bnuss98 commented May 26, 2021 via email

@zhihou7
Copy link
Owner

zhihou7 commented May 26, 2021

Thanks! I am also confused that lo is the label of an object, is it also an one-hot label? But what is the label dimension for a new object? y = (loAo)&(lvAv), so the lo should be 1*80, but the new object is not in HOI's obj_class.

Currently, we only consider the objects whose categories are the same or a subset of object categories of HOI dataset. Sorry for getting you latter. I did not receive the email notification.

@zhihou7
Copy link
Owner

zhihou7 commented May 26, 2021

Yes, it is right. Thanks for your nice question!

However, you can simply set the co-occurrence matrix by hand to enable the composite HOI of 'play basketball'. Then, the model can learn 'play basketball' although there are no 'play basketball' instance in HICO-DET. Well, I guess this also answer your question about composing HOIs with novel types of objects. In fact, our next work also address your problem. we'll release it once it is accepted.

regards,

@bnuss98
Copy link
Author

bnuss98 commented May 26, 2021 via email

@rouge012
Copy link

Yes, it is right. Thanks for your nice question!

However, you can simply set the co-occurrence matrix by hand to enable the composite HOI of 'play basketball'. Then, the model can learn 'play basketball' although there are no 'play basketball' instance in HICO-DET. Well, I guess this also answer your question about composing HOIs with novel types of objects. In fact, our next work also address your problem. we'll release it once it is accepted.

regards,

Hi! How can I set the co-occurrence matrix?

@zhihou7
Copy link
Owner

zhihou7 commented Nov 28, 2022

hi @rouge012,
the co-occurrence matrix $A\in R^{N_v \times N_o} $ is a two dimension matrix, where $N_v$ indicates the length of verb categories and $N_o$ indicate the length of object categories. We can initialize $A$ as a zero matrix. For each object, there are annotated verbs. We can set the corresponding position of the matrix $A$ as 1. For each example, if the apple is combinable with "eat", "cut" in the dataset, we set corresponding position of and in $A$ as 1.

Feel free to post if you have further questions

Regards,

@rouge012
Copy link

hi @rouge012, the co-occurrence matrix $A\in R^{N_v \times N_o} $ is a two dimension matrix, where Nv indicates the length of verb categories and No indicate the length of object categories. We can initialize A as a zero matrix. For each object, there are annotated verbs. We can set the corresponding position of the matrix A as 1. For each example, if the apple is combinable with "eat", "cut" in the dataset, we set corresponding position of and in A as 1.

Feel free to post if you have further questions

Regards,

Thanks for the quick and detailed clarification, and I am wondering where I can find the code for setting the co-occurrence matrix. Thank you!

@zhihou7
Copy link
Owner

zhihou7 commented Nov 29, 2022

Hi @rouge012,

I have posted in #25. If you need to generate a matrix by yourself, you can just open the three files "https://github.com/zhihou7/HOI-CL/blob/master/misc/hico_list_hoi.txt", "https://github.com/zhihou7/HOI-CL/blob/master/misc/hico_list_obj.txt", "https://github.com/zhihou7/HOI-CL/blob/master/misc/hico_list_vb.txt", and link them together according to the object name and verb name. I think it requires just several lines of code.

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

3 participants