Gesture Recognition

1. Gesture recognition instructions

  1. The gesture recognition used in this routine is based on the service of Baidu Intelligent Cloud Platform. This service has 50,000 free use opportunities every day. It is only for learning and not for commercial purposes. If you need long-term use, please purchase related services. Our company No responsibility is assumed.

  2. Request API description. Official API address reference: https://cloud.baidu.com/doc/BODY/s/ajwvxyyn0. After opening the official API address with a browser, log in to your Baidu account in the upper right corner. If you do not have a Baidu account, please register first.

  1. After logging in, click ‘Products’ - ‘Artificial Intelligence’ - ‘Face and Human Body Recognition’ - ‘Human Body Analysis’ on the menu bar.

  1. Click ‘Gesture Recognition’ in the product list.

  1. Click to use now

  1. Next, you will automatically enter the background management of human body analysis, click Create Application

  1. After filling in the relevant information, click Create Now. After the creation is completed, click the application list to see the information of the just created application. At this time, copy and save the information under AppID, API Key and Secret Key.

Note: You need to get the free identification quota here. You can select all the functions when you get it

  1. Gestures supported by gesture recognition and example images:

  1. API functions

Gesture recognition return data parameter details:

 

Gesture recognition return example:

2. Main code

After entering the Raspberry Pi 5 desktop, open a terminal and run the following command to start the container corresponding to Dofbot:

Access Jupyter Lab within Docker:

Code path:/root/Dofbot/6.AI_Visuall/4.Gesture recognition.ipynb

To import Baidu API, the important thing is to change the secret key to the one you applied for.

Camera display component

Main display and display results program.

After the code block is run, you can see the recognition screen. Note, if you cannot identify Baidu, apply for your own secret key.