In the previous section, we learned about detecting multiple objects and segmenting them. In this section, we will learn about detecting multiple people in an image, as well as detecting the keypoints of various body parts of the people present in the image using Detectron2. Detecting keypoints comes in handy in multiple use cases. such as in sports analytics and security.
For this exercise, we will be leveraging the pre-trained keypoint model that is available in the configuration file:
The following code is available as Human_pose_detection.ipynb in the Chapter10 folder of the book's GitHub repository - https://tinyurl.com/mcvp-packt The code contains URLs to download data from. We strongly recommend you to execute the notebook in GitHub to reproduce results while you understand the steps to perform and explanation of various code components from text.
- Install all the requirements as shown in the previous section:
!pip install detectron2 -f \
https://dl...