Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About pretrained models to generate 36 per image feature #87

Open
masonwang96 opened this issue Apr 21, 2020 · 11 comments
Open

About pretrained models to generate 36 per image feature #87

masonwang96 opened this issue Apr 21, 2020 · 11 comments

Comments

@masonwang96
Copy link

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
Copy link
Author

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

@nyj-ocean
Copy link

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

@masonwang96
Copy link
Author

@alice-cool
Copy link

alice-cool commented Feb 27, 2021

#87 (comment)

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.

@masonwang96
Copy link
Author

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
Copy link
Author

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

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

@alice-cool
Copy link

alice-cool commented Feb 27, 2021 via email

@alice-cool
Copy link

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

@masonwang96
Copy link
Author

Good news!

@tejan-rgb
Copy link

tejan-rgb commented May 20, 2022

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?

@khk-abc
Copy link

khk-abc commented Feb 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants