-
Notifications
You must be signed in to change notification settings - Fork 59
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
When the video length is more than 1024 frames, only 1023 pairs of optical flow images can be extracted? #33
Comments
you can also try to extract frames using denseflow, by setting -s=0 |
videos are complex. Different decoder may output different number of frames. |
Sorry didn't read your post carefully. Could you please post the result of |
Thank you for your reply! My script: My video folder ( Output: |
This is strange. I will check if there is a bug in writing flow filenames |
Could you please turn on verbose option |
The output log:
|
hmm, nothing wrong. could you pls reduce the number of frames into 600, and check if the remaining 80 are lost? |
I still got 600 pairs of flow images. |
Try to make a list of 2000 frames, and see if it fails on the 3rd batch |
I find that the frames are not clear so I extract the frames of the raw video again. The old frames are extracted by I extract optical flow images for the new frames, and it doesn't fails.
I checked the output dir and got 2000 pairs of flow images. |
Actually you can extract frames using denseflow, with the Anyway, good to hear that the problem has gone. |
I'm sorry for that I misunderstood what you said about |
Hi, |
denseflow_s1.txt |
Okay the log says |
Is it possible to share the video file? |
Absolutely! I use ffmpeg to extract the frames in 24 fps. |
When I calculated the optical flow for a folder containing 1298 frames, I only got 1023 pairs of optical flow images. For other folders with more than 1024 frames, only 1023 pairs of optical flow images can be obtained at most.
I use
os.system(cmd_line)
in the python script, wherecmd_line
is:f"denseflow {video_dir_path} -b={dfparm_d} -a={dfparm_a} -s=1 -if -v"
.dfparm_d = 20
anddfparm_a='tvl1'
.video_dir_path
is the folder path of the frames.For the folders which contain less than 1024 frames, I got all the optical flow images. However, when I calculated the optical flow for a folder containing 1298 frames, the output information is:
push frames gray, video_flow_idx 0, batch_size 512
push frames gray, video_flow_idx 511, batch_size 512
push frames gray, video_flow_idx 1023, batch_size 275
loaded video "**path**/01_023", 1299 frames load frames exit.
1 videos (1299 frames, 1298 tvl1 flows) processed, using 28.739s, decoding speed 45.1999fps, flow speed 45.1651fps
In
my video_dir_path
, the file name of the frames are0001.jpg
...1298.jpg
. In theoutput_dir
(I havecd
into it so that the optical flow images are output to it), the file names areflow_x_00000.jpg
...flow_x_01022.jpg
, andflow_y_00000.jpg
...flow_y_01022.jpg
. Also, the output information(1299 frames, 1298 tvl1 flows)
are not consistent with the frames and flows.Is that a bug or my fault? Thanks!
The text was updated successfully, but these errors were encountered: