Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Yasunori__Aoki
Beginner
105 Views

Switching between synchronous and asynchronous

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
105 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

Yasunori__Aoki
Beginner
105 Views

Hello David

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

Best Regards,

Aoki

Reply