-
Notifications
You must be signed in to change notification settings - Fork 54
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
怎么解决这个问题,多谢!先感谢分享 #7
Comments
@joyzyyz |
(base) D:\F\VideoCaption19>python videoCaption.py video10034.mp4
in_file: video10034.mp4
IMG_SIZE: (256, 192)
--processing video...
18%|█████████████████████████████████▋ |
40%|████████████████████████████████████████████████████████████████████████▊
62%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████
84%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████████████| 527/527 [00:00<00:00, 1125.99it/s]
--processing key frames...
0%| | 0/15 [00:00<?, ?it/s]D
:\F\VideoCaption19\img2txt.py:99: UserWarning: volatile was removed and now has no effect. Use
with torch.no_grad():
instead.img_feats = feat_extractor(Variable(img, volatile=True))
D:\F\VideoCaption19\model.py:60: UserWarning: volatile was removed and now has no effect. Use
with torch.no_grad():
instead.img = t.autograd.Variable(img.unsqueeze(0), volatile=True)
D:\F\VideoCaption19\utils\beam_search.py:156: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
logprobs = log_softmax(output)
D:\F\VideoCaption19\utils\beam_search.py:180: UserWarning: volatile was removed and now has no effect. Use
with torch.no_grad():
instead.input_feed = Variable(input_feed, volatile=True)
0%| | 0/15 [00:00<?, ?it/s]
Traceback (most recent call last):
File "videoCaption.py", line 121, in
video2txt(in_file)
File "videoCaption.py", line 73, in video2txt
txts += generate_txt(img, tr4s, resnet50, cap_model, opt.use_gpu)
File "D:\F\VideoCaption19\img2txt.py", line 105, in generate_txt
results = model.generate(img_feats.data[0])
File "D:\F\VideoCaption19\model.py", line 64, in generate
for sent in sentences]
File "D:\F\VideoCaption19\model.py", line 64, in
for sent in sentences]
File "D:\F\VideoCaption19\model.py", line 63, in
sentences = [' '.join([self.ix2word[idx] for idx in sent])
KeyError: tensor(51)
The text was updated successfully, but these errors were encountered: