Cogito2012 / OpenTAL

[CVPR 2022 Oral] Towards Open Set Temporal Action Localization
Other
50 stars 1 forks source link

video2npy.py for activitynet cannot read video frames. #1

Closed menghuaa closed 1 year ago

menghuaa commented 2 years ago

Hello, I am trying to extract RGB frames by following ActivityNet Readme.

However, when I run video2npy.py, it cannot read frames for some videos . In detail, VideoCapture.read() returns False while get(cv2.CAP_PROP_FRAME_COUNT) returns 770 frames. I don't know how to solve this problem. Can you help me?

Cogito2012 commented 2 years ago

With your provided information, it's hard to tell exactly the cause of the issue. You probably need to double-check 1) the input path of the video file, 2) the integrity of the video file, 3) the installation of the opencv-python package, etc.

menghuaa commented 2 years ago

根据您提供的信息,很难准确判断问题的原因。您可能需要仔细检查 1)视频文件的输入路径,2)视频文件的完整性,3)opencv-python 包的安装等。

您能给我您所有安装的包的版本吗?因为我的python和pytorch版本和您的大体上一致。

Cogito2012 commented 2 years ago

You may refer to my exported conda env file here: afsd_env.yaml.

menghuaa commented 2 years ago

您可以在这里参考我导出的 conda env 文件:afsd_env.yaml

请问您是使用cuda11.0吗?

menghuaa commented 2 years ago

您可以在这里参考我导出的 conda env 文件:afsd_env.yaml

@Cogito2012 您好,我在运行python3 AFSD/anet_data/video2npy.py THREAD_NUM生成RGB npy输入时,遇到一个问题,当采样视频的总时间超过1分钟,ret, frame = cap.read(),ret为false ,count = cap.get(cv2.CAP_PROP_FRAME_COUNT)为770。有的采样视频count为770,但是视频总时长不超过1分钟,ret是true。还有一个神奇的现象是,我把不能正确读帧的视频下载到我本地的笔记本电脑上的时候,都可以读取。

menghuaa commented 2 years ago

@Cogito2012 Hi,for activitynet1.3, is the number of RGB npy 13446?