Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 1.71 KB

object_extraction.md

File metadata and controls

45 lines (35 loc) · 1.71 KB

Install

Please follow BUTD to install detectron2.

Then download pretrained model from Google Driver and place it into pretrained.

cd bottom-up-attention.pytorch
mkdir pretrained
mv [path_to_downloaded_pth] pretrained/

Replace feature_extract

Original BUTD provide script feature_extract.py to extract object with distributed framework ray. However, we find this tool is not stable and slowly. So we implement a 3times faster multiprocess version.

Simple replace feature_extract.py with extract_cc3m and extract_wevic.

Webvid 2.5M

python3 multiprocess_full_webvid_multiframe_complementary_modify_tsv_gen_from_video.py --mode caffe \
       --num-cpus 32 --gpus '0,1,2,3,4,5,6,7' \
       --workers_per_gpu 2 \
       --sampling_frames 8 \
       --split "train" \
       --dataset_dir "WebVid" \
       --extract-mode roi_feats \
       --min-max-boxes '10,100' \
       --config-file configs/bua-caffe/extract-bua-caffe-r101.yaml

CC3M

python3 multiprocess_full_cc3m_complementary_modify_tsv_gen_from_video.py \
--mode caffe --num-cpus 0 --gpus '0,1,2,3,4,5,6,7' \
--extract-mode roi_feats --min-max-boxes '10,100' \
--config-file configs/bua-caffe/extract-bua-caffe-r101.yaml

Visualization

We visualize some extracted bounding boxes as below: