MILVLG / bottom-up-attention.pytorch

A PyTorch reimplementation of bottom-up-attention models
Apache License 2.0
294 stars 76 forks source link

Number of bounding boxes not consistent between extract_features.py and visualize.ipynb #101

Open preetom-saha-arko opened 1 year ago

preetom-saha-arko commented 1 year ago

I ran the following command to extract features from an image: python3 extract_features.py --mode caffe --num-cpus 0 --gpus 1 --extract-mode roi_feats --min-max-boxes '1,70' --config-file configs/caffe/test-caffe-r101.yaml --image-dir "/home/arko/Documents/images" --out-dir "/home/arko/Documents/outputs"

(There is only one image in my image directory.)

After extracting the archive, I get multiple npy files. Reading the num_bbox.npy file, I get 63.

However, using the same model in visualize.ipynb with CONF_THRESH = 0.3. MIN_BOXES = 1 and MAX_BOXES = 70, I am getting 50 bounding boxes for the same image.

Why is there such discrepancies? Am I missing something?