Neural Network Human Presence Detection

You can add Ubuntu 18.04 to supported platforms. It works on desktop and server versions.

1 Like

Hello @Klagio, sorry about the speed issues. The latest DeepStack releases are 2X faster. You can also try the GPU Version which is magnitudes faster than the standard version.

Our latest release includes a lot of performance improvements and universal support for custom models.

See this post for details:

Thanks for using DeepStack

Interesting reading:
Fooling automated surveillance cameras:adversarial patches to attack person detection

1 Like

I’d be interested if this still worked for YOLOv3 (which is what this app uses), as this study was done with YOLOv2.

Is now 18.x supported?
Will try when back home in the weekend

When I tried I could not install it. Did you follow standard instructions or did hacking a bit?

No hacking. Just followed install tutorial from intel.

Any chance that your video could be reuploaded?

Hi, when I try and run the make -B command inside the neural_security_system_master directory, I get the following error message

tc23@NUC:~/neural_security_system-master$ 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/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/include -I/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/samples/ -I./ -I/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/samples/common/format_reader/ -I/opt/intel/openvino_2019.1.133/opencv/include -I/usr/local/include -I/home/tc23/inference_engine_samples/thirdparty/gflags/include -I/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/include -I/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/include/cpp -I/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/samples/extension -L/opt/intel/openvino_2019.1.133/deployment_tools/inference_engine/bin/intel64/Release/lib -L/opt/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/opt/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:4:27: fatal error: gflags/gflags.h: No such file or directory
compilation terminated.
Makefile:22: recipe for target ‘neural_security_system’ failed
make: *** [neural_security_system] Error 1

As a side note, I had to downgrade tensorflow as sudo because I was getting permission errors with that. Any ideas what is wrong with the make -B?

@AndBobsYourUncle I was able to solve my prior problems by running sudo apt-get install libgflags-dev but now I am getting the following error when running make -B

/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

I have installed openvino completely, as regular user not root, and i have copied over the libcpu_extension.so file, so I am not sure why it can’t find these files. Can anyone help?

I believe that the Makefile is not pointing to the correct locations for the OpenVINO installation.

Which version of Ubuntu are you running? For instance, there are several places in the Makefile that are pointing to “$(INTEL_CVSDK_DIR)/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64”

If you are not using 16.04, then this folder might be different.

Also, have you added the source setupvars.sh to your .bashrc file?

Yep, I added the environment variables to my bash and I confirmed it was working with a new terminal. Also, I am on 16.04. Where should the intel directory be located? In my /Home directory? And thanks for getting back to me and helping me with my problem!

Edit: Full disclosure, I initially installed as root, but then saw that I needed to install as a regular user, so went back and reinstalled as my regular user, without any error. Could my original root install being causing the problem? Or would the second regular user install overwrite everything?

Yes, it could be that something happened between installing as root and then installing as your user. The Makefile in my repo depends on the OpenVINO libraries to be installed as your normal user.

Also, you need to make sure that you run the sample projects of OpenVINO, or a lot of the libraries won’t be present since they were never compiled.

I would try to see if you can run the sample project first before starting over and installing without root.

https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html

Firstly, make sure you follow the step in “Configure the Model Optimizer” and successfully run this:
sudo ./install_prerequisites.sh

And then make sure you can follow the step in the “Run the Verification Scripts to Verify Installation” section:
./demo_squeezenet_download_convert_run.sh

If those run, then they should’ve compiled the necessary libraries for you, and you can try my make -B step again.

OK I reran the sudo ./install.sh command, this time uninstalling the product. Then reran the command as a regular user, .install.sh. I completed the Model Optimizer and ran the verification, all of which worked. But now I am getting the following error:

-L/home/tc23/inference_engine_samples/intel64/Release/lib -lgflags_nothreads
-L…/…/lib -L/usr/local/lib -lpaho-mqttpp3 -lpaho-mqtt3a
main.cpp:13:25: fatal error: ie_device.hpp: No such file or directory
compilation terminated.
Makefile:22: recipe for target ‘neural_security_system’ failed
make: *** [neural_security_system] Error 1

I should note that the regular user ./install.sh failed to create an /opt/intel directory as it did with the sudo command. Not sure if that matters for the make -B or not.

Yes, it should have created an intel folder in your home directory.

In the Makefile there is something that includes this folder: ~/intel/computer_vision_sdk/deployment_tools/inference_engine/include

That should contain ie_device.hpp if everything compiled correctly when running the samples. Perhaps the newest version of OpenVINO doesn’t create the link computer_vision_sdk that is supposed to link to the computer_vision_sdk_2018.5.455 folder (or whatever version you have installed).

Let me know if you have this link in your ~/intel/ folder.

Yeah I was just poking around the Makefile and saw the reference to the computer_vision_sdk directory. So I went looking for it but couldn’t find it. Instead what I have is intel/openvino_2019.1.133, which is where I found the ie_device.hpp file. The full path to the file is ~/intel/openvino_2019.1.133/deployment_tools/inference_engine/include/ie_device.hpp

I’ve rerun the openvino installation a few times now, but that computer_vision_sdk directory never gets created? Do I need to edit the Makefile or something?

Alright, awesome. So I think I’ve come up with a way to fix your problem.

Don’t reinstall anything. From here, all you need to do is run the following:

ln -s ~/intel/openvino_2019.1.133 ~/intel/computer_vision_sdk

Then make -B should work.

I will work on creating a new tutorial to set this up since they obviously changed this in the latest OpenVINO release.

OK, that seems to have solved that problem, but now I’m back to this problem:

/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

I used locate -i for the libcpu_extension.so and the location is ~/inference_engine_samples_build/intel64/Release/lib/libcpu_extension.so, which is strange because I copied it over to the ~/neural_security_system/lib as well, but that location isn’t being reported. And I ran the same for the linference_engine, but it didn’t return any results. Sorry I’m being so dense with this, I really appreciate the help your providing!

Yeah, if your libcpu_extension.so is not showing up in ~/neural_security_system/lib, that is definitely the problem with that portion.

I’m not sure how you have your directory structure, but I’d ensure that it is actually copied into there.

As to the -linference_engine entry, that’s actually a file called inference_engine.hpp somewhere. Let me know how it goes with the libcpu_extension.so file (if you’ve navigated to the folder you have of my repo and do an ls ./lib and it doesn’t show up, then it isn’t really copied there).

And please let me know where your inference_engine.hpp file is located. That way we can see what type of link to create for that portion.

Best way to find a file anywhere in the system is to do:
sudo find / -name filename.extension