xiadingZ / video-caption-openNMT.pytorch

implement video caption based on openNMT
MIT License
36 stars 12 forks source link

Fail to load video features #1

Open YapengTian opened 6 years ago

YapengTian commented 6 years ago

Thanks for sharing the code!

Following your instructions, the code fails to load video features correctly.

I created those .txt files with videoid and captionings, and used python preprocess.py -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/msrvtt/video to prepare training data. Then, I runned python train.py -model_type video -data data/msrvtt/video -save_model data/save/model -gpuid 3 -batch_size 180 -max_grad_norm 20 -dim_vid 2048 -rnn_size 1024 -optim adam -learning_rate 0.001 -epochs 250 -dropout 0.5 -global_attention mlp -encoder_type brnn. But, it fails to access to stored video features, and only return a 1x180x1 video feature.

Do I need to any modifications based your code? or I did not prepare data correctly.

Thanks

YapengTian commented 6 years ago

I have solved the above problem. But the generated train.pt is pretty large. Previously, for each caption, I added a line in the src-train.txt. It means that there will be 20 lines for each video, which enlarges the train.pt file. Could I put all captionings of each video together using one line?

Andrew-Zhu commented 6 years ago

I meet the same problem with @YapengTian ,Could you tell us how to solve it? Have you @YapengTian solved the problem?