pzzhang/VinVL

How to decode feature files?

Zhonghao2016 opened this issue · 2 comments

Hello! Thanks for your wonderful work. May I know how to decode GQA pretrained feature files? Specifically, how to convert the base64 encoded features (data in features.tsv) to floating points? Thanks very much!

I don't know whether this help, but in Image Captioning with Oscar, they use this line of code to decode base64 encoded features

features = np.frombuffer(base64.b64decode(feat_info['features']), np.float32).reshape((num_boxes, -1))

Thanks!