Introducci贸n y Visi贸n General de SecureVision AI
Introducci贸n a SecureVision AI y CCTV
Fundamentos de Visi贸n Computarizada en CCTV
Procesamiento de Im谩genes y Fundamentos de OpenCV
Introducci贸n a OpenCV para An谩lisis de CCTV
Creaci贸n y An谩lisis de Heatmaps con OpenCV
Quiz: Procesamiento de Im谩genes y Fundamentos de OpenCV
Segmentaci贸n de Im谩genes con YOLO
Configuraci贸n de Modelos Preentrenados para Segmentaci贸n con YOLO
Integraci贸n de Segmentaci贸n en Tiempo Real y Generaci贸n de Heatmaps
Quiz: Segmentaci贸n de Im谩genes con YOLO
Detecci贸n de Objetos con YOLO
Introducci贸n a la Detecci贸n de Objetos con YOLO
Configuraci贸n y Uso de Modelos YOLO Preentrenados
Implementaci贸n de un Sistema de Conteo de Personas con YOLO
Quiz: Detecci贸n de Objetos con YOLO
Pose Estimation con Mediapipe
Fundamentos de Pose Estimation con Mediapipe
Seguimiento y An谩lisis de Miradas con Mediapipe
Generaci贸n de Heatmap de Miradas con Mediapipe y OpenCV
Quiz: Pose Estimation con Mediapipe
Entrenamiento y Creaci贸n de Modelos Personalizados con YOLO
Entrenamiento de un Modelo YOLO para Detectar Defectos en Soldaduras Industriales - Parte 1
Entrenamiento de un Modelo YOLO para Detectar Defectos en Soldaduras Industriales - Parte 2
Etiquetado de Im谩genes con Label Studio
Reflexi贸n y Cierre del Curso
You don't have access to this class
Keep learning! Join and start boosting your career
The detection of poses and minutiae of the human body using artificial intelligence has revolutionized multiple industries, from retail to medicine. MediaPipe, developed by Google, offers powerful and accessible solutions to implement these technologies in real projects. In this content, we will explore how to use MediaPipe to create heat maps to analyze customer behavior for specific products.
MediaPipe is an open source tool developed by Google that offers several solutions for image and video analysis. Its main features include:
This library can identify up to 33 characteristic points on the human body, ranging from head to toe, including shoulders, elbows, hands, knees and ankles. In addition, it offers the ability to detect more than 400 points on the face alone, making it an extremely detailed tool for body analysis.
To start using MediaPipe in our projects, we need to have some dependencies installed:
pip install mediapipe
The basic implementation to detect poses follows these steps:
import cv2import mediapipe as mp
# Initialize MediaPipe componentsmp_drawing = mp.solutions.drawing_utilsmp_pose = mp.solutions.pose
# Set up pose detection = mp_pose.Pose( min_detection_confidence=0.5, min_tracking_confidence=0.5, static_image_mode=False)
# Capture video (0 for built-in camera, 1 for external camera)cap = cv2.VideoCapture(1)
while cap.isOpened(): success, frame = cap.read() if not success: break
# Convert from BGR to RGB (MediaPipe requires RGB) frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
# Process frame to detect poses results = pose.process(frame_rgb)
# Draw landmarks and connections if results.pose_landmarks: mp_drawing.draw_landmarks( frame, results.pose_landmarks, mp_pose.POSE_CONNECTIONS )
# Show the result cv2.imshow('MediaPipe Pose', frame)
# Exit with key 'q' if cv2.waitKey(1) & 0xFF == ord('q'): break
# Release resourcescap.release()cv2.destroyAllWindows()
This code configures MediaPipe to detect poses with a 50% confidence threshold for both initial detection and follow-up. The static_image_mode=False
parameter optimizes performance for video, improving latency.
Landmarks are specific coordinates that MediaPipe identifies on the human body. Each point has a precise location and represents a relevant joint or anatomical feature.
In the case of the pose solution, MediaPipe identifies 33 landmarks distributed throughout the body:
These points are connected by lines (represented as POSE_CONNECTIONS
in the code) to form a virtual skeleton that is superimposed on the image of the detected person.
The importance of these landmarks lies in the fact that they allow:
For the specific challenge of creating heat maps that show what attracts people to certain products, we need to focus on specific characteristic points. Although in this case we will focus on face landmarks in the next implementation, the basic concept involves:
This approach allows retailers to
The full implementation of facial point-based heat mapping will be addressed in the next phase of the project, where we will focus specifically on tracking facial features to determine where the customer is looking.
MediaPipe pose detection technology offers fascinating possibilities for analyzing human behavior in commercial environments. Have you ever implemented eye-tracking systems in your projects? Share your experience and questions in the comments.
Contributions 2
Questions 0
Want to see more contributions, questions and answers from the community?