Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

OpenVINO Face Recognition Demo(Python)

Mounagurusamy__Guruv
1,514 Views

Hi Intel Team,

 

Can you please let me know, if its feasible to execute OpenVINO Face Recognition Demo using the linux service. Please find the Code Below:

package main

import (
    "os"
    "os/exec"
)

var APPFILE string = "/opt/intel/openvino/inference_engine/demos/python_demos/face_recognition_demo/face_recognition_demo.py"

func check(e error) {
    if e != nil {
        panic(e)
    }
}

func exist(PATH string) {
    if _, err := os.Stat(PATH); os.IsNotExist(err) {
        println("Application not installed.", APPFILE, "file not found, Please check and try again.")
        help()
        os.Exit(1)
    }
}

//Support contact
func help() {
    println("For assistance, email connect@inventorsofzero.in")
}

func main() {

    //initialize shell script
    cmd := exec.Command("bash", "/opt/intel/openvino/bin/setupvars.sh")
    cmd.Run()

    //check app file exist
    exist(APPFILE)
    SRVFILE := "/etc/systemd/system/frc1d.service"
    f, err := os.Create(SRVFILE)
    check(err)
    defer f.Close()
    f.WriteString("[Unit]\nDescription=Service demon for sync.py\n")
    f.WriteString("\n[Service]\nUser=root\nWorkingDirectory=/opt/intel/openvino/inference_engine/demos/python_demos/face_recognition_demo/\nExecStart=/usr/bin/python3.6 /opt/intel/openvino/inference_engine/demos/python_demos/face_recognition_demo/face_recognition_demo.py\nRestart=always")
    f.WriteString("\n\n[Install]\nWantedBy=multi-user.target\n\n")
    os.Chmod(SRVFILE, 0644)
    c := exec.Command("/bin/sh", "-c", "systemctl daemon-reload;systemctl start frc1d.service;systemctl enable frc1d.service")
    c.Run()
    println("frc1d service installed successfully!")
    help()
}

 

I get errors, while executing, Can you please help me rectify the same. My agenda to execute Face Recognition in a CCTV Camera(for a home security use case) and In order to ensure the continuous running of Face Recognition, I am making an attempt to execute using LInux Service.

Can you please help me.

Thanks

Guru

0 Kudos
5 Replies
SIRIGIRI_V_Intel
Employee
1,514 Views

Hi Guruvishnuvardan,

Can you confirm that you are able to run the Face Recognition demo from the terminal or command prompt.

Also, Can you provide the error logs for the same.

Regards,

Ram prasad

0 Kudos
Mounagurusamy__Guruv
1,514 Views
Hi @ Ram prasad (Intel), Yes, I am Successful in executing the following commands from terminal(PLease find the screen shot) 1) source /opt/intel/openvino/bin/setupvars.sh 2) root@ioz-NUC7PJYH:/opt/intel/openvino/inference_engine/demos/python_demos/face_recognition_demo# python3 ./face_recognition_demo.py -i "rtsp://admin:admin12345@192.168.1.64:554/ch1/main/av_stream" -m_fd /opt/intel/openvino/deployment_tools/tools/model_downloader/intel/face-detection-retail-0004/FP16/face-detection-retail-0004.xml -m_lm /opt/intel/openvino/deployment_tools/tools/model_downloader/intel/landmarks-regression-retail-0009/FP16/landmarks-regression-retail-0009.xml -m_reid /opt/intel/openvino/deployment_tools/tools/model_downloader/intel/face-reidentification-retail-0095/FP16/face-reidentification-retail-0095.xml --verbose -fg "/opt/intel/openvino/inference_engine/demos/python_demos/face_recognition_demo/face_gallery" PLease find the Error message, while executing the service(I have already shared the Linux Service Code previously), Please find the screen shot.
0 Kudos
Mounagurusamy__Guruv
1,514 Views

@Ram Prasad - Please note, I have fixed the issue.

0 Kudos
SIRIGIRI_V_Intel
Employee
1,514 Views

I was glad that you have solved the problem.

Could you please share the information that solved your problem, so that it will be helpful for the other users in the community.

Regards,

Ram prasad

0 Kudos
Mounagurusamy__Guruv
1,514 Views

Hi Ram Prasad,

Please find the link, I accessed to solve the problem

https://www.intel.in/content/www/in/en/support/articles/000055416/boards-and-kits/neural-compute-sticks.html

I have changed the content to suite an Ubuntu Box instead of Raspberry Pi.

Thanks

Guru

 

0 Kudos
Reply