Comments (19)
you can also try to extract frames using denseflow, by setting -s=0
from denseflow.
videos are complex. Different decoder may output different number of frames.
from denseflow.
Sorry didn't read your post carefully. Could you please post the result of ls THAT_VIDEO_FOLDER
?
from denseflow.
Thank you for your reply!
My script:
extract_opticalflow_2.txt
My video folder (ls 01_023
):
src_video_folder.txt
Output:
When I set -s=0
:
denseflow_s0.txt (The frames are only copied.)
-s=1
:
denseflow_s1.txt
from denseflow.
This is strange. I will check if there is a bug in writing flow filenames
from denseflow.
Could you please turn on verbose option -v
when extracting flow, and post the output log?
from denseflow.
The output log:
(torch17) luyue@gpu-Super-Server:~/workspace/Projects/MMDetSeg_2/OpticalFlow$ python extract_opticalflow_2.py
"/home/luyue/workspace/Projects/MMDetSeg_2/data/SHTCampus/Train/01_023", frames ≈ 1298
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 "/home/luyue/workspace/Projects/MMDetSeg_2/data/SHTCampus/Train/01_023", 1299 frames
load frames exit.
1 videos (1299 frames, 1298 tvl1 flows) processed, using 28.586s, decoding speed 45.4418fps, flow speed 45.4068fps
Finished!
from denseflow.
hmm, nothing wrong.
could you pls reduce the number of frames into 600, and check if the remaining 80 are lost?
from denseflow.
I still got 600 pairs of flow images.
ls
video_dir:
src_600_01023.txt
ls
flow_dir:
flow_600_01023.txt
from denseflow.
Try to make a list of 2000 frames, and see if it fails on the 3rd batch
from denseflow.
I find that the frames are not clear so I extract the frames of the raw video again. The old frames are extracted by ffmpeg
command. The new frames are extracted by opencv
and I set the IMWRITE_JPEG_QUALITY=100
. Old frames have been deleted.
I extract optical flow images for the new frames, and it doesn't fails.
"/home/luyue/workspace/Projects/MMDetSeg_2/data/SHTCampus/Train/2000_01023", frames ≈ 2000
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 512
push frames gray, video_flow_idx 1535, batch_size 465
loaded video "/home/luyue/workspace/Projects/MMDetSeg_2/data/SHTCampus/Train/2000_01023", 2001 frames
load frames exit.
1 videos (2001 frames, 2000 tvl1 flows) processed, using 49.935s, decoding speed 40.0721fps, flow speed 40.0521fps
I checked the output dir and got 2000 pairs of flow images.
Then I extracted optical flow for the original 1298 frames video. I got 1298 pairs of flow images. It seems correct... I cannot repeat my 'bug' now.
I don't know why. However, denseflow
works. Thanks for your help.
from denseflow.
Actually you can extract frames using denseflow, with the -s=0
option, as mentioned before.
Anyway, good to hear that the problem has gone.
from denseflow.
I'm sorry for that I misunderstood what you said about -s=0
. Thanks again.
from denseflow.
Hi,
I encounter a very similar issue. I have 11588 jpg frames in my folder, but only got 11263 pairs of flow. Tried extract frames by setting -s=0
, and run denseflow again but it didn't help. I have other folders with more than 20000 frames and it works fine with denseflow.
from denseflow.
denseflow_s1.txt
Please see the log attached. Seems like the last batch was not saved.
from denseflow.
Okay the log says 1 videos (11588 frames, 11587 tvl1 flows) processed
from denseflow.
Okay the log says
1 videos (11588 frames, 11587 tvl1 flows) processed
Thanks for the reply. I'm attaching the screenshot showing file counts as well. Only 11263 pairs of flow are saved.
from denseflow.
Is it possible to share the video file?
from denseflow.
Is it possible to share the video file?
Absolutely! I use ffmpeg to extract the frames in 24 fps.
ffmpeg -i test/video_test_0000007.mp4 -r 24 ./0007/%07d.jpg
https://user-images.githubusercontent.com/16619342/151222045-388f03b9-eafa-42de-8edf-d375c4565f38.mp4
from denseflow.
Related Issues (20)
- what the -v(verbose) mean?? HOT 1
- Encountered similar issue #33 HOT 1
- Issue running denseflow with docker HOT 4
- make -j error after open-cv with CUDA is installed HOT 2
- FPS in denseflow HOT 1
- Docker image not saving in h5 HOT 2
- Segmentation fault (core dumped) when few video frames HOT 7
- Unable to install opencv with cuda getting the error HOT 1
- opencv/modules/core/src/parallel.cpp:103:14: fatal error: tbb/tbb_stddef.h: No such file or directory
- how to add denseflow to PATH HOT 4
- Segmentation fault core dump HOT 1
- Timecode frame rate 23/1 not supported
- problem with command denseflow
- -o param(output dir) not working
- Is this repo still actively maintained? HOT 1
- denseflow多线程处理速度比单线程慢得多 HOT 2
- CMAKE ERROR HOT 2
- denseflow cannot extract frames of video HOT 1
- The last batch seems to be dropped when extracting flows. HOT 2
- make -j unrecognized ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denseflow.