vijayvee / video-captioning

This repository contains the code for a video captioning system inspired by Sequence to Sequence -- Video to Text. This system takes as input a video and generates a caption in English describing the video.
MIT License
165 stars 66 forks source link

computer dead when running extract_feats() #13

Open Acder777 opened 5 years ago

Acder777 commented 5 years ago

I write a main function by myself to run extract_feats(),and input required video files.But after print "VGG Network loaded",my computer becomes very slow,and no other print(My computer runs on CPU).

So I don't know if it is normal or if there's something wrong with my operation.

screenshot from 2019-01-10 11 30 29

here is my main()

if name=="main":

L = []

root = '/home/zzy/Downloads/videos'

for root, dirs, files in os.walk(root):

    for file in files:

        str = root + '/' + file

        L.append(str)

extract_feats(L,2)`

I change the code that make my computer dead to see more clearly:

       for num,frame in enumerate(vid):

        print num

        frame = skimage.transform.resize(frame,[224,224])

        if len(frame.shape)<3:

            frame = np.repeat(frame,3).reshape([224,224,3])

        curr_frames.append(frame)`

when the num become 4 thousand my computer dead.