py-bottom-up-attention icon indicating copy to clipboard operation
py-bottom-up-attention copied to clipboard

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

Open coldtomatojuice opened this issue 4 years ago • 5 comments

❓ 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!

coldtomatojuice avatar May 21 '20 16:05 coldtomatojuice

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

airsplay avatar May 21 '20 16:05 airsplay

@airsplay Thank you!

coldtomatojuice avatar May 21 '20 16:05 coldtomatojuice

❓ 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.

yezhengli-Mr9 avatar Jan 13 '21 21:01 yezhengli-Mr9

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

rubencart avatar Oct 13 '21 10:10 rubencart

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

Did you get these mappings of COCO? :)

darwann avatar Nov 09 '23 14:11 darwann