Giter VIP home page Giter VIP logo

Comments (9)

yjxiong avatar yjxiong commented on May 28, 2024

Did you succeed in compiling the OpenCV library and the DenseFlow tool? The OpenCV must have VideoIO support. Otherwise, you will meet empty results.

from temporal-segment-networks.

iftachg avatar iftachg commented on May 28, 2024

I have built everything using bash build_all.sh, which should have built VideoIO support

from temporal-segment-networks.

yjxiong avatar yjxiong commented on May 28, 2024

As the first thing to check.

Can you run DenseFlow on a single video file?

Please try running it on any single video file using the following guide. If you still cannot get the frames extracted, there might be some problem with the installation. Otherwise, we should check for the file existence, etc.

https://github.com/yjxiong/dense_flow#usage

from temporal-segment-networks.

iftachg avatar iftachg commented on May 28, 2024

The DenseFlow installation was indeed corrupt.
I have tried it again and I noticed that when building the DenseFlow library I am getting these errors:

[ 66%] make[2]: *** No rule to make target /temporal-segment-networks/3rd-party/opencv-2.4.12/build/lib/libopencv_videostab.so.2.4.12, needed by extract_cpu. Stop. make[2]: *** Waiting for unfinished jobs.... Building CXX object CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o make[2]: *** No rule to make target /temporal-segment-networks/3rd-party/opencv-2.4.12/build/lib/libopencv_videostab.so.2.4.12, needed by extract_gpu. Stop. make[2]: *** Waiting for unfinished jobs.... [ 77%] Building CXX object CMakeFiles/extract_gpu.dir/tools/extract_flow_gpu.cpp.o [ 88%] make[2]: *** No rule to make target /temporal-segment-networks/3rd-party/opencv-2.4.12/build/lib/libopencv_videostab.so.2.4.12, needed by extract_warp_gpu. Stop. make[2]: *** Waiting for unfinished jobs.... Building CXX object CMakeFiles/extract_warp_gpu.dir/tools/extract_warp_flow_gpu.cpp.o make[2]: *** No rule to make target /temporal-segment-networks/3rd-party/opencv-2.4.12/build/lib/libopencv_videostab.so.2.4.12, needed by libpydenseflow.so. Stop. make[2]: *** Waiting for unfinished jobs.... [100%] Building CXX object CMakeFiles/pydenseflow.dir/src/py_denseflow.cpp.o make[1]: *** [CMakeFiles/extract_cpu.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/extract_warp_gpu.dir/all] Error 2 make[1]: *** [CMakeFiles/extract_gpu.dir/all] Error 2 make[1]: *** [CMakeFiles/pydenseflow.dir/all] Error 2 make: *** [all] Error 2

Can you point me as to how to fix these problems?

from temporal-segment-networks.

yjxiong avatar yjxiong commented on May 28, 2024

Seems some library is missing in your OpenCV installation. Can you have a look at whether you the OpenCV is successfully compiled?

from temporal-segment-networks.

iftachg avatar iftachg commented on May 28, 2024

/temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:120:54: error: ‘NppiGraphcutState’ has not been declared typedef NppStatus (*init_func_t)(NppiSize oSize, NppiGraphcutState** ppState, Npp8u* pDeviceMem); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:135:18: error: expected type-specifier before ‘NppiGraphcutState’ operator NppiGraphcutState*() ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:141:9: error: ‘NppiGraphcutState’ does not name a type NppiGraphcutState* pState; ^ In file included from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/internal_shared.hpp:50:0, from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/precomp.hpp:105, from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:43: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp: In constructor ‘{anonymous}::NppiGraphcutStateHandler::NppiGraphcutStateHandler(NppiSize, Npp8u*, {anonymous}::init_func_t)’: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:127:39: error: ‘pState’ was not declared in this scope nppSafeCall( func(sznpp, &pState, pDeviceMem) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp: In destructor ‘{anonymous}::NppiGraphcutStateHandler::~NppiGraphcutStateHandler()’: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:132:43: error: ‘pState’ was not declared in this scope nppSafeCall( nppiGraphcutFree(pState) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:132:49: error: ‘nppiGraphcutFree’ was not declared in this scope nppSafeCall( nppiGraphcutFree(pState) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp: In function ‘void cv::gpu::graphcut(cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::Stream&)’: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:174:51: error: ‘nppiGraphcutGetSize’ was not declared in this scope nppSafeCall( nppiGraphcutGetSize(sznpp, &bufsz) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:182:61: error: ‘nppiGraphcutInitAlloc’ was not declared in this scope NppiGraphcutStateHandler state(sznpp, buf.ptr<Npp8u>(), nppiGraphcutInitAlloc); ^ In file included from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/internal_shared.hpp:50:0, from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/precomp.hpp:105, from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:43: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:191:146: error: ‘nppiGraphcut_32s8u’ was not declared in this scope static_cast<int>(terminals.step), static_cast<int>(leftTransp.step), sznpp, labels.ptr<Npp8u>(), static_cast<int>(labels.step), state) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:196:146: error: ‘nppiGraphcut_32f8u’ was not declared in this scope static_cast<int>(terminals.step), static_cast<int>(leftTransp.step), sznpp, labels.ptr<Npp8u>(), static_cast<int>(labels.step), state) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp: In function ‘void cv::gpu::graphcut(cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::Stream&)’: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:246:52: error: ‘nppiGraphcut8GetSize’ was not declared in this scope nppSafeCall( nppiGraphcut8GetSize(sznpp, &bufsz) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:254:61: error: ‘nppiGraphcut8InitAlloc’ was not declared in this scope NppiGraphcutStateHandler state(sznpp, buf.ptr<Npp8u>(), nppiGraphcut8InitAlloc); ^ In file included from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/internal_shared.hpp:50:0, from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/precomp.hpp:105, from /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:43: /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:267:146: error: ‘nppiGraphcut8_32s8u’ was not declared in this scope static_cast<int>(terminals.step), static_cast<int>(leftTransp.step), sznpp, labels.ptr<Npp8u>(), static_cast<int>(labels.step), state) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func) ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/graphcuts.cpp:274:146: error: ‘nppiGraphcut8_32f8u’ was not declared in this scope static_cast<int>(terminals.step), static_cast<int>(leftTransp.step), sznpp, labels.ptr<Npp8u>(), static_cast<int>(labels.step), state) ); ^ /temporal-segment-networks/3rd-party/opencv-2.4.12/modules/gpu/src/cuda/safe_call.hpp:84:43: note: in definition of macro ‘nppSafeCall’ #define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func)

from temporal-segment-networks.

yjxiong avatar yjxiong commented on May 28, 2024

@iftahg

Seems your OpenCV is not compiled. Please first make sure it gets compiled.

from temporal-segment-networks.

iftachg avatar iftachg commented on May 28, 2024

For future reference - My problem was indeed the OpenCV build, specifically with the graphcuts module and cuda version, as explained (with solution) here: https://devtalk.nvidia.com/default/topic/986950/opencv-installation-problem-nppigraphcutinitalloc-not-declared/?offset=2

In essence the solution is to change in <opencv_path>/modules/cudalegacy/src/graphcuts.cpp the line:
if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
to:
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)

then building OpenCV and all other dependencies again,

from temporal-segment-networks.

yjxiong avatar yjxiong commented on May 28, 2024

Thanks for posting your solution!

from temporal-segment-networks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.