Neural Network Human Presence Detection

rm ./lib/libcpu_extension.so
cp ~/inference_engine_samples_build/intel64/Release/lib/libcpu_extension.so ./lib
make -B

hahaha i really wish I could say that one worked…but same error :scream:

When you run the very first sample from their setup, do you get something like this?

You run this:

cd ~/intel/openvino/deployment_tools/demo
./demo_squeezenet_download_convert_run.sh

It might ask for sudo password, a bunch of stuff will scroll by, and then this pops up at the end:

Top 10 results:

Image /home/nicholas/intel/openvino/deployment_tools/demo/car.png

classid probability label
------- ----------- -----
817     0.8363345   sports car, sport car
511     0.0946488   convertible
479     0.0419131   car wheel
751     0.0091071   racer, race car, racing car
436     0.0068161   beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
656     0.0037564   minivan
586     0.0025741   half track
717     0.0016069   pickup, pickup truck
864     0.0012027   tow truck, tow car, wrecker
581     0.0005882   grille, radiator grille


total inference time: 8.2043968
Average running time of one iteration: 8.2043968 ms

Throughput: 121.8858647 FPS

[ INFO ] Execution successful


###################################################

Demo completed successfully.

yep, here is the tail end of read out

total inference time: 17.3715074
Average running time of one iteration: 17.3715074 ms

Throughput: 57.5655284 FPS

[ INFO ] Execution successful

###################################################

Demo completed successfully.

What about this one?

./demo_security_barrier_camera.sh

yep, I get an image of car with the license MD711 and

Average inference time: 36.843 ms (27.1422 fps)

Average vehicle detection time: 16.073 ms (62.2161 fps)

Average vehicle attribs time: 8.20446 ms (121.885 fps)

Average lpr time: 17.3627 ms (57.5948 fps)

Total execution time: 97099.2

[ INFO ] Execution successful

###################################################

Demo completed successfully.

Hmmm, this is really strange. I started with a fresh Ubuntu 16.04 VM (which should be the same as you if it’s a fresh Ubuntu install on an Intel NUC which is the underlying computer powering my VM server).

I really tried to document every step I took from a fresh VM install, so there is something funky going on.

You never did a sudo apt-get upgrade or anything like that, right?

Nope, never did any upgrade. Not sure why it isn’t finding that libcpu. I can try going through all the steps again tomorrow?

Edit: Just in case, here is the full read out form the make -B in case you see anything funky in it

tc23@NUC:~/neural_security_system$ make -B
g++ -I… -I/usr/local/include -D_NDEBUG -fPIE -O3 -Wall -std=c++11 -O2 -o neural_security_system main.cpp -I.
-L~./lib/ -Wl,-rpath=./lib/ -l:libcpu_extension.so
-I~/intel/computer_vision_sdk/opencv/include/
-I~/intel/computer_vision_sdk/deployment_tools/inference_engine/include/
-I~/intel/computer_vision_sdk/deployment_tools/inference_engine/include/cpp
-L~/intel/computer_vision_sdk/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64 -linference_engine -ldl -lpthread -lcpu_extension
-L~/intel/computer_vision_sdk/opencv/lib -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_highgui -lopencv_videoio -lopencv_video -I/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/include -I/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/samples/ -I./ -I/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/samples/common/format_reader/ -I/home/tc23/intel/openvino_2019.1.133/opencv/include -I/usr/local/include -I/home/tc23/inference_engine_samples/thirdparty/gflags/include -I/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/include -I/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/include/cpp -I/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/samples/extension -L/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/bin/intel64/Release/lib -L/home/tc23/intel/openvino_2019.1.133/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64 -L/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build/intel64/Release/lib -L/home/tc23/intel/openvino_2019.1.133/opencv/lib -ldl -linference_engine -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_videoio -lopencv_imgcodecs -lopencv_imgcodecs -lcpu_extension -L/home/tc23/inference_engine_samples/intel64/Release/lib -lgflags_nothreads
-L…/…/lib -L/usr/local/lib -lpaho-mqttpp3 -lpaho-mqtt3a
main.cpp: In function \u2018int main(int, char**)\u2019:
main.cpp:525:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < objects.size(); ++i) {
^
main.cpp:528:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = i + 1; j < objects.size(); ++j) {
^
main.cpp:557:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(label < labels.size() ? labels[label] : std::s
^
main.cpp:420:14: warning: variable \u2018total_t0\u2019 set but not used [-Wunused-but-set-variable]
auto total_t0 = std::chrono::high_resolution_clock::now();
^
main.cpp:646:5: warning: exception of type \u2018mqtt::exception\u2019 will be caught
catch (const mqtt::exception& exc) {
^
main.cpp:642:5: warning: by earlier handler for \u2018std::exception\u2019
catch (const std::exception& error) {
^
In file included from main.cpp:42:0:
ocv_common.hpp: In instantiation of \u2018void matU8ToBlob(const cv::Mat&, InferenceEngine::Blob::Ptr&, int) [with T = unsigned char; InferenceEngine::Blob::Ptr = std::shared_ptrInferenceEngine::Blob]\u2019:
main.cpp:117:46: required from here
ocv_common.hpp:30:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (width != orig_image.size().width || height!= orig_image.size().height)
^
ocv_common.hpp:30:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (width != orig_image.size().width || height!= orig_image.size().height)
^
/usr/bin/ld: cannot find -l:libcpu_extension.so
/usr/bin/ld: cannot find -linference_engine
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target ‘neural_security_system’ failed
make: *** [neural_security_system] Error 1

All those references to computer_vision_sdk are the problem.

Can you run ln ~/intel/computer_vision_sdk ~/intel/openvino_2019.1.133 and try again?

Oh dude…

I forgot to push my changes again, smh…

Please do this:

git pull origin openvino-2019-R1 

and then try the make -B again.

WHooooooooo! The make file was successful. You’re a champion!! I’m sorry, I should have shown you the full message previously. Thanks so much for working through the problem with me :grin:

1 Like

Awesome! I’m glad we could finally get it working. Now I’ll probably update the repo, and the readme for it to reflect the tried and true steps.

Thanks for trying this all out!

Thank you for sticking it out with me!

1 Like

No problem! Did you get it to work?

I haven’t had a chance to play around with it yet (long work day), but I’m getting the usage print out, so i’ll take that as a good sign. I also need to go through the installation instructions for the compute stick on the openvino page. Quick question, what do I put as the MQTT username and password, if I don’t have those set for my broker?

I was able to get it running on a RaspberryPi with a Intel NCS2.
Great work, AndBobsYourUncle!!!

1 Like

You’re totally welcome. That’s great news!

So did these revised steps work for you using the latest OpenVINO 2019 R1.0.1?

There were a few steps for the Intel64 that don’t quite work for the RP3 and I also had to edit the Makefile, but nothing major.

Also… I think I spoke too soon. :wink: It is crashing and most times won’t even start.

I’m looking into it and keep you posted. :wink:

Cheers,

@AndBobsYourUncle I got around the mqtt by using a bridge broker. But I’m trying to integrate it with a hacked Wyze cam, which uses rtsp. Would I be able to do that? Because I’m getting an error that says it can’t connect to the cam. I’m able to access the cam at the IP address, but it has a password

Try ‘http://username:password@rtspstreamurl