bottom-up-attention icon indicating copy to clipboard operation
bottom-up-attention copied to clipboard

About pretrained models to generate 36 per image feature

Open masonwang96 opened this issue 4 years ago • 11 comments

Thank you for your excellent work! I have a question. I'm using this bottom up attention method to generate 36/image feature. In your README, you wrote that:

To recreate the pretrained feature files with 36 features per image, set MIN_BOXES=36 and MAX_BOXES=36 use this alternative pretrained model instead. The alternative pretrained model was trained for fewer iterations but performance is similar.

which is resnet101_faster_rcnn_final_iter_320000.caffemodel. However, when I was doing caption task, I generateed 36/image features with resnet101_faster_rcnn_final.caffemodel , and found that features generated this way is better than waht you recommended above.

So I was wondering why? Does resnet101_faster_rcnn_final.caffemodel is better anyway? Looking forward to your reply. Thanks a lot. @peteanderson80

masonwang96 avatar Apr 21 '20 06:04 masonwang96

In other words, why did you recommend using resnet101_faster_rcnn_final_iter_320000.caffemodelto generate 36/image features?

masonwang96 avatar Apr 21 '20 07:04 masonwang96

@masonwang96 where to download the resnet101_faster_rcnn_final.caffemodel? can you share the url?

nyj-ocean avatar Jul 09 '20 02:07 nyj-ocean

https://www.dropbox.com/s/5xethd2nxa8qrnq/resnet101_faster_rcnn_final.caffemodel?dl=1

masonwang96 avatar Jul 09 '20 02:07 masonwang96

https://github.com/peteanderson80/bottom-up-attention/issues/87#issue-603744880

Dear scholar, I can't download the model resnet101_faster_rcnn_final_iter_320000.caffemodel. I think maybe this model can generate the similar features provided by the author. So the author maybe doesn't mean the resnet101_faster_rcnn_final_iter_320000.caffemodel model will get better performance than the resnet101_faster_rcnn_final.caffemodel(10~100). If you have BaiduWangpan, could you share the model file "resnet101_faster_rcnn_final_iter_320000.caffemodel" with me ? I am so eager to attain the model file.

alice-cool avatar Feb 27 '21 02:02 alice-cool

Sorry about the delay. I have shared the "resnet101_faster_rcnn_final_iter_320000.caffemodel" through BaiduWangpan. The link is as follows:

链接: https://pan.baidu.com/s/18TGdxmx_IxCqbzx2APEd2w 密码: 8aa4

masonwang96 avatar Feb 27 '21 06:02 masonwang96

By the way, this is the "resnet101_faster_rcnn_final.caffemodel":

链接: https://pan.baidu.com/s/1ELt5hL1BKemfDYDyN1dOPw 密码: altw

masonwang96 avatar Feb 27 '21 06:02 masonwang96

Thanks DaLao,Pour a bottle of coca cola for you. 

---Original--- From: "Mason Wang"<[email protected]> Date: Sat, Feb 27, 2021 14:25 PM To: "peteanderson80/bottom-up-attention"<[email protected]>; Cc: "Comment"<[email protected]>;"Donglearner"<[email protected]>; Subject: Re: [peteanderson80/bottom-up-attention] About pretrained models to generate 36 per image feature (#87)

Sorry about the delay. I have shared the "resnet101_faster_rcnn_final_iter_320000.caffemodel" through BaiduWangpan. The link is as follows:

链接: https://pan.baidu.com/s/18TGdxmx_IxCqbzx2APEd2w 密码: 8aa4

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

alice-cool avatar Feb 27 '21 06:02 alice-cool

Thanks for your timely share! Thanks again. And I run the generate_tsv.py, with the resnet101_faster_rcnn_final_iter_320000.caffemodel that you share, and the result can be reproduced. with the same picture, COCO_train2014_000000150367.jpg. The boxes is the same.

The result run by generate_tsv.py [[ 0. 0. 608.7625 350.63208 ] [276.54065 54.26455 639.2 454.42773 ] [ 0. 18.055298 286.9795 464.57227 ] [ 0. 277.6827 583.3728 479.2 ] [ 26.716516 131.85942 322.95587 259.661 ] [386.7497 44.484303 522.03094 154.81404 ] [ 75.55986 327.47873 421.8147 463.39697 ] [306.05084 353.73135 386.62222 454.88385 ] [242.39853 355.86627 333.31012 453.9502 ] [263.6872 144.34995 479.49268 319.98187 ] [279.20203 0. 584.5702 132.85336 ] [584.67584 0. 639.2 107.73751 ] [300.33197 265.5234 387.11652 347.883 ] [ 0. 0. 252.79614 140.41837 ] [452.19727 384.70477 542.59 425.482 ] [141.57083 140.46927 455.4457 344.03836 ] [118.00602 138.60199 289.6468 235.06424 ] [321.5712 358.26862 377.40723 448.2745 ] [277.84735 345.26016 382.9519 455.149 ] [338.34506 0. 639.2 164.73306 ] [ 39.608967 170.50273 219.11008 257.4533 ] [503.02118 49.59502 582.64844 156.79427 ] [280.75128 146.12346 347.84033 265.48737 ] [156.60852 352.786 344.48508 450.08588 ] [ 0. 302.57465 78.91972 395.2979 ] [ 27.668285 4.043219 181.89998 120.18465 ] [ 0.86831665 315.65247 70.51543 366.01852 ] [403.1822 65.44243 437.54654 103.289085 ] [263.4151 366.8589 314.9948 444.99268 ] [440.21368 156.93144 500.5992 193.9488 ] [169.18588 359.8093 271.23724 456.87762 ] [203.40878 2.5947204 379.92694 80.30624 ] [389.56876 239.18001 475.52667 330.16315 ] [149.9029 152.9564 193.36127 188.3182 ] [158.44717 0. 214.74826 108.832054 ] [ 67.062485 213.83627 249.61057 352.60757 ]] GPU 0: 1/1 0.964s (projected finish: 0.00 hours)

The train2014.zip array([[ 0. , 277.6827 , 583.3728 , 479.2 ], [389.56876 , 239.18001 , 475.52667 , 330.16315 ], [300.33197 , 265.5234 , 387.11652 , 347.883 ], [118.00602 , 138.60199 , 289.6468 , 235.06424 ], [ 0. , 0. , 252.79614 , 140.41837 ], [156.60852 , 352.786 , 344.48508 , 450.08588 ], [280.75128 , 146.12346 , 347.84033 , 265.48737 ], [386.7497 , 44.484303 , 522.03094 , 154.81404 ], [338.34506 , 0. , 639.2 , 164.73306 ], [321.5712 , 358.26862 , 377.40723 , 448.2745 ], [279.20203 , 0. , 584.5702 , 132.85336 ], [263.4151 , 366.8589 , 314.9948 , 444.99268 ], [440.21368 , 156.93144 , 500.5992 , 193.9488 ], [ 0. , 0. , 608.7625 , 350.63208 ], [452.19727 , 384.70477 , 542.59 , 425.482 ], [ 0.86831665, 315.65247 , 70.51543 , 366.01852 ], [149.9029 , 152.9564 , 193.36127 , 188.3182 ], [ 27.668285 , 4.043219 , 181.89998 , 120.18465 ], [276.54065 , 54.26455 , 639.2 , 454.42773 ], [141.57083 , 140.46927 , 455.4457 , 344.03836 ], [584.67584 , 0. , 639.2 , 107.73751 ], [169.18588 , 359.8093 , 271.23724 , 456.87762 ], [158.44717 , 0. , 214.74826 , 108.832054 ], [ 0. , 302.57465 , 78.91972 , 395.2979 ], [ 0. , 18.055298 , 286.9795 , 464.57227 ], [503.02118 , 49.59502 , 582.64844 , 156.79427 ], [ 75.55986 , 327.47873 , 421.8147 , 463.39697 ], [403.1822 , 65.44243 , 437.54654 , 103.289085 ], [277.84735 , 345.26016 , 382.9519 , 455.149 ], [306.05084 , 353.73135 , 386.62222 , 454.88385 ], [242.39853 , 355.86627 , 333.31012 , 453.9502 ], [203.40878 , 2.5947204 , 379.92694 , 80.30624 ], [263.6872 , 144.34995 , 479.49268 , 319.98187 ], [ 26.716516 , 131.85942 , 322.95587 , 259.661 ], [ 39.608967 , 170.50273 , 219.11008 , 257.4533 ], [ 67.062485 , 213.83627 , 249.61057 , 352.60757 ]], only the order is placed

alice-cool avatar Feb 27 '21 07:02 alice-cool

Good news!

masonwang96 avatar Feb 27 '21 07:02 masonwang96

Hi,

I am having a problem while running the code. Please help me. This is the error I am having:

Error under config key: TRAIN
Traceback (most recent call last):
  File "./tools/generate_tsv.py", line 202, in <module>
    cfg_from_file(args.cfg_file)
  File "/home/tejan/bottom-up-attention/tools/../lib/fast_rcnn/config.py", line 290, in cfg_from_file
    _merge_a_into_b(yaml_cfg, __C)
  File "/home/tejan/bottom-up-attention/tools/../lib/fast_rcnn/config.py", line 277, in _merge_a_into_b
    _merge_a_into_b(a[k], b[k])
  File "/home/tejan/bottom-up-attention/tools/../lib/fast_rcnn/config.py", line 262, in _merge_a_into_b
    raise KeyError('{} is not a valid config key'.format(k))
KeyError: 'HAS_RPN is not a valid config key'

P.S. I m using only CPU. I don't have any GPU. Is there some change that I need to make in the code?

tejan-rgb avatar May 20 '22 05:05 tejan-rgb

hi!, could you give a share relevant prototxt about the the model

khk-abc avatar Feb 10 '23 03:02 khk-abc