NUSTM / VLP-MABSA

109 stars 10 forks source link

Faster-RCNN to extract the region feature #9

Open sxf97 opened 1 year ago

sxf97 commented 1 year ago

I would like to know how to use Faster-RCNN to extract the region feature(only retain 36 regions with highest Confidence) as the input feature and the dimension of each region feature is 2048,Can you give me a small demo if possible?

lyhuohuo commented 1 year ago

You can follow the instructions in https://github.com/jiasenlu/vilbert_beta/tree/master/data. You just need to modify the code in file ./tools/generate_tsv.py. Specifically, change "image_ids" to the list of image paths you want to extract features. If you only want to use the image features of MABSA downstream datasets, we provide the features in google drive https://drive.google.com/drive/folders/1rm0FtHOTMUfZfRjWIE9Ukn_1D5MDXQy3?usp=sharing.

sxf97 commented 1 year ago

好的,谢谢你呀

sxf97 commented 1 year ago

你好,我还想问一下这个代码的运行,您是在windows下还是在linux、ubuntu下运行的,caffa环境搭建好难

lyhuohuo commented 1 year ago

是在linux ubuntu环境下的,caffe配置是比较麻烦

luckypeak-xyz commented 1 year ago

You can follow the instructions in https://github.com/jiasenlu/vilbert_beta/tree/master/data. You just need to modify the code in file ./tools/generate_tsv.py. Specifically, change "image_ids" to the list of image paths you want to extract features. If you only want to use the image features of MABSA downstream datasets, we provide the features in google drive https://drive.google.com/drive/folders/1rm0FtHOTMUfZfRjWIE9Ukn_1D5MDXQy3?usp=sharing.

请问后面预训练所需要的 _box _att_cls_again 文件夹下的 .npy.npz 文件都是通过这里得到的 .tsv 转换而来的吗?

lyhuohuo commented 1 year ago

是的