rockkingjy / OpenTracker

Real-time C++ ECO tracker etc. speed-up by SSE/NEON, support Linux, Mac, Jetson TX1/2, raspberry pi
GNU General Public License v3.0
751 stars 197 forks source link

Do not support in Nvidia Jestson Xavier? #23

Closed Zeeman206 closed 5 years ago

Zeeman206 commented 5 years ago

I can build the project. But when I try to run it. It's does not work and print that"Segmentation fault (core dumped)". Thanks for any help.

nvidia@jetson:~$ pkg-config --modversion opencv 3.3.1 nvidia@jetson:~/Downloads/OpenTracker/eco$ gedit makefile Set the SIMD to 2. nvidia@jetson:~/Downloads/OpenTracker/eco$ make -jnproc g++ -c -o ffttools.o ffttools.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o fhog.o fhog.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o interpolator.o interpolator.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o optimize_scores.o optimize_scores.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o scale_filter.o scale_filter.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o regularization_filter.o regularization_filter.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o feature_extractor.o feature_extractor.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o feature_operator.o feature_operator.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o training.o training.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD In file included from ffttools.hpp:40:0, from feature_operator.hpp:8, from feature_operator.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ In file included from ffttools.hpp:40:0, from feature_extractor.hpp:14, from feature_extractor.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ In file included from ffttools.hpp:40:0, from scale_filter.hpp:5, from scale_filter.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ In file included from interpolator.hpp:6:0, from interpolator.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ In file included from ffttools.hpp:40:0, from optimize_scores.hpp:7, from optimize_scores.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ In file included from ffttools.hpp:40:0, from ffttools.cc:2: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ In file included from ffttools.hpp:40:0, from regularization_filter.hpp:8, from regularization_filter.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ g++ -c -o sample_update.o sample_update.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o eco.o eco.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o metrics.o metrics.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o gradient.o gradient.cpp -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD g++ -c -o runecotracker.o runecotracker.cc -g -Wall pkg-config --cflags opencv -lstdc++ -lm -std=c++0x -O3 -fPIC -DUSE_SIMD -DUSE_NEON -ffast-math -flto -march=armv8-a+crypto -mcpu=cortex-a57+crypto -DUSE_MULTI_THREAD In file included from ffttools.hpp:40:0, from training.hpp:12, from training.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ gradient.cpp: In function ‘void gradMag(float, float, float, int, int, int, bool)’: gradient.cpp:78:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if( c==0 ) continue; _m = CMPGT( _M2[y1], _M2[y] ); ^~ gradient.cpp:78:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ if( c==0 ) continue; _m = CMPGT( _M2[y1], _M2[y] ); ^~ gradient.cpp: In function ‘void gradMagNorm(float, float, int, int, float)’: gradient.cpp:111:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(sse) i=4; for(; i<n; i++) M[i] /= (S[i] + norm); ^~ gradient.cpp:111:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ if(sse) i=4; for(; i<n; i++) M[i] /= (S[i] + norm); ^~~ metrics.cc: In member function ‘float Metrics::auc()’: metrics.cc:42:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ In file included from ffttools.hpp:40:0, from sample_update.hpp:10, from sample_update.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ In file included from interpolator.hpp:6:0, from eco.hpp:27, from eco.cc:1: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ eco.cc: In member function ‘void eco::ECO::init(cv::Mat&, const Rect2f&, const eco::EcoParameters&)’: eco.cc:9:8: warning: variable ‘fpseco’ set but not used [-Wunused-but-set-variable] float fpseco = 0; ^~ In file included from interpolator.hpp:6:0, from eco.hpp:27, from runecotracker.cc:7: debug.hpp: In function ‘void eco::timerExampleCV()’: debug.hpp:42:8: warning: variable ‘timedft’ set but not used [-Wunused-but-set-variable] float timedft = 0; ^~~ debug.hpp: In function ‘void eco::absTest()’: debug.hpp:596:8: warning: variable ‘abs’ set but not used [-Wunused-but-set-variable] float abs = std::abs(1.23f); ^~~ debug.hpp: In function ‘void eco::accumulateTest()’: debug.hpp:609:8: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable] float sum = std::accumulate(v.begin(), v.end(), 0); ^~~ gcc -o runecotracker.bin ffttools.o fhog.o interpolator.o optimize_scores.o scale_filter.o regularization_filter.o feature_extractor.o feature_operator.o training.o sample_update.o eco.o metrics.o gradient.o runecotracker.o pkg-config --libs opencv -lstdc++ -lm -pthread gcc pkg-config --libs opencv -lstdc++ -lm -pthread -shared -o libecotracker.so ffttools.o fhog.o interpolator.o optimize_scores.o scale_filter.o regularization_filter.o feature_extractor.o feature_operator.o training.o sample_update.o eco.o metrics.o gradient.o nvidia@jetson:~/Downloads/OpenTracker/eco$ sudo make install [sudo] password for nvidia: mkdir -p /usr/local/include/opentracker mkdir -p /usr/local/include/opentracker/eco mkdir -p /usr/local/include/opentracker/eco/look_tables cp libecotracker.so /usr/local/lib cp .hpp /usr/local/include/opentracker/eco cp *.h /usr/local/include/opentracker/eco cp -a look_tables/. /usr/local/include/opentracker/eco/look_tables nvidia@jetson:~/Downloads/OpenTracker/eco$ ./runecotracker.bin Segmentation fault (core dumped)

rockkingjy commented 5 years ago

@Zeeman206 Haven't tested on Xavier yet, normally speaking it should work. Try to set SIMD=0 in makefile and make, does that work?

Zeeman206 commented 5 years ago

@Zeeman206 Haven't tested on Xavier yet, normally speaking it should work. Try to set SIMD=0 in makefile and make, does that work?

@rockkingjy Thks a lot! I will try it when I come back.

Zeeman206 commented 5 years ago

@rockkingjy Thks a lot! set SIMD=0 and it's work.

nvidia@jetson:~/Downloads/OpenTracker/eco$ ./runecotracker.bin 1 205 151 17 50 ../sequences/Crossing/img/0001.jpg max_score_threshhold: 0.100000 0:0.970590; 1:0.980296; 2:0.990099; 3:1.000000; 4:1.010000; 5:1.020100; 6:1.030301; Gtk-Message: 07:08:25.928: Failed to load module "canberra-gtk-module" Frame:1 FPS:15.1426 iou:0.803975 Frame:2 FPS:16.0391 iou:0.813357 Frame:3 FPS:16.1885 iou:0.803737 Frame:4 FPS:16.703 iou:0.687723 Frame:5 FPS:16.4992 iou:0.89272 Frame:6 FPS:17.0283 iou:0.705185 Frame:7 FPS:16.6393 iou:0.636454 Frame:8 FPS:16.7969 iou:0.75742 Frame:9 FPS:17.0949 iou:0.800346 Frame:10 FPS:16.8613 iou:0.805682 Frame:11 FPS:17.3841 iou:0.924181 Frame:12 FPS:16.7729 iou:0.874901 Frame:13 FPS:16.7615 iou:0.834614 Frame:14 FPS:16.8095 iou:0.734103 Frame:15 FPS:16.9989 iou:0.843441 Frame:16 FPS:16.5845 iou:0.739469 Frame:17 FPS:17.118 iou:0.854993 Frame:18 FPS:16.6042 iou:0.800096 Frame:19 FPS:16.843 iou:0.924083 Frame:20 FPS:16.8665 iou:0.887717 Frame:21 FPS:16.5573 iou:0.823852 Frame:22 FPS:16.222 iou:0.773466 Frame:23 FPS:17.0212 iou:0.808876 Frame:24 FPS:16.3558 iou:0.864671 Frame:25 FPS:15.7351 iou:0.831309 Frame:26 FPS:15.906 iou:0.779379 Frame:27 FPS:16.5932 iou:0.753497 Frame:28 FPS:16.486 iou:0.782829 Frame:29 FPS:16.3922 iou:0.687668 Frame:30 FPS:15.6314 iou:0.777802 Frame:31 FPS:15.8877 iou:0.840609 Frame:32 FPS:16.1443 iou:0.815213 Frame:33 FPS:16.4762 iou:0.826525 Frame:34 FPS:16.3756 iou:0.781008 Frame:35 FPS:16.3816 iou:0.719859 Frame:36 FPS:15.8267 iou:0.696823 Frame:37 FPS:16.1304 iou:0.696823 Frame:38 FPS:16.2839 iou:0.710615 Frame:39 FPS:16.0529 iou:0.620806 Frame:40 FPS:16.2053 iou:0.74011 Frame:41 FPS:15.1545 iou:0.693157 Frame:42 FPS:16.2838 iou:0.732856 Frame:43 FPS:16.1796 iou:0.708804 Frame:44 FPS:16.0679 iou:0.638204 Frame:45 FPS:16.2533 iou:0.833289 Frame:46 FPS:15.5001 iou:0.773457 Frame:47 FPS:16.3136 iou:0.763249 Frame:48 FPS:16.244 iou:0.771654 Frame:49 FPS:16.2708 iou:0.902908 Frame:50 FPS:16.2857 iou:0.827245 Frame:51 FPS:15.969 iou:0.801879 Frame:52 FPS:15.8627 iou:0.781469 Frame:53 FPS:15.6302 iou:0.74542 Frame:54 FPS:15.5166 iou:0.670619 Frame:55 FPS:16.1615 iou:0.787856 Frame:56 FPS:15.8474 iou:0.796768 Frame:57 FPS:16.4144 iou:0.846521 Frame:58 FPS:15.9096 iou:0.872233 Frame:59 FPS:16.4608 iou:0.822139 Frame:60 FPS:16.2173 iou:0.807351 Frame:61 FPS:15.5882 iou:0.805233 Frame:62 FPS:16.2281 iou:0.82008 Frame:63 FPS:16.3829 iou:0.731423 Frame:64 FPS:16.1528 iou:0.676516 Frame:65 FPS:16.407 iou:0.845666 Frame:66 FPS:15.8063 iou:0.737094 Frame:67 FPS:14.6085 iou:0.715208 Frame:68 FPS:15.4687 iou:0.621743 Frame:69 FPS:14.5025 iou:0.661983 Frame:70 FPS:16.0464 iou:0.754161 Frame:71 FPS:16.2604 iou:0.676223 Frame:72 FPS:15.8788 iou:0.693091 Frame:73 FPS:15.6949 iou:0.739088 Frame:74 FPS:16.0168 iou:0.655297 Frame:75 FPS:15.8934 iou:0.695611 Frame:76 FPS:16.4825 iou:0.734734 Frame:77 FPS:16.4747 iou:0.650891 Frame:78 FPS:16.3236 iou:0.832821 Frame:79 FPS:16.3768 iou:0.757098 Frame:80 FPS:16.2503 iou:0.780149 Frame:81 FPS:16.1084 iou:0.706998 Frame:82 FPS:16.4811 iou:0.76058 Frame:83 FPS:16.376 iou:0.693588 Frame:84 FPS:16.2903 iou:0.749212 Frame:85 FPS:16.3405 iou:0.692211 Frame:86 FPS:15.9279 iou:0.759006 Frame:87 FPS:16.2354 iou:0.752815 Frame:88 FPS:16.2288 iou:0.770725 Frame:89 FPS:16.2581 iou:0.752508 Frame:90 FPS:16.2022 iou:0.76427 Frame:91 FPS:16.3317 iou:0.75438 Frame:92 FPS:16.3848 iou:0.682301 Frame:93 FPS:16.4522 iou:0.767857 Frame:94 FPS:16.5418 iou:0.788817 Frame:95 FPS:16.3301 iou:0.723988 Frame:96 FPS:15.7464 iou:0.730853 Frame:97 FPS:15.9689 iou:0.778526 Frame:98 FPS:15.6988 iou:0.632061 Frame:99 FPS:16.2618 iou:0.717362 Frame:100 FPS:16.4405 iou:0.665835 Frame:101 FPS:16.208 iou:0.651886 Frame:102 FPS:16.0608 iou:0.640403 Frame:103 FPS:15.672 iou:0.601483 Frame:104 FPS:16.2389 iou:0.766766 Frame:105 FPS:16.7698 iou:0.587986 Frame:106 FPS:16.0453 iou:0.723789 Frame:107 FPS:16.4905 iou:0.604777 Frame:108 FPS:15.8421 iou:0.753349 Frame:109 FPS:16.3498 iou:0.78858 Frame:110 FPS:16.2648 iou:0.79355 Frame:111 FPS:16.5413 iou:0.768955 Frame:112 FPS:16.5315 iou:0.749088 Frame:113 FPS:16.4284 iou:0.685251 Frame:114 FPS:16.2463 iou:0.74048 Frame:115 FPS:15.7549 iou:0.828788 Frame:116 FPS:16.3822 iou:0.791401 Frame:117 FPS:16.4756 iou:0.810337 Frame:118 FPS:16.6475 iou:0.81887 Frame:119 FPS:16.3666 iou:0.745824 Frame:120 FPS:16.407 Frames:119 AvgPrecision:1 AvgIou:0.757249 SuccessRate:1 IniFps:1.03234 AvgFps:16.2328