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 can I transfer the label number to its class name? #5

Open
coldtomatojuice opened this issue May 21, 2020 · 5 comments
Open

How can I transfer the label number to its class name? #5

coldtomatojuice opened this issue May 21, 2020 · 5 comments

Comments

@coldtomatojuice
Copy link

coldtomatojuice commented May 21, 2020

❓ How to use Detectron2

edit 1: Sorry It's from LXMERT.. I was confused. but anyway It would be very helpful if I can get an answer!

Thanks for your great work!

I got the file "vg_gqa_obj36.tsv" from gdrive
and
among fields, there is objects_id
which i guess indicates a label of an object
then, How can I alias this label to the real class name?
Is there a kind of like LABEL2NAME file?

`"""
Example in obj tsv:

FIELDNAMES = ["img_id", "img_h", "img_w", "objects_id", "objects_conf", "attrs_id", "attrs_conf", "num_boxes", "boxes", "features"]
"""`

'
OrderedDict([('img_id', 'n116329'),
('img_h', 427),
('img_w', 640),
('objects_id',
array([177, 397, 453, 397, 453, 177, 291, 90, 397, 128, 177, 397, 299,
308, 50, 236, 397, 314, 291, 98, 364, 50, 601, 50, 50, 299,
50, 50, 209, 397, 51, 299, 50, 453, 51, 776])),
'
177 -> What?

Thank you!

@airsplay
Copy link
Owner

The mapping is available here:
https://github.com/airsplay/py-bottom-up-attention/tree/master/demo/data/genome/1600-400-20

which is copied from here:
https://github.com/peteanderson80/bottom-up-attention/tree/master/data/genome/1600-400-20

@coldtomatojuice
Copy link
Author

@airsplay Thank you!

@yezhengli-Mr9
Copy link

yezhengli-Mr9 commented Jan 13, 2021

❓ How to use Detectron2

edit 1: Sorry It's from LXMERT.. I was confused. but anyway It would be very helpful if I can get an answer!

Thanks for your great work!

I got the file "vg_gqa_obj36.tsv" from gdrive
and
among fields, there is objects_id
which i guess indicates a label of an object
then, How can I alias this label to the real class name?
Is there a kind of like LABEL2NAME file?

`"""
Example in obj tsv:

FIELDNAMES = ["img_id", "img_h", "img_w", "objects_id", "objects_conf", "attrs_id", "attrs_conf", "num_boxes", "boxes", "features"]
"""`

'
OrderedDict([('img_id', 'n116329'),
('img_h', 427),
('img_w', 640),
('objects_id',
array([177, 397, 453, 397, 453, 177, 291, 90, 397, 128, 177, 397, 299,
308, 50, 236, 397, 314, 291, 98, 364, 50, 601, 50, 50, 299,
50, 50, 209, 397, 51, 299, 50, 453, 51, 776])),
'
177 -> What?

Thank you!

Hi @coldtomatojuice , objects_conf and attrs_conf are just corresponding probability, correct? I follows #6 and I am looking into demo_feature_extraction_attr.ipynb.

@rubencart
Copy link

And do you have a mapping from these to COCO categories? :)

@darwann
Copy link

darwann commented Nov 9, 2023

And do you have a mapping from these to COCO categories? :)

Did you get these mappings of COCO? :)

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

5 participants