OpenNMT / OpenNMT-py

Open Source Neural Machine Translation and (Large) Language Models in PyTorch
https://opennmt.net/
MIT License
6.77k stars 2.25k forks source link

'pretrainedmodels' not found in 'tools/vid_feature_extractor.py' #1562

Closed leobxpan closed 5 years ago

leobxpan commented 5 years ago

Hi, for the tools/vid_feature_extractor.py for video feature extraction a module pretrainedmodels it's importing cannot be found. Thanks.

francoishernandez commented 5 years ago

@flauted is this something that should have been added in #1409 ?

flauted commented 5 years ago

I actually think the import might be unused but: https://github.com/Cadene/pretrained-models.pytorch You can pip install pretrainedmodels

leobxpan commented 5 years ago

thanks. it's actually used as pretrainedmodels.resnet152 is used as feature extractor in your script.

leobxpan commented 5 years ago

Hi @flauted, thanks for contributing to the captioning! I also raised a new issue regarding this, but I'm wondering what kind of input file (also file format) should I provide to translate.py if I wanna use it for beam search decoding for my customized video captioning model (the captioning module of which is a transformer)? Thanks!

flauted commented 5 years ago

I believe the full question is on #1565.

You can leave this open because pretrainedmodels should be listed in the requirements opt file. I'm short on time right now, so if you have free time it would be awesome if you could contribute a PR adding that line to the requirements file.

leobxpan commented 5 years ago

Sure. added and PR submitted. I'm closing this issue. Thanks.