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.

Switching between synchronous and asynchronous

Yasunori__Aoki
Beginner
855 Views

Hello.

I'm working on a combination of NCS2 and Raspberry Pi.
The main code at present is as follows.
I think it's probably asynchronous.

 

【 My Code 】

        frame = PiAvLib.PiCamCapture(vs)   #Get image data

        blob = cv2.dnn.blobFromImage(frame, size=(640,480),ddepth=cv2.CV_8U)

        net.setInput(blob)

        out = net.forward()

        out = np.squeeze(out)

        Tagget_Chk(out, frame)       #Add a box to a recognized object in the image

 

【 Question 】

Q1.Please tell me ,how to switch between synchronous and asynchronous processing of NCS2?

Q2.Please tell me ,the function to switch between synchronous and asynchronous.

Q3.Please tell me ,Where can I find a manual for switching between synchronous and asynchronous?

 

Best regards,

Aoki

0 Kudos
2 Replies
David_C_Intel
Employee
855 Views

Hi Aoki,

Thanks for reaching out.

For running synchronous or asynchronous inference, you can use the infer() or start_async() functions respectively. You can check these functions here.

Additionally, some demos such as the Object Detection YOLO* V3 Python* Demo feature the "Sync" and the "Async" ways toggled by the Tab key.

Best Regards,

David

0 Kudos
Yasunori__Aoki
Beginner
855 Views

Hello David

thank you for your answer.
I am currently changing the code.

Best Regards,

Aoki

0 Kudos
Reply