video-classification-3d-cnn-pytorch icon indicating copy to clipboard operation
video-classification-3d-cnn-pytorch copied to clipboard

Indexing in generate_result_video.py

Open Newbeeyoung opened this issue 6 years ago • 7 comments

Hi,

Thanks a lot for the nice program.

I have went through the whole program and it worked well. However, i found that there may be some mistake of indexing in your code.

In generate_result_video.py:

       n_elements = min(unit, len(clips) - i)
        scores = np.array(clips[i]['scores'])
        for j in range(i, min(i + unit, len(clips))):
            scores += np.array(clips[i]['scores'])
        scores /= n_elements

Should this scores be set to 0 initially? and change clips[i] to clips[j] in the loop? Since you are averaging the scores during unit time.

Newbeeyoung avatar Aug 16 '18 05:08 Newbeeyoung

Hello, can you please explain what the generate_result_video do? I ran it and it just duplicated the tested videos into another folder.

Mohamad73 avatar Aug 29 '18 15:08 Mohamad73

It just labels video based on output.json. A rectangle label will be shown at the left upper corner in the result video. @Mohamad73

Newbeeyoung avatar Aug 30 '18 03:08 Newbeeyoung

@Newbeeyoung Thank you!!!!!!!!!

Mohamad73 avatar Aug 30 '18 07:08 Mohamad73

Could you please explain how the generate_result_video file runs? I tried to run this file but failed, and my output.json file is empty. thanks!

lyuanzhang avatar Apr 10 '19 10:04 lyuanzhang

Could you please explain how the generate_result_video file runs? I tried to run this file but failed, and my output.json file is empty. thanks!

Do you know how the generate_result_video file runs? thank you

XianyuFFF avatar Sep 20 '19 12:09 XianyuFFF

Did you get your answer? I'm having some trouble running generate_result_video.py.

Some of the errors I get:

1. 'rm' is not recognized as an internal or external command,
2. ../videos\: No such file or directory
3. ValueError: could not convert string to float: 'er'

shadsakib avatar Dec 31 '19 13:12 shadsakib

I also got the error KeyError: 'scores' How to fix it?

87nohigher avatar May 28 '21 15:05 87nohigher