This document provides a walk-through of how we pre-compute ResNet50 features and Faster R-CNN objects features
See video_dialogue_model/extract_features/run_resnet.py
-
Install
vqa-maskrcnn-benchmark
repository and download the model and config.cd data wget https://dl.fbaipublicfiles.com/vilbert-multi-task/detectron_model.pth wget https://dl.fbaipublicfiles.com/vilbert-multi-task/detectron_config.yaml
-
Extract features for images
See video_dialogue_model/extract_features/run_rcnn.py
For every
x.jpg
image, we will get ax.jpg.npy
file, which contains all infos generated by Faster R-CNN. -
Gather all
npy
file to buildobjects.mmap
filesSee video_dialogue_model/extract_features/build_rcnn_mmap.py