Interactive_face_detection_demo that comes with the Toolkit of OpenVINO that works when Intel is installed It's a memo because I was happy that I could use it just by moving it as it is. The following is the information for OpenVINO 2020.4.
Google Colab looks like it's using an Intel CPU and can run on Colab.
Click here for the actual notebook.
Installation is just by performing Installation procedure for Linux, and the build and execution of demo is the same as the part using Docker below, so the explanation is explained. I'm omitting it.
However, it is troublesome to wait for installation every time Colab is started, it is troublesome to download the file because the output file is quite large due to its characteristics, and the CPU of Colab is not so fast in the first place. If you have an environment with Intel, you may find it easier to use Docker below, which allows you to write files directly locally.
I saw an article that seems to interfere with the existing environment, so I avoided it somehow. I think that there is no problem if you carry out Installation section.
docker run -v /c/Users/${USER}/Downloads:/Downloads -u root -it --rm openvino/ubuntu18_dev:2020.4
I want to use demo, so I use _dev with demo. Since I am exchanging files, I want to mount the download directory and mess with the installation files, so I become root. Since I am running on Windows 10, it only supported CPU only, but [In a supported environment, it also supports GPU etc. by passing an option to docker](https://hub.docker.com/ r / openvino / ubuntu18_dev) It seems.
cd ${INTEL_CVSDK_DIR}/inference_engine/demos/
sed -i 's/*)/interactive_face_detection_demo)/g' CMakeLists.txt
./build_demos.sh
If it is left as it is, we will have to wait for the build of other demos, so we are focusing on the interactive_face_detection_demo that we want to use. I want to use other demos Please remove sed.
${INTEL_CVSDK_DIR}/deployment_tools/tools/model_downloader/downloader.py \
--name face-detection-adas-0001,age-gender-recognition-retail-0013,head-pose-estimation-adas-0001,emotions-recognition-retail-0003,facial-landmarks-35-adas-0002 \
--output_dir /content/model/ \
--precisions FP32
Drop the trained model you want to use with interactive_face_detection_demo with the included downloader (https://docs.openvinotoolkit.org/2020.4/omz_tools_downloader_README.html). I'm wondering which one to use for those who have many models such as face-detection, but be careful because if you change it appropriately, it will be deadly slow (about 100 times). For the time being, the above is what was specified in Documentation.
/root/omz_demos_build/intel64/Release/interactive_face_detection_demo \
-i /Downloads/input.mp4 \
-m /content/model/intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml \
-m_ag /content/model/intel/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml \
-m_hp /content/model/intel/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml \
-m_em /content/model/intel/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml \
-m_lm /content/model/intel/facial-landmarks-35-adas-0002/FP32/facial-landmarks-35-adas-0002.xml \
-no_show \
-no_wait \
-async \
-o /Downloads/output.mp4
Although there are other options, I was able to convert the video above for the time being.
Recommended Posts