Giter VIP home page Giter VIP logo

Comments (14)

yjxiong avatar yjxiong commented on May 28, 2024

Few things to check here:

  1. Video paths, are they valid?
  2. VideoIO support in OpenCV, is it enabled for OpenCV, see #10 for more details

from temporal-segment-networks.

KnightOfTheMoonlight avatar KnightOfTheMoonlight commented on May 28, 2024

Opps. I used my current opencv.

from temporal-segment-networks.

KnightOfTheMoonlight avatar KnightOfTheMoonlight commented on May 28, 2024

I have another question, is opencv2.4.12 compatible with boost 1.59?

When compiling, I got the follow message:
../../lib/libopencv_ts.a(ts_gtest.cpp.o): In function 'testing::internal::RE::~RE()':

ts_gtest.cpp:(.text._ZN7testing8internal2RED2Ev+0xf): undefined reference to 'regfreeA'

ts_gtest.cpp:(.text._ZN7testing8internal2RED2Ev+0x18): undefined reference to 'regfreeA'

../../lib/libopencv_ts.a(ts_gtest.cpp.o): In function 'testing::internal::RE::FullMatch(char const*, testing::internal::RE const&)':

ts_gtest.cpp:(.text._ZN7testing8internal2RE9FullMatchEPKcRKS1_+0x2a): undefined reference to 'regexecA'

../../lib/libopencv_ts.a(ts_gtest.cpp.o): In function 'testing::internal::RE::PartialMatch(char const*, testing::internal::RE const&)':

ts_gtest.cpp:(.text._ZN7testing8internal2RE12PartialMatchEPKcRKS1_+0x2a): undefined reference to 'regexecA'

../../lib/libopencv_ts.a(ts_gtest.cpp.o): In function 'testing::internal::RE::Init(char const*)':

ts_gtest.cpp:(.text._ZN7testing8internal2RE4InitEPKc+0x62): undefined reference to 'regcompA'

ts_gtest.cpp:(.text._ZN7testing8internal2RE4InitEPKc+0x88): undefined reference to 'regcompA'

collect2: error: ld returned 1 exit status

make[2]: *** [bin/opencv_perf_core] Error 1

make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2

And from my search, it might be connected to boost.

from temporal-segment-networks.

yjxiong avatar yjxiong commented on May 28, 2024

Haven't met this before. Sorry I cannot help on it. Maybe try other version of Boost before digging into the problem.

from temporal-segment-networks.

KnightOfTheMoonlight avatar KnightOfTheMoonlight commented on May 28, 2024

I have found the respective keywords under my boost and system boost like below:
SYSTEM ONE:
include file:
xxx@amax-SYS-7048GR-TR:/usr/include$ grep -n -H -R "regexecA"
boost/regex.h:61:using boost::regexecA;
boost/regex/v4/cregex.hpp:163:BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
boost/regex/v4/cregex.hpp:182:#define regexec regexecA
library file:
xxx@amax-SYS-7048GR-TR:/harddrives/epsilon/xxx/libraries/boost$ cd /usr/lib/x86_64-linux-gnu/ xxx@amax-SYS-7048GR-TR:/usr/lib/x86_64-linux-gnu$grep -n -H -R "regexecA"
Binary file libboost_regex.so.1.54.0matches grep: libGLESv2.so: No such file or directory Binary file libboost_regex.so.1.55.0 matches grep: mesa-egl/libEGL.so: No such file or directory grep: mesa-egl/libGLESv2.so: No such file or directory`

MINE:
include and library file:
xxx@amax-SYS-7048GR-TR:/harddrives/epsilon/xxx/libraries/boost$ grep -n -H -R "regexecA" include/boost/regex.h:61:using boost::regexecA;
include/boost/regex/v4/cregex.hpp:163:BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
include/boost/regex/v4/cregex.hpp:182:#define regexec regexecA boost_1_59_0/libs/regex/example/timer/regex_timer.cpp:331: regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
boost_1_59_0/libs/regex/example/timer/regex_timer.cpp:337: result = regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
boost_1_59_0/libs/regex/example/timer/regex_timer.cpp:341: cout << "POSIX regexecA time: " << (tim * 1000000 / iters) << "us" << endl;
boost_1_59_0/libs/regex/doc/posix_api.qbk:41: int regexecA(const regex_tA*, const char*, unsigned int, regmatch_t*, int);
boost_1_59_0/libs/regex/doc/posix_api.qbk:58: #define regexec regexecA
boost_1_59_0/libs/regex/doc/html/boost_regex/ref/posix.html:77:<span class="keyword">int</span> <span class="identifier">regexecA</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_tA</span><span class="special">*,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">regmatch_t</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">);</span> boost_1_59_0/libs/regex/doc/html/boost_regex/ref/posix.html:94:<span class="preprocessor">#define</span> <span class="identifier">regexec</span> <span class="identifier">regexecA</span>
boost_1_59_0/libs/regex/test/regress/test_deprecated.cpp:105: if(boost::regexecA(&re, search_text.c_str(), max_subs, matches, posix_match_options) == 0)
boost_1_59_0/libs/regex/test/c_compiler_checks/posix_api_check.c:48: result = regexecA(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
boost_1_59_0/libs/regex/test/c_compiler_checks/posix_api_check.cpp:49: result = regexecA(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
boost_1_59_0/libs/regex/src/posix_api.cpp:217:BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA* expression, const char* buf, regsize_t n, regmatch_t* array, int eflags) Binary file boost_1_59_0/bin.v2/libs/regex/build/gcc-4.8/release/link-static/threading-multi/libboost_regex.a matches
Binary file boost_1_59_0/bin.v2/libs/regex/build/gcc-4.8/release/link-static/threading-multi/posix_api.o matches
Binary file boost_1_59_0/bin.v2/libs/regex/build/gcc-4.8/release/threading-multi/libboost_regex.so.1.59.0 matches
Binary file boost_1_59_0/bin.v2/libs/regex/build/gcc-4.8/release/threading-multi/posix_api.o matches
boost_1_59_0/boost/regex.h:61:using boost::regexecA;
boost_1_59_0/boost/regex/v4/cregex.hpp:163:BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
boost_1_59_0/boost/regex/v4/cregex.hpp:182:#define regexec regexecA
Binary file lib/libboost_regex.so.1.59.0 matches
Binary file lib/libboost_regex.a matches
Binary file lib/libboost_regex.so matches

all the keywords are found like above. So boost has these keywords and compiled to xxx.so, for my boost and the system one. While, there are two versions of boost, 1.54 and 1.55.

So I guess it is because opencv can not find it. I check the cmake file of opencv2.4.12 you provided, and could not find any clue of boost.
Do you have any suggestions?

from temporal-segment-networks.

KnightOfTheMoonlight avatar KnightOfTheMoonlight commented on May 28, 2024

Finally!!!
This undefined bug is because boost and linux system have the same regex.h file. And renaming this file of boost temporally can fix this. ref: https://groups.google.com/forum/#!searchin/caffe-users/regex.h/caffe-users/zTfFsRnNl9c/ckD-bar6BAAJ
So at the end I use my boost 1.59 and opencv2.4.12. and make the right opencv path for denseflow. this bug is fixed.

from temporal-segment-networks.

wcj021312 avatar wcj021312 commented on May 28, 2024

@KnightOfTheMoonlight hello, I meet the same problem when I run bash scripts/extraction_optical_flow.sh SRC_FOLDER OUT_FOLDER NUM_WORKER ,the image extraction part does not get the images. can you give me some suggest about the image extraction? Thank you .

from temporal-segment-networks.

KnightOfTheMoonlight avatar KnightOfTheMoonlight commented on May 28, 2024

@wcj021312 Did you check all the details above first?

from temporal-segment-networks.

wcj021312 avatar wcj021312 commented on May 28, 2024

@KnightOfTheMoonlight Video paths is true, and opencv support videoIO, what detail that I need to check? example?

from temporal-segment-networks.

KnightOfTheMoonlight avatar KnightOfTheMoonlight commented on May 28, 2024

@wcj021312
So could I assume you have already successfully run the bash build_all.sh? My problem comes from some building issues.
By the way, did you get the videos by this -> https://github.com/yjxiong/temporal-segment-networks#get-the-videos?

from temporal-segment-networks.

wcj021312 avatar wcj021312 commented on May 28, 2024

from temporal-segment-networks.

yjxiong avatar yjxiong commented on May 28, 2024

@wcj021312
In case you are using your own videos, make sure they are put in a two-level directory structure. This is assumed in the extraction script.
https://github.com/yjxiong/temporal-segment-networks/blob/master/tools/build_of.py#L115

Or you can change the script to fit your storage pattern.

from temporal-segment-networks.

ymxv avatar ymxv commented on May 28, 2024

Opps. I used my current opencv.

hello,i meet the same question, when i run scripts/extract_optical_flow, there is no images generated, but the path generated, and i checked build_of.py ,i don't think the flowing code has worked, do you have any idea? thank u!

cmd = os.path.join(df_path + 'build/extract_gpu')+' -f {} -x {} -y {} -i {} -b 20 -t 1 -d {} -s 1 -o {} -w {} -h {}'.format(quote(vid_path), quote(flow_x_path), quote(flow_y_path), quote(image_path), dev_id, out_format, new_size[0], new_size[1])
os.system(cmd)

from temporal-segment-networks.

jimmy-ng avatar jimmy-ng commented on May 28, 2024

@ymxv You can solve it by using this command instead:
cmd = os.path.join(df_path + 'build/extract_gpu')+' -f={} -x={} -y={} -i={} -b=20 -t= 1 -d={} -s=1 -o={} -w={} -h={}'.format(quote(vid_path), quote(flow_x_path), quote(flow_y_path), quote(image_path), dev_id, out_format, new_size[0], new_size[1])

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.