open-mmlab / denseflow Goto Github PK
View Code? Open in Web Editor NEWExtracting optical flow and frames
Home Page: https://open-mmlab.github.io/
License: MIT License
Extracting optical flow and frames
Home Page: https://open-mmlab.github.io/
License: MIT License
CMake Error at CMakeLists.txt:67 (install):
install TARGETS given no ARCHIVE DESTINATION for static library target
"zzdenseflow".
-- Configuring incomplete, errors occurred!
I'm sorry. But it's hard for me to find out where the static library target "zzdenseflow" is!
https://github.com/open-mmlab/denseflow/blob/master/INSTALL.md
when I ran ./zzdenseflow.sh, I got
CMake Error at CMakeLists.txt:67 (install):
install TARGETS given no ARCHIVE DESTINATION for static library target
"zzdenseflow".
when I read CMakeFiles/CMakeError.log, I got
/usr/bin/cc -fPIC CMakeFiles/cmTC_b7f79.dir/CheckSymbolExists.c.o -o cmTC_b7f79
CMakeFiles/cmTC_b7f79.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x1b): undefined reference to
pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_b7f79.dir/build.make:86: recipe for target 'cmTC_b7f79' failed
This project requires opencv-cuda, that is not standard.
So, Dockerfile will be usefull.
export PATH=$ZZROOT/bin:$PATH
export LD_LIBRARY_PATH=$ZZROOT/lib:$ZZROOT/lib64:$LD_LIBRARY_PATH
Without them zzlibx24.sh fails.
@lindahua Hello! When I was using ./zzlibx264.sh, some problems happened as the photo:
I have follow the rules and run ./zznasm.sh before. What should I do?
Hoping for your reply!
Hello author! I downloaded denseflow through your link, and an exception was thrown when using “denseflow videolist.txt -s=0 -v”:
"/home/developers/xianyun/anaconda3/envs/pt/lib/python3.6/site-packages/denseflow/build/video0.avi", frames ≈ 300
Segmentation fault (core dumped).
When I extract a single video frame, run “denseflow test.avi -b=20 -a=tvl1 -s=1 -v”:
"video0.avi", frames ≈ 300
push frames gray, video_flow_idx 0, batch_size 300
loaded video "video0.avi", 300 frames
load frames exit.
Segmentation fault (core dumped)
I tried to change many avi files, but still failed with the same error.
The followings are the Installation process:
(pt) xianyun@zhangd3:/home/developers/xianyun/anaconda3/envs/pt/lib/python3.6/site-packages/denseflow/build$ cmake -DCMAKE_INSTALL_PREFIX=/home/develoDF5=no -DUSE_NVFLOW=no ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-9.0 (found version "9.0")
-- Found OpenCV: /home/developers/xianyun/anaconda3/envs/pt (found version "3.4.10")
-- OpenCV library status:
-- config: /home/developers/xianyun/anaconda3/envs/pt/share/OpenCV
-- version: 3.4.10
-- libraries: opencv_calib3d;opencv_core;opencv_cudaarithm;opencv_cudabgsegm;opencv_cudacodec;opencv_cudafeatures2d;opencv_cudafilters;opencv_cudabjdetect;opencv_cudaoptflow;opencv_cudastereo;opencv_cudawarping;opencv_cudev;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_aruco;opencv_bgsegm;opencv_bioinsencv_dnn_objdetect;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img
-- libraries: /usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so
-- include path: /usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/developers/xianyun/anaconda3/envs/pt/lib/python3.6/site-packages/denseflow/build
(pt) xianyun@zhangd3:/home/developers/xianyun/anaconda3/envs/pt/lib/python3.6/site-packages/denseflow/build$ make -j
[ 16%] Building CXX object CMakeFiles/zzdenseflow.dir/src/common.cpp.o
[ 33%] Building CXX object CMakeFiles/zzdenseflow.dir/src/denseflow_gpu.cpp.o
[ 50%] Building CXX object CMakeFiles/zzdenseflow.dir/src/utils.cpp.o
[ 66%] Linking CXX static library libzzdenseflow.a
[ 66%] Built target zzdenseflow
[ 83%] Building CXX object CMakeFiles/denseflow.dir/tools/denseflow.cpp.o
[100%] Linking CXX executable denseflow
[100%] Built target denseflow
(pt) xianyun@zhangd3:/home/developers/xianyun/anaconda3/envs/pt/lib/python3.6/site-packages/denseflow/build$ make install
Consolidate compiler generated dependencies of target zzdenseflow
[ 66%] Built target zzdenseflow
Consolidate compiler generated dependencies of target denseflow
[100%] Built target denseflow
Install the project...
-- Install configuration: ""
-- Installing: /home/developers/xianyun/anaconda3/envs/pt/bin/denseflow
-- Set runtime path of "/home/developers/xianyun/anaconda3/envs/pt/bin/denseflow" to ""
-- Installing: /home/developers/xianyun/anaconda3/envs/pt/lib/libzzdenseflow.a
Please give me some advice, thank you!
how to extract optical flow of a list of videos
denseflow test.txt -b=20 -a=tvl1 -s=1 --saveType=jpg -v
" does not exist!
check init param error.
how to extract RGB frames
denseflow test1.avi -s=0 -v
"test1.avi", frames ≈ 312
extracted frames of video "test1.avi", 312 frames
1 videos (312 frames, 0 tvl1 flows) processed, using 0.858s, decoding speed 363.636fps, flow speed 0fps
Running denseflow using the mmaction 'rawframes.py' script works for the RGB extraction but fails when tryign to extract flow images, throwing the following error:
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.2.0) /home/******/opencv-4.2.0/modules/core/src/cuda_host_mem.cpp:95: error: (-217:Gpu API call) out of memory in function 'allocate'
I only use 1 gpu (eGPU), but set it as such when calling script:
python build_rawframes.py /mnt/d/Data/ava/videos_15min/ /mnt/d/Data/ava/rawframes/ --task flow --level 1 --mixed-ext --flow-type tvl1 --num-gpu 1 --resume
Any ideas?
Hi @innerlee , I follow your instruction to install denseflow, but there is a strange error when I run ./zzdenseflow.sh
denseflow will be installed in /home/liming/app
Dependency: boost, opencv
downloads/denseflow.tar.gz exist
CMake Error at CMakeLists.txt:19 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/home/liming/app/src/denseflow/build/CMakeFiles/CMakeOutput.log".
See also "/home/liming/app/src/denseflow/build/CMakeFiles/CMakeError.log"
I ran the scripts in INSTALL.md, but encountered the following error:
/home/username/app/src/denseflow/src/denseflow_gpu.cpp:2:10: fatal error: opencv2/cudaarithm.hpp: No such file or directory
2 | #include "opencv2/cudaarithm.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/zzdenseflow.dir/build.make:89: CMakeFiles/zzdenseflow.dir/src/denseflow_gpu.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/zzdenseflow.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Following #22, I tried to add ZZROOT=$HOME/app to PATH and $ZZROOT/lib to LD_LIBRARY_PATH, but the error persists.
All the requirements were successfully installed and there is no error occurred.
However, when I use denseflow to extract frames from videos, specifically the HMDB-51 datasets, such error appears:
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/run/Two_Towers_1_run_f_cm_np2_fr_med_4"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/situp/Personal_Training_Workout_Tips_situp_f_nm_np1_le_goo_1"
both 230 run/Two_Towers_1_run_f_cm_np2_fr_med_4.avi tvl1 done
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/talk/Prelinger_FamilyLi1949_talk_h_nm_np1_fr_goo_15"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/hit/Schnaaper_Crew__Eisbaden_(2007)hit_f_cm_np1_le_bad_3"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/flic_flac/Acrobacias_de_un_fenomeno_flic_flac_f_cm_np1_fr_bad_1"
both 442 situp/Personal_Training_Workout_Tips_situp_f_nm_np1_le_goo_1.avi tvl1 done
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/somersault/Dive_and_roll_compilation(Parkour)somersault_f_cm_np1_fr_bad_0"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/swing_baseball/BaseballSwingAnalysis_swing_baseball_f_nm_np1_fr_med_8"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/wave/CharlieAndTheChocolateFactory_wave_u_nm_np1_fr_med_2"
both 1502 somersault/Dive_and_roll_compilation(Parkour)somersault_f_cm_np1_fr_bad_0.avi tvl1 done
both 18 swing_baseball/BaseballSwingAnalysis_swing_baseball_f_nm_np1_fr_med_8.avi tvl1 done
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/run/THE_PROTECTOR_run_f_cm_np1_le_med_15"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/situp/6_Minute_Abs_Routine_situp_f_nm_np2_le_bad_1"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/talk/Prelinger_FamilyLi1949_talk_h_nm_np1_fr_goo_15"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/flic_flac/Acrobacias_de_un_fenomeno_flic_flac_f_cm_np1_fr_bad_1"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/hit/Schnaaper_Crew__Eisbaden(2007)hit_f_cm_np1_le_bad_3"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/swing_baseball/practicingmybaseballswing2009_swing_baseball_f_cm_np1_fr_med_19"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/somersault/Handstandk_nig_somersault_f_cm_np1_ba_med_5"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/wave/CharlieAndTheChocolateFactory_wave_u_nm_np1_fr_med_2"
both 653 flic_flac/Acrobacias_de_un_fenomeno_flic_flac_f_cm_np1_fr_bad_1.avi tvl1 done
both 867 hit/Schnaaper_Crew__Eisbaden(2007)_hit_f_cm_np1_le_bad_3.avi tvl1 done
both 1078 talk/Prelinger_FamilyLi1949_talk_h_nm_np1_fr_goo_15.avi tvl1 done
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/run/THE_PROTECTOR_run_f_cm_np1_le_med_15"
boost::filesystem::create_directories: Function not implemented: "../../data/hmdb51/rawframes/situp/6_Minute_Abs_Routine_situp_f_nm_np2_le_bad_1"
Raw frames (RGB and Flow) Generated
Wait for help and great thanks to you.
The current one seems to be expired.
Shall we switch to the bitbucket one? Seems to be more reliable: https://bitbucket.org/multicoreware/x265_git/downloads/
They only have 3.5 however
any colab version?
Saving to: 'libx264.tar.gz'
[ <=> ] 932,833 5.60MB/s in 0.2s
2020-07-19 21:31:35 (5.60 MB/s) - 'libx264.tar.gz' saved [932833]
Found no assembler
Minimum version is nasm-2.13
If you really want to compile without asm, configure with --disable-asm.
What should be the course of action here?
I noticed that when save type is set to 'png', each optical flow frame is saved in one png image. But:
I use denseflow to computer tvl1 with images, i.e. enable "input-frames" argument. The process always gets killed by my system:
No flow images generated after a few hours. Is there any way to limit the burden from denseflow so it won't be killed by the system?
By the way, according to the info from "nvidia-smi", there are lots of free space in GPU. Actually, it seems that only one of two GPUs has been used for denseflow, can I set the gpu number for denseflow?
how to extract optical flow of a list of videos
denseflow test.txt -b=20 -a=tvl1 -s=1 --saveType=jpg -v
" does not exist!
check init param error.
how to extract RGB frames
denseflow test1.avi -s=0 -v
"test1.avi", frames ≈ 312
extracted frames of video "test1.avi", 312 frames
1 videos (312 frames, 0 tvl1 flows) processed, using 0.858s, decoding speed 363.636fps, flow speed 0fps
Hi, How to make the extracted RGB and flow frame number the same?
Hi,
I run
sh zzautoconf.sh
but failed with the following info:
autoconf will be installed in /home/visual/app
Dependency: m4, perl
downloads/autoconf.tar.gz exist
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
configure: autobuild project... GNU Autoconf
configure: autobuild revision... 2.69
configure: autobuild hostname... hkgpuserver06
configure: autobuild timestamp... 20201127T042934Z
checking whether /bin/sh -n is known to work... no
checking for characters that cannot appear in file names... none
checking whether directories can have trailing spaces... yes
checking for expr... /usr/bin/expr
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zhai/app/src/opencv/build
[ 0%] Built target gen-pkgconfig
[ 0%] Built target quirc
[ 2%] Built target zlib
[ 2%] Built target ittnotify
[ 5%] Built target libjasper
[ 9%] Built target libjpeg-turbo
[ 9%] Built target opencv_videoio_plugins
[ 9%] Building CXX object modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o
[ 10%] Built target ade
[ 11%] Built target libpng
[ 14%] Built target libtiff
[ 23%] Built target libwebp
c++: error: unrecognized command line option ‘-Wimplicit-fallthrough=3’; did you mean ‘-Wno-fallthrough’?
modules/cudev/CMakeFiles/opencv_cudev.dir/build.make:81: recipe for target 'modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o' failed
make[2]: *** [modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o] Error 1
CMakeFiles/Makefile2:3665: recipe for target 'modules/cudev/CMakeFiles/opencv_cudev.dir/all' failed
make[1]: *** [modules/cudev/CMakeFiles/opencv_cudev.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 29%] Built target libprotobuf
[ 37%] Built target IlmImf
Makefile:181: recipe for target 'all' failed
make: *** [all] Error 2
opencv installed on /home/zhai/app
add following line to .zshrc
export OpenCV_DIR=/home/zhai/app
I am wondering whether my opencv was installed successfully, is there any script to check it?
Anyway, i caught this following error while making denseflow:
denseflow will be installed in /home/caomengqi/app
Dependency: boost, opencv
downloads/denseflow.tar.gz exist
-- OpenCV library status:
-- config: /home/caomengqi/app/lib/cmake/opencv4
-- version: 4.3.0
-- libraries: opencv_calib3d;opencv_core;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_cudaarithm;opencv_cudabgsegm;opencv_cudafeatures2d;opencv_cudafilters;opencv_cudaimgproc;opencv_cudalegacy;opencv_cudaobjdetect;opencv_cudaoptflow;opencv_cudastereo;opencv_cudawarping;opencv_cudev;opencv_fuzzy;opencv_hfs;opencv_img_hash;opencv_intensity_transform;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_quality;opencv_rapid;opencv_shape;opencv_structured_light;opencv_superres;opencv_surface_matching;opencv_videostab;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
-- include path: /home/caomengqi/app/include/opencv4
-- Boost found.
-- Found Boost components:
date_time;filesystem;iostreams
-- Boost library status:
-- version: 1.76.0
-- libraries: Boost::date_time;Boost::filesystem;Boost::iostreams
-- include path: /home/caomengqi/app/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/caomengqi/app/src/denseflow/build
[ 66%] Built target zzdenseflow
[ 83%] Linking CXX executable denseflow
/home/caomengqi/app/lib/libopencv_core.a(parallel.cpp.o): In function `cv::parallel_for_impl(cv::Range const&, cv::ParallelLoopBody const&, double) [clone ._omp_fn.0]':
parallel.cpp:(.text._ZN2cvL17parallel_for_implERKNS_5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x56): undefined reference to `GOMP_loop_dynamic_start'
parallel.cpp:(.text._ZN2cvL17parallel_for_implERKNS_5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x1d3): undefined reference to `GOMP_loop_dynamic_next'
parallel.cpp:(.text._ZN2cvL17parallel_for_implERKNS_5RangeERKNS_16ParallelLoopBodyEd._omp_fn.0+0x1e0): undefined reference to `GOMP_loop_end_nowait'
/home/caomengqi/app/lib/libopencv_core.a(parallel.cpp.o): In function `cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double)':
parallel.cpp:(.text._ZN2cv13parallel_for_ERKNS_5RangeERKNS_16ParallelLoopBodyEd+0x271): undefined reference to `GOMP_parallel'
/home/caomengqi/app/lib/libopencv_core.a(parallel.cpp.o): In function `cv::getThreadNum()':
parallel.cpp:(.text._ZN2cv12getThreadNumEv+0x1): undefined reference to `omp_get_thread_num'
/home/caomengqi/app/lib/libopencv_core.a(parallel.cpp.o): In function `cvGetThreadNum':
parallel.cpp:(.text.cvGetThreadNum+0x1): undefined reference to `omp_get_thread_num'
/home/caomengqi/app/lib/libopencv_core.a(parallel.cpp.o): In function `_GLOBAL__sub_I_parallel.cpp':
parallel.cpp:(.text.startup._GLOBAL__sub_I_parallel.cpp+0x28): undefined reference to `omp_get_max_threads'
parallel.cpp:(.text.startup._GLOBAL__sub_I_parallel.cpp+0x43): undefined reference to `omp_set_dynamic'
collect2: error: ld returned 1 exit status
CMakeFiles/denseflow.dir/build.make:145: recipe for target 'denseflow' failed
make[2]: *** [denseflow] Error 1
CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/denseflow.dir/all' failed
make[1]: *** [CMakeFiles/denseflow.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
denseflow installed on /home/caomengqi/app
I am facing error while compilation. Tried to fix several ways and unsuccessful.
Can you hint me which flag needed to add to fix this in CMAKE?
CMake Error at CMakeLists.txt:36 (add_library):
Target "zzdenseflow" links to target "Eigen3::Eigen" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
image type restrict to ".jpg" when using frames input, could add ".jpeg" ".png" etc.
...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-5.4.0/release/link-static/python-3.7/threading-multi/visibility-hidden/numpy/ndarray.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-5.4.0/release/link-static/python-3.7/threading-multi/visibility-hidden/numpy/numpy.o
In file included from ./boost/python/detail/prefix.hpp:13:0,
from ./boost/python/args.hpp:8,
from ./boost/python.hpp:11,
from ./boost/python/numpy/internal.hpp:17,
from libs/python/src/numpy/numpy.cpp:8:
./boost/python/detail/wrap_python.hpp:57:23: fatal error: pyconfig.h: 没有那个文件或目录
compilation terminated.
当执行./zzffmpeg.sh时,提示nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.,但是nasm和yasm已经安装了,这是什么原因内,也尝试了更新nasm和yasm的版本。还是出现这个错误。
cannot open video_path stream:/home/liding/project/temporal_action_detection/mmaction2/data/thumos14/videos/val/video_validation_0000033.mp4 cannot open video_path stream:/home/liding/project/temporal_action_detection/mmaction2/data/thumos14/videos/val/video_validation_0000592.mp4 cannot open video_path stream:/home/liding/project/temporal_action_detection/mmaction2/data/thumos14/videos/val/video_validation_0000230.mp4 cannot open video_path stream:/home/liding/project/temporal_action_detection/mmaction2/data/thumos14/videos/val/video_validation_0000395.mp4 cannot open video_path stream:/home/liding/project/temporal_action_detection/mmaction2/data/thumos14/videos/val/video_validation_0000238.mp4
Thanks for your great work. When running denseflow, I came across a bug like this, which results in error of openning video stream. Could you help me out?
Thanks again.
After an denseflow iteruption, I want to resume my denseflow work for extracting optical-flow for folder videos but skip done videos. I notice that there is a --force argument which can control if skip marked as .done videos. While I cannot find any generated folder or file named as 'done' in output dir or source_dir.
Is it OK to run the same command to resume my work, will it skip done videos? Where can I find .done folder and can I manually edit it?
Hey, I have installed denseflow in my local directory on the EBS following the steps in this link:
https://github.com/open-mmlab/denseflow/blob/master/INSTALL.md
When I ran the following command:
/scratch/shubham/packages/denseflow/bin/denseflow /scratch/schubham/packages/denseflow/VID_2021-01622167693258.mp4 -b=20 -a=tvl1 -s=1 -v
,
on my EC2 instance I got an error like this:
To rectify this error, I ran the following code to add the library into denseflow's path:
But after that when I tried to run the same command, I'm getting an error like this:
Does anyone know how I can rectify this?
PFH my bash script I used to install denseflow:
`# ZZROOT is the root dir of all the installation
export ZZROOT=$PWD
export PATH=$ZZROOT/bin:$PATH
export LD_LIBRARY_PATH=$ZZROOT/lib:$ZZROOT/lib64:$LD_LIBRARY_PATH
git clone https://github.com/innerlee/setup.git
cd setup
./zznasm.sh
./zzyasm.sh
./zzlibx264.sh
./zzlibx265.sh
./zzlibvpx.sh
./zzffmpeg.sh
./zzopencv.sh
export OpenCV_DIR=$ZZROOT
./zzboost.sh
export BOOST_ROOT=$ZZROOT
./zzdenseflow.sh`
This code is the same as the one on URL I've referenced, except that I changed ZZROOT from ZZROOT = $HOME/app
to ZZROOT = $PWD
and I didn't install HDF5.
EDIT: The code is running if I don't specify the -b flag.
How to reproduce:
Result:
"0001884_000000_20211110-112512_1025h_1_0_3.966666666666667_angle-11", frames ≈ 31
push frames gray, video_flow_idx 0, batch_size 31
loaded video "0001884_000000_20211110-112512_1025h_1_0_3.966666666666667_angle-11", 31 frames
load frames exit.
1 videos (31 frames, 30 tvl1 flows) processed, using 48.381s, decoding speed 0.640747fps, flow speed 0.620078fps
But no flowXXX files created.
Hi,
thanks for this wonderful work! I am wondering how can I compute backward optical flow using denseflow? e.g. optical flow from t+1 to t.
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, where cmd_line
is:
f"denseflow {video_dir_path} -b={dfparm_d} -a={dfparm_a} -s=1 -if -v"
. dfparm_d = 20
and dfparm_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 are 0001.jpg
... 1298.jpg
. In the output_dir
(I have cd
into it so that the optical flow images are output to it), the file names are flow_x_00000.jpg
...flow_x_01022.jpg
, and flow_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!
I tried to re-implement https://arxiv.org/pdf/2004.06704.pdf Figure 5 using code of https://github.com/open-mmlab/mmcv/blob/master/mmcv/visualization/optflow.py, however, default settings give me the single color.
libdenseflow.a(dense_flow_gpu.cpp.o): In function calcDenseFlowPureGPU(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, int, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&)': dense_flow_gpu.cpp:(.text+0x1b61): undefined reference to
cv::cudacodec::createVideoReader(cv::String const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/extract_gpu.dir/build.make:154: recipe for target 'extract_gpu' failed
make[2]: *** [extract_gpu] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/extract_gpu.dir/all' failed
make[1]: *** [CMakeFiles/extract_gpu.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 90%] Built target extract_warp_gpu
[100%] Linking CXX shared library libpydenseflow.so
[100%] Built target pydenseflow
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
while trying to install denseflow I got the following error
`denseflow will be installed in /home/rick/app
Dependency: boost, opencv
downloads/denseflow.tar.gz exist
CMake Error at /usr/local/share/cmake-3.13/Modules/FindCUDA.cmake:696 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:18 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/rick/app/src/denseflow/build/CMakeFiles/CMakeOutput.log".
`
All the previous steps were successfull I have nvidia driver and cuda installed
`(base) rick@rick-MS-7881:~/setup$ nvidia-smi
Sat Oct 9 09:07:51 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.84 Driver Version: 460.84 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 RTX A5000 Off | 00000000:02:00.0 On | Off |
| 30% 34C P8 13W / 230W | 365MiB / 24253MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1392 G /usr/lib/xorg/Xorg 213MiB |
| 0 N/A N/A 1621 G /usr/bin/gnome-shell 113MiB |
| 0 N/A N/A 11861 G /usr/lib/firefox/firefox 3MiB |
| 0 N/A N/A 16948 G /usr/lib/firefox/firefox 3MiB |
| 0 N/A N/A 17015 G /usr/lib/firefox/firefox 27MiB |
+-----------------------------------------------------------------------------+
`
Please advice
Hi,
I installed OpenCV with CUDA from source and then cloned the denseflow repository to install denseflow as mentioned in the README:
cmake -DCMAKE_INSTALL_PREFIX=$HOME/app -DUSE_HDF5=no -DUSE_NVFLOW=no ..
However, I am getting the following CMake Error:
`-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "11.0")
-- Found OpenCV: /usr/local (found version "4.5.3")
-- OpenCV library status:
-- config: /usr/local/lib/cmake/opencv4
-- version: 4.5.3
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_aruco;opencv_barcode;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_cudaarithm;opencv_cudabgsegm;opencv_cudacodec;opencv_cudafeatures2d;opencv_cudafilters;opencv_cudaimgproc;opencv_cudalegacy;opencv_cudaobjdetect;opencv_cudaoptflow;opencv_cudastereo;opencv_cudawarping;opencv_cudev;opencv_datasets;opencv_dnn_objdetect;opencv_dnn_superres;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img_hash;opencv_intensity_transform;opencv_line_descriptor;opencv_mcc;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_quality;opencv_rapid;opencv_reg;opencv_rgbd;opencv_saliency;opencv_shape;opencv_stereo;opencv_structured_light;opencv_superres;opencv_surface_matching;opencv_text;opencv_tracking;opencv_videostab;opencv_wechat_qrcode;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
-- include path: /usr/local/include/opencv4
-- Boost found.
-- Found Boost components:
date_time;filesystem;iostreams
-- Boost library status:
-- version: 1.76.0
-- libraries: Boost::date_time;Boost::filesystem;Boost::iostreams
-- include path: /root/app/include
-- Configuring done
CMake Error at CMakeLists.txt:64 (add_executable):
Target "denseflow" links to target "Iconv::Iconv" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:35 (add_library):
Target "zzdenseflow" links to target "Iconv::Iconv" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
-- Generating done
-- Build files have been written to: /content/denseflow/build`
Can you please guide me through the solution for this?
Thanks,
Lakshay.
make -j步骤出现如下错误:
(open-mmlab) uk@uk-X299-WU8:~/Workspaces/denseflow/build$ make -j
Scanning dependencies of target zzdenseflow
[ 16%] Building CXX object CMakeFiles/zzdenseflow.dir/src/common.cpp.o
[ 33%] Building CXX object CMakeFiles/zzdenseflow.dir/src/utils.cpp.o
[ 50%] Building CXX object CMakeFiles/zzdenseflow.dir/src/denseflow_gpu.cpp.o
[ 66%] Linking CXX static library libzzdenseflow.a
[ 66%] Built target zzdenseflow
Scanning dependencies of target denseflow
[ 83%] Building CXX object CMakeFiles/denseflow.dir/tools/denseflow.cpp.o
[100%] Linking CXX executable denseflow
libzzdenseflow.a(denseflow_gpu.cpp.o):在函数‘DenseFlow::calc_optflows_imp(FlowBuffer const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, cv::cuda::Stream&)’中:
denseflow_gpu.cpp:(.text+0x296b):对‘cv::cuda::OpticalFlowDual_TVL1::create(double, double, double, int, int, double, int, double, double, bool)’未定义的引用
denseflow_gpu.cpp:(.text+0x2a08):对‘cv::cuda::FarnebackOpticalFlow::create(int, double, bool, int, int, int, double, int)’未定义的引用
denseflow_gpu.cpp:(.text+0x2a9f):对‘cv::cuda::BroxOpticalFlow::create(double, double, double, int, int, int)’未定义的引用
/home/uk/anaconda3/lib/libharfbuzz.so.0:对‘FT_Done_MM_Var’未定义的引用
//lib/x86_64-linux-gnu/libblkid.so.1:对‘uuid_unparse@UUID_1.0’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/denseflow.dir/build.make:174: recipe for target 'denseflow' failed
make[2]: *** [denseflow] Error 1
CMakeFiles/Makefile2:123: recipe for target 'CMakeFiles/denseflow.dir/all' failed
make[1]: *** [CMakeFiles/denseflow.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
cmake 步骤正常:
(open-mmlab) uk@uk-X299-WU8:~/Workspaces/denseflow/build$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/app -DUSE_HDF5=no -DUSE_NVFLOW=no ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-10.0 (found version "10.0")
-- Found OpenCV: /usr/local (found version "4.4.0")
-- OpenCV library status:
-- config: /usr/local/lib/cmake/opencv4
-- version: 4.4.0
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
-- include path: /usr/local/include/opencv4
-- Found Boost: /usr/include (found version "1.65.1") found components: date_time filesystem iostreams system regex
-- Boost library status:
-- version: 106501
-- libraries: /usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so
-- include path: /usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/uk/Workspaces/denseflow/build
hi,How do I set the save path?
when install yasm,error occurs about:make[4]: 对“install-exec-hook”无需做任何事。
x@x:/data1/zsh/mmaction-master/third_party/denseflow/build$ make install
[ 66%] Built target zzdenseflow
[100%] Built target denseflow
Install the project...
-- Install configuration: ""
-- Installing: /home/x/app/bin/denseflow
-- Set runtime path of "/home/x/app/bin/denseflow" to ""
-- Installing: /home/x/app/lib/libzzdenseflow.a
(base) x@x:/data1/zsh/mmaction-master/third_party/denseflow/build$ denseflow test.avi -b=20 -a=tvl1 -s=1 -v
denseflow: command not found
Hi,
Here is the Optical Flow from OpenCV: https://docs.opencv.org/3.4/d4/dee/tutorial_optical_flow.html
Could you let me know the differences between them?
Full Error:
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.2) /opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp:312: error: (-217:Gpu API call) no kernel image is available for execution on the device in function 'call'
Aborted (core dumped)
This is by using the dockerfile.
GPUs: 2x Geforce RTX; 3090 2x Geforce RTX 2080 Ti.
I tried to to use the above GPUs separately but didn't help. In general, they both work with CUDA 11
. Also can't see any reason why OpenCV
wouldn't work with either of them.
Any ideas? Thanks a lot!
I met an error when installing denserflow:
How to solve it ? Thanks !
(base) root@LAB_VM:/home/denseflow/build# cmake -DCMAKE_INSTALL_PREFIX=$HOME/app -DUSE_HDF5=no -DUSE_NVFLOW=no ..
-- Found OpenCV: /usr/local (found version "4.5.0")
-- OpenCV library status:
-- config: /usr/local/lib/cmake/opencv4
-- version: 4.5.0
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
-- include path: /usr/local/include/opencv4
CMake Error at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR date_time filesystem
iostreams)
Call Stack (most recent call first):
/usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.19/Modules/FindBoost.cmake:2193 (find_package_handle_standard_args)
CMakeLists.txt:29 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/denseflow/build/CMakeFiles/CMakeOutput.log".
See also "/home/denseflow/build/CMakeFiles/CMakeError.log".
I do not find any warped version to fight for camera motion. like warp TVL1 flow. Are you going to support that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.