Full text
João Pedro Borges Araújo Oliveira e Silva UMinho | 2020 Development of Human Body Pose Detection Algorithms for In- Car Scenario, and Validation with Suitable Ground-Truth System Universidade do Minho Escola de Engenharia João Pedro Borges Araújo Oliveira e Silva Development of Human Body Pose Detection Algorithms for In-Car Scenario, and Validation with Suitable Ground-Truth System May, 2020
Doctoral Thesis in Electronics and Computers Engineering Trabalho efetuado sob a orientação do Jaime Francisco Cruz Fonseca João Pedro Borges Araújo Oliveira e Silva Development of Human Body Pose Detection Algorithms for In-Car Scenario, and Validation with Suitable Ground-Truth System Universidade do Minho Escola de Engenharia May, 20 20
DIREITOS DE AUTOR E CONDIÇÕES DE UTILIZAÇÃO DO TRABALHO POR TERCEIROS Este é um trabalho académico que pode ser utilizado por terceiros desde que respeitadas as regras e boas práticas internacionalmente aceites, no que concerne aos direitos de autor e direitos conexos. Assim, o presente trabalho pode ser utilizado nos termos previstos na licença abaixo indicada. Caso o utilizador necessite de permissão para poder fazer um uso do trabalho em condições não previstas no licenciamento indicado, deverá contactar o autor, através do RepositóriUM da Universidade do Minho. Licença concedida aos utilizadores deste trabalho Atribuição CC BY https://creativecommons.org/licenses/by/4.0/
iii Acknowledgments Começo por agradecer aqueles que me são mais importantes, a minha família. Catarina, companheira, confidente, fonte de energia e inspiração. Aos meus pais, José e Maria, por serem uma fonte basilar do meu ser, por me terem moldado na pessoa que sou hoje, e por mais uma vez serem um agente importante numa etapa da minha vida, o meu Doutoramento. Às minhas irmãs, Maria e Ana, e cunhado Jorge que sempre foram e sempre serão uma fonte de apoio e inspiração em todas as fases da minha vida. Sem vós não teria conseguido ultrapassar esta nova etapa. Ao meu afilhado Henrique e sobrinho Afonso, são e serão a minha fonte de inspiração, e para sempre o meu destino será moldado ao vosso. Quero agradecer aos meus avós António e Aurora e aos meus tios Toni e Gaspar, que já não estando aqui comigo, sei que estarão sempre a meu lado. Aos meus padrinhos, José e Rosa, à minha tia Maria da Glória, aos meus primos Manuel, Mafalda, Mariana e Nuno. Aos meus sogros Lima e Sameiro, e cunhados Abilio e Sofia. A ti Mina, um obrigado por estares sempre presente, disponivel, alegre em todos os momentos que mais precisei. Quero agradecer ao meu orientador, Doutor Jaime Cruz Fonseca, por me ter acompanhado neste Doutoramento, por me ter apoiado em todos os momentos de dificuldade. Pessoa cuja partilha vai para além da formalidade, conheci como professor mas hoje tenho como amigo. Ao professor José Mendes por ter acreditado nas minhas capacidades e me ter dado autonomia de gestão e decisão ao longo de todo o projeto INNOVCAR: DMC2.0. Pelo seu apoio nos momentos mais criticos. I would also like to thank my colleagues, Helena, Bruno, Nelson, Sandro, José Brito, Victor Coelho, Johannes Pallauf, Maximilian Schiller, without them i would not be able to fullfill all my Doctoral plan expectactions, due to their friendship, technical skills and empathy, a sincere thank you. This work is supported by: European Structural and Investment Funds in the FEDER component, through the (COMPETE 2020) [Project nº 002797; Funding Reference: POCI-01-0247-FEDER-002797]. A todos vós, o meu obrigado sincero! João Pedro
iv STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that i have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that i have fully acknowledged the Code of Ethical Conducted of the University of Minho. Full name: João Pedro Borges Araújo Oliveira e Silva Signature: University of Minho, May 29, 2020
v Abstract Automated driving cars are emerging, increasing the need for advanced occupant monitoring applications. A transversal need for such systems is the detection of the occupants’ posture. Discriminative approaches have received increased focus in the past decade, due to its automated detection and the growth in Machine Learning (ML) applications and frameworks. One of its downsides is the need for a large dataset to train, to achieve high accuracy. To allow a robust algorithmic training and validation, an algorithmic development pipeline able to generate both real and synthetic datasets in the in-car scenario needs to be established, together with adequate evaluationprocedures, this thesis addresses such development. The approach focuses first in two toolchains for in-car human body pose dataset generation: (1) real, and (2) synthetic. The first toolchain uses two types of sensors for the data generation: (1) image data is captured through a Time- of-Flight (ToF) sensor, and (2) human body pose data (ground-truth) is captured through an inertial suit and optical system. Besides quantifying the inertial suit inherent sensitivity and accuracy, the feasibility of the overall system for human body pose capture in the in-car scenario was demonstrated. Finally, the feasibility of using system generated data (which was made publicly available) to train ML algorithms is demonstrated. The second toolchain uses the features and labels from the previous one, in this case both sensors are synthetically rendered. The toolchain creates a customized synthetic environment, comprising human models, car, and camera. Poses are automatically generated for each human, taking into account a per-joint axis Gaussian or incremental distribution, constrained by anthropometric and Range of Motion measurements. Scene validation is done through collision detection. Rendering is focused on vision data, supporting ToF and RGB cameras, generating synthetic images from these sensors. The feasibility of using synthetic data (which was made publicly available), combined with real data, to train distinct machine learning agorithms is demonstrated. Finally, several algorithms were evaluated, and a Deep Learning (DL) based algorithm, namely Part Affinity Fields, was selected, customized and trained with datasets generated with the previously mentioned toolchains, ultimately aiming to improve accuracy for the in-car scenario.
vi Resumo Veículos totalmente autónomos estão a emergir, aumentando a necessidade de um sistema de deteção avançada dos ocupantes. Uma necessidade transversal destes sistemas é a deteção da postura dos ocupantes. Abordagens discriminativas tem gerado um maior interesse na última década, muito devido à sua deteção automática bem como ao aumento de aplicações de Machine Learning (ML).Contudo, estes necessitam de um grande conjunto de dados de treino, de forma a aumentar a precisão. Para permitir um treino e validação robusta, é necessário estabelecer um pipeline de desenvolvimento algoritmico capaz de gerar conjuntos de dados reais e sintéticos para o cenário automóvel, juntamente com procedimentos de avaliação adequados, esta tese visa este desenvolvimento. Esta foca-se inicialmente no desenvolvimento de duas toolchains para a geração de datasets de pose humana no interior do veículo: (1) reais, e (2) sintéticos. A primeira toolchain utiliza dois tipos de sensores para a geração de dados: (1) imagens através de um sensor Time-of-Flight (ToF), e (2) a pose humana (ground-truth) é através de um fato inercial e um sistema óptico. Para além de quantificar a sensibilidade e precisão inerente do sistema inercial, a viabilidade do sistema completo para captura de pose humana no interior do veículo foi demonstrada. Por fim, é demonstrada a viabilidade de usar dados reais (disponibilizados publicamente), para treinar algoritmos ML. A segunda toolchain utiliza as mesmas features e labels da anterior, neste caso ambos os sensores são sintéticos. Esta cria um cenário customizavel, constituído por modelos humanos, carro, e câmera. As poses são geradas automaticamente para cada humano, tendo em conta uma distribuição Gaussiana ou incremental, sendo estas restringidas por medidas antropométricas. Diferentes tipos de deteção de colisões são avaliados de forma a validar os dados, nomeadamente corpo-corpo, humano-humano, e humano-carro. A renderização é focada em câmeras ToF e RGB, gerando imagens sintéticas destes sensores. É demonstrada a viabilidade de utilizar dados sintéticos (disponibilizados publicamente), para treinar algoritmos ML. Finalmente, vários algoritmos foram avaliados, e um algoritmo, nomeadamente Part Affinity Fields, foi selecionado, modificado e treinado com os datasets gerados através das toolchains mencionadas anteriormente, de forma a aumentar a sua precisão para o cenário do interior do veículo.
Contents 1 Introduction 1 1.1 Ground-truthsystem.................................. 3 1.1.1 Motion capture systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Human body pose detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 Discriminative Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.2 GenerativeMethods ............................. 10 1.2.3 HibridMethods................................ 13 1.3 Datasets ....................................... 15 1.3.1 Realdatasets................................. 15 1.3.2 Syntheticdatasets .............................. 16 1.4 Motivation ...................................... 17 1.5 Goals......................................... 18 1.5.1 Ground-Truth Implementation and Evaluation . . . . . . . . . . . . . . . . . 18 1.5.2 Real Dataset Toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.3 Synthetic Dataset Toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.5.4 Algorithm Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.5.5 Algorithm Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.6 MainContributions .................................. 21 1.7 StructureoftheThesis ................................ 22 2 Tools Overview 24 2.1 HardwareOverview .................................. 25 2.1.1 InertialSystem................................ 25 2.1.2 ViconSystem ................................ 30 2.1.3 ToFCamera ................................. 33
xiv List of Figures 4.4 ADTF sub-toolchain for real dataset generation: (A) main real dataset recording, and (B) recording for Vicon to ToF temporal alignment. . . . . . . . . . . . . . . . . . . . . . 74 4.5 EVK75123 filter: (A) output, and (B) user configurations, Γ Γ Γ................ 74 4.6 One of the EVK75123 global registers, ImgProcConfig manages the enable/disable of embedded filters. Image adapted from [20]. . . . . . . . . . . . . . . . . . . . . . . . . 75 4.7 EVK75123 initialization: (A) graph, and (B) registers address. . . . . . . . . . . . . . . 76 4.8 ADTF filter for EVK75123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.9 Pico Monstar 105 filter: (A) output, and (B) user configurations, Γ Γ Γ. ........... 77 4.10 Head tracker configuration: (A) Head marker pattern, (B) and (C) Vicon Nexus head object creation. ....................................... 78 4.11 Filter output for Vicon head tracker. . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.12 Marker pendulum motion capture through Vicon and ToF sensor, for temporal alignment between systems: blue highlight represents the Vicon marker, and red highlight represents theToFcamera..................................... 79 4.13 Filter output for Vicon marker tracker. . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.14 Projection of the Vicon’s marker in the ToF x-axis (red) and the marker’s x-axis coordinate in the image frame (blue), giving the delay between systems t(0)T oF V icon t(0)T oF V icon t(0)T oF V icon. Spikes in blue line are related to ToF marker centroid perspective parallax error. . . . . . . . . . . . . . . 81 4.15 Axis-angle representation of both Vicon and Awinda head rotation, giving the delay between systems t(0)V icon Awinda t(0)V icon Awinda t(0)V icon Awinda. ................................. 82 4.16 Vicon world to ToF camera calibration. (A) checkerboard patern with Vicon markers visible to the ToF camera and Vicon system. (B) matlab toolchain for static Vicon and ToF data capture and TC W TC W TC Wcalculation. (C) 3D representation of the coordinate systems when calibrating TC W TC W TC W. W: Vicon global coordinate system; C: ToF optical center; B: Checkerboard objectplanesurface. ................................. 85 4.17 Vicon world to ToF camera calibration frames: (A) markers 3D position (PC B)t′ (PC B)t′ (PC B)t′detected in amplitude frames ampt′,x,y ampt′,x,y ampt′,x,y, (B) markers 3D position (PW B)t′ (PW B)t′ (PW B)t′detected in Vicon system, and (C) markers (PW B)t′ (PW B)t′ (PW B)t′2D position in amplitude frames using TC W TC W TC W........... 87 4.18 Awinda head to Vicon head spatial alignment, TO A TO A TO A. (A) shows the rotation RO A RO A RO Aalignment, and (B) shows the translation PO A PO A PO Aalignment....................... 88 4.19 Rendered frames: (A) amplitude, (B) depth, (C) point cloud. Images (A, B, C) are represented in color for better visualization. . . . . . . . . . . . . . . . . . . . . . . . . . 89
List of Figures xv 4.20 Axis-angle representation between Vicon’s head object and Awinda’s head segment: (A) TE1; (B) TE2. Gray regions highlight the 1st, 2nd and 3rd head maximum rotations for eachsimulatedaction. ................................ 92 4.21 Axis-angle representation between Vicon’s head object and Awinda’s head segment: (A) FE1; (B) FE2; (C) FE3. Blue region highlights the best alignment between both objects, while red region highlights worst alignment. . . . . . . . . . . . . . . . . . . . . . . . 92 4.22 Real dataset frames with associated body pose ground-truth. Representation is done considering the head maximum rotations for each simulated action in each evaluation (Figure 4.20). ........................................ 93 4.23 Real dataset frames with associated body pose ground-truth. Representation is done considering the best and worst head alignment in each evaluation (Figure 4.21). . . . . . . . 94 4.24 Visual representation of input features and output used for each experimental scenario RE#: (RE1) 2D pose estimation from depth images using normalized depth frame as input and 2D body pose as output; (RE2) 2D pose estimation from point cloud using normalized point cloud as input and 2D body pose as output; and (RE3) 3D pose estimation from 2D pose using 2D body pose as input and 3D body pose as output. . . . . . . . . . . . . . 97 4.25 PCKh total for all sub-evaluations, M#, and the three first experimental scenarios, RE#: (A) 2D pose estimation from depth images (RE1); (B) 2D pose estimation from point cloud (RE2); and (C) 3D pose estimation from 2D pose (RE3). Color gradient represents different combinations of datasets. Continuous lines represent one dataset trained for 200 epochs, dotted lines represent two datasets trained in sequence (1st →180 epochs, 2nd →20 epochs), and dashed lines represent two mixed datasets trained for 200 epochs. . . . . . 98 4.26 PCKh for all sub-evaluations, M#, and the three first experimental scenarios, RE#: (1st column) 2D pose estimation from depth images (RE1); (2nd column) 2D pose estimation from point cloud (RE2); (3rd column) 3D pose estimation from 2D pose (RE3); (1st row) Head; (2nd row) Shoulder; (3rd row) Elbow; (4th row) Wrist; and (5th row) Hip. Color gradient represents different combinations of datasets. Continuous lines represent one dataset trained for 200 epochs, dotted lines represent two datasets trained in sequence (1st →180 epochs, 2nd →20 epochs), and dashed lines represent two mixed datasets trainedfor200epochs................................. 99 5.1 Overview of the toolchain pipeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5.2 RGB body part segmentation of the human model. . . . . . . . . . . . . . . . . . . . 105
xvi List of Figures 5.3 C# HMI user input, Γ Γ Γ, for scene initialization: (A) camera, ΓT ΓT ΓT, (B) humans, ΓH h ΓH h ΓH h, and (C) car, ΓC ΓC ΓC. ....................................... 107 5.4 Collision detection types: (A) body to body, (B) human to human, (C) human to car. (D) 3D skeleton, ηsk h ηsk h ηsk h, created from ηbp h,j,a ηbp h,j,a ηbp h,j,a segments’ lengths and joints’ positions to assist in body to body collision detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.5 Blender internal rendering nodes. (Top to Bottom): RGB, Depth, Label. . . . . . . . . . 109 5.6 Rendered frames: (A) depth, (B) noise, (C) NST, (D) labels, (E) RGB and (F) point cloud. Depth images (A, B, C) are represented in color for better visualization. Dots/lines represents the ground-truth (black -> 2D, white -> 3D). . . . . . . . . . . . . . . . . . . . . 110 5.7 Neural Style Transfer (NST) frames: (A) content, (B) style, and (C) resulting NST-based syntheticimage. ................................... 111 5.8 ToF 2.5D depth pixel to 3D point-cloud pixel. . . . . . . . . . . . . . . . . . . . . . . 113 5.9 Ground-truth perspective wrt. ToF image sensor: (A) 2D lshoulder global coordinates to camera 2D pixel coordinates, and (B) 3D lshoulder global coordinates to camera local coordinates. ..................................... 113 5.10 Pico Monstar 105 gaussian noise: (A) gaussian noise σd,x,y σd,x,y σd,x,y for each distance value in plot (B); (B) gaussian noise regression, noise ≡Γn= Γa+ Γb·z+ Γc·z2 noise ≡Γn= Γa+ Γb·z+ Γc·z2 noise ≡Γn= Γa+ Γb·z+ Γc·z2. . . . . . . . 118 5.11 NST spatial control guidance channels frames for input frame: (A to D) Real depth frame, xS xS xS, and its T0 T0 T0,T1 T1 T1and T2 T2 T2guidance channels, and (E to H) Synthetic depth frame, xC xC xC, and its T0 T0 T0,T1 T1 T1and T2 T2 T2guidance channels. . . . . . . . . . . . . . . . . . . . . . . 120 5.12 Toolchain performance when increasing the number of instances i i i, for different number of humans h h h: (A) total gain gainh,i gainh,i gainh,i; (B) single instance processing time, where dashed → Collision, solid →Rendering........................... 123 5.13 Synthetic frames: (A) Car A with male, (B) Car B with female, (C) Car C with female, (D) Car D with male, (E) Car E with female and (F) Car F with male. Depth images (A to F) are represented in color for better visualization. . . . . . . . . . . . . . . . . . . . . . . . 125
List of Figures xvii 5.14 Visual representation of input features and output used for each experimental scenario SE#: (SE1) 2D pose estimation from depth images using normalized depth frame as input and 2D body pose as output; (SE2) 2D pose estimation from point cloud using normalized point cloud as input and 2D body pose as output; (SE3) 3D pose estimation from 2D pose using 2D body pose as input and 3D body pose as output; and (SE4) human body parts segmentation from point cloud images using normalized point cloud as input and segmentation frame as output. . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.15 PCKh total for all sub-evaluations, R#, and the three first experimental scenarios, SE#: (A) 2D pose estimation from depth images (SE1); (B) 2D pose estimation from point cloud (SE2); and (C) 3D pose estimation from 2D pose (SE3). Color gradient represents synthetic data increase with constant real data. Continuous, dashed and dotted lines represent increasing amounts of real samples (for the same real-synthetic ratio). . . . . . . . . . . 128 5.16 PCKh for all sub-evaluations, R#, and the three first experimental scenarios, SE#: (1st column) 2D pose estimation from depth images (SE1); (2nd column) 2D pose estimation from point cloud (SE2); (3rd column) 3D pose estimation from 2D pose (SE3); (1st row) Head; (2nd row) Shoulder; (3rd row) Elbow; (4th row) Wrist; and (5th row) Hip. Color gradient represents synthetic data increase with constant real data. Continuous, dashed and dotted lines represent increasing amounts of real samples (for the same real-synthetic ratio).......................................... 129 5.17 Inference pipeline for the experimental scenario SE4. Normalized point-cloud is used as input for the first U-Net stage, St1 St1 St1, and then masked with its output. The second U-Net stage, St2 St2 St2, uses the masked input and inferes the body parts’ labels. . . . . . . . . . . 130 5.18 SE4 visual representation: first row represents the point cloud input features (represented in depth frame to improve understanding); middle row represents infered body parts’ segmentation; and bottom row represents the label frame. The first two columns represent synthetic samples from the MoLa S25k InCar Dataset (not used in training), while the last three columns represent real samples from the MoLa R10k InCar Dataset (no label frames available). ...................................... 130 6.1 Felzenszwalb et al. matching process in the testing phase. Image adapted from [21]. . . 136 6.2 Felzenszwalb et al. pose detection results in RGB images using DPM method. Image adaptedfrom[21]. .................................. 137
xviii List of Figures 6.3 A tree is a set of nodes and edges organized in a hierarchical fashion. A DT is a tree where each internal node stores a weak (or split) function to be applied to the incoming data. Each leaf stores the final answer (predictor). . . . . . . . . . . . . . . . . . . . . . . 137 6.4 Shotton’s DT example. (A) In each node, a feature given by the difference between the depth intensity of two relative positions (given by the offsets δ1 δ1 δ1and δ2 δ2 δ2) are computed. The value is then compared with a threshold, following to the left or right side of the tree; (B) Two feature examples. The circle denotes the relative points to the evaluated pixel, here represented by a yellow cross. Image adapted from [22]. . . . . . . . . . . . . . . . . 138 6.5 Shotton’s DT implementations: OJR is a regression tree that stores in each leaf an offset for each joint; BPC is a classification tree that stores, in each leaf, the probability of a pixel being a specific body part. Note that, the estimation of 3D joint positions using BPC is not direct (needs an additional algorithm). Image adapted from [22]. . . . . . . . . . . . . 139 6.6 RTW method: (A) The red lines represent the RTW method trained to find the head position, (B) the method starts estimating the belly 3D joint position. The other ones are estimating hierarchically as represented in the figure. Image adapted from [23]. . . . . . . . . . . 140 6.7 YOLO method. This detection method works as a regression model. It divides an image into a SxS SxS SxS grid and for each grid cell predicts nB nB nB bounding boxes, confidence for these boxes, and nC nC nC class probabilities. Image adapted from [24]. . . . . . . . . . . . . . . 140 6.8 PAF method: (A) original image, (B) part confidence map, (C) part affinity fields, and (D) body pose detection result. Image adapted from [25]. . . . . . . . . . . . . . . . . . 142 6.9 PAF method. Architecture of the two-branch deep-learning network. Image adapted from [25]. 142 6.10 ITOP dataset: (A) depth image, (B) point cloud, and (C) ground-truth joints. . . . . . . . 143 6.11 Human silhouette mask construction: (A) original image, (B) region growing result, (C) floor elimination, and (D) final mask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 6.12 Correction of ITOP dataset: (A) joint positions before joints correction, and (B) joint positions afterjointscorrection.................................. 145 6.13 DPM error evaluation with ITOP dataset. (A - C) being the DPM with RGB model, (D - F) being the DPM with depth model, (A and D) represents the entire dataset, (B and E) represents detections under a threshold of 5 cm, and (C and F) represents detections under athresholdof10cm.................................. 148
List of Figures xix 6.14 RTW error evaluation with ITOP dataset. (A - C) being the RTW with depth model, (A) represents the entire dataset, (B) represents detections under a threshold of 5cm, and (C) represents detections under a threshold of 10 cm. . . . . . . . . . . . . . . . . . . . 148 6.15 YOLO error evaluation with ITOP dataset. (A - C) being the YOLO with depth model, (A) represents the entire dataset, (B) represents detections under a threshold of 5 cm, and (C) represents detections under a threshold of 10 cm. . . . . . . . . . . . . . . . . . . . 149 6.16 PAF error evaluation with ITOP dataset. (A - C) being the PAF with RGB model, (D - F) being the PAF with depth model, (A and D) represents the entire dataset, (B and E) represents detections under a threshold of 5 cm, and (C and F) represents detections under a threshold of10cm........................................ 149 6.17 Overview of the proposed method. (A) input depth image, (B) heat map (output of first branch) for the head joint, (C) part affinity fields (output of second branch) for the association between head and neck joints, and (D) final human body pose estimation. . . . . . 150 6.18 Architecture of the convolutional network used in the proposed method. The coral branch concerns the learning of the heat maps for body parts’ detection and the blue branch concerns the part affinity fields for body part associations. Finally, the green branch is related to the label detection for joint categorization. Image adapted from [25]. . . . . . 151 6.19 Architecture implementation in prototxt, Γp Γp Γp, represented in lower level. (A) 10 layers of VGG19, and (B) stage one with three branches: heat maps (L2); part affinity fields (L1); and label detection (L3). ............................... 152 6.20 Real dataset with manual labelling (a black cross per each joint of interest). . . . . . . . 156 6.21 Data augmentation strategy. (A) original depth image, (B) augmented image that simulates the positioning of the camera closer to the driver, and (C) augmented image that simulates the camera being located farther from the driver. . . . . . . . . . . . . . . . . . . . . 158 6.22 Method’s performance (loss in function of epochs) during training in the training (blue line) and validation (red line) datasets. . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 6.23 PCKh total and per joint groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 6.24 Qualitative results of the proposed human body pose detection method. The first row presents examples of good results. In the second row, some examples where the pose estimation failed for a few joints are illustrated, with the ground-truth pose in dashed lines. 161 7.1 Algorithmic evaluation toolchain pipeline for online mode. . . . . . . . . . . . . . . . . 165 7.2 Algorithmic evaluation toolchain pipeline for offline mode. . . . . . . . . . . . . . . . . 165
xx List of Figures 7.3 Algorithmic evaluation toolchain: (A) online evaluation, with ToF and algorithmic interface allowing for qualitative evaluation; and (B) offline evaluation, with dataset and algorithmic interface allowing for quantitative evaluation. . . . . . . . . . . . . . . . . . . . . . . 167 7.4 PCKh total for all training sets, F T # FT# FT#, in each ToF PoV experimental scenarios, F M# FM# FM#: (A) ToF front row PoV (FM1); (B) ToF driver PoV (FM2); and (C) ToF front row and driver PoV (FM3). Color gradient represents different combinations of real datasets, RD# t′ RD# t′ RD# t′. Dotted and dashed lines represent different combinations of synthetic datasets, SD# t′ SD# t′ SD# t′, added to the the full combination of real datasets, F T 3 FT3 FT3...................... 171 7.5 PCKh total for all training sets,FT# FT# FT#, in each ToF PoV experimental scenarios, FM# FM# FM#: (1st column) ToF front row PoV (FM1); (2nd column) ToF driver PoV (FM2); and (3rd column) ToF front row and driver PoV (FM3). (1st row) Head; (2nd row) Shoulder; (3rd row) Elbow; (4th row) Wrist; and (5th row) Hip. Color gradient represents different combinations of real datasets, RD# t′ RD# t′ RD# t′. Dotted and dashed lines represent different combinations of synthetic datasets, SD# t′ SD# t′ SD# t′, added to the the full combination of real datasets, F T 3 FT3 FT3........ 172 7.6 Good quantitative results of the final human body pose detection method for three training configurations, FT # FT# FT#: (1st row) represent FT1 FT1 FT1in both ToF PoV scenarios; (2nd row) represent FT 2 FT2 FT2in both ToF PoV scenarios; (3rd row) represent FT 33 FT33 FT33in both ToF PoV scenarios; (1st to 3rd column) represent FM1 FM1 FM1; (4th to 6th column) represent F M2 FM2 FM2. Good results consider the inferrence from the best training, FT33 FT33 FT33, where it is possible to show that it outperforms the other two trainings in any ToF PoV scenario. . . . . . . . . 174 7.7 Joint failure quantitative results of the final human body pose detection method for three training configurations, FT # FT# FT#: (1st row) represent FT 1 FT1 FT1in both ToF PoV scenarios; (2nd row) represent FT 2 FT2 FT2in both ToF PoV scenarios; (3rd row) represent F T 33 FT33 FT33in both ToF PoV scenarios; (1st to 3rd column) represent FM1 FM1 FM1; (4th to 6th column) representF M2 FM2 FM2. Joint failure is associated with proximity of the joint to the edge of the image (i.e. Wrists), or training error from ground-truth (i.e. proximity of the joint to the ToF sensor, or kinematic forwarding error propagation). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
List of Figures xxi 7.8 Full body failure quantitative results of the final human body pose detection method for three training configurations, FT # FT# FT#: (1st row) represent F T 1 FT1 FT1in both ToF PoV scenarios; (2nd row) represent F T 2 FT2 FT2in both ToF PoV scenarios; (3rd row) represent FT 33 FT33 FT33in both ToF PoV scenarios; (1st to 3rd column) represent FM1 FM1 FM1; (4th to 6th column) represent FM2 FM2 FM2. Full body failure is associated with missing feature information due to the presence of body parts in the ToF sensor dead-zone. . . . . . . . . . . . . . . . . . . . . . . . 175 B.1 Real dataset toolchain: hardware setup. . . . . . . . . . . . . . . . . . . . . . . . . 195 B.2 Real dataset toolchain: car testbed. . . . . . . . . . . . . . . . . . . . . . . . . . . 195 B.3 Real dataset toolchain: recording preparation. . . . . . . . . . . . . . . . . . . . . . 196 B.4 Real dataset toolchain: subject preparation. . . . . . . . . . . . . . . . . . . . . . . 196 B.5 Real dataset toolchain: recording dataset. . . . . . . . . . . . . . . . . . . . . . . . 196 C.1 Innovative car experience: in-car demonstration with subject reading book. . . . . . . . . 197 C.2 Innovative car experience: in-car demonstration with subject making a phone call. . . . . 197 C.3 Innovative car experience: oral presentation. . . . . . . . . . . . . . . . . . . . . . . 198 C.4 Innovative car experience: oral demonstration. . . . . . . . . . . . . . . . . . . . . . 198 C.5 Innovative car experience: live demonstration. . . . . . . . . . . . . . . . . . . . . . 198 D.1 DoCEIS19: oral presentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 E.1 Media system demonstration: Jornal de Notícias. . . . . . . . . . . . . . . . . . . . . 200 E.2 Media system demonstration: SIC. . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
List of Tables 1.1 Algorithmicclasses................................... 6 2.1 MVN models joint label correspondences. Virtual joints (i.e. the model does not perform direct joint estimation) are indicated in bold. . . . . . . . . . . . . . . . . . . . . . . 28 2.2 Vicon models joint label correspondence. Virtual joints (i.e. the model does not perform direct joint estimation) are indicated in bold. . . . . . . . . . . . . . . . . . . . . . . 32 2.3 Pico Monstar 105 use-cases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.1 Reference between sensor address and kinematic-fit segments. . . . . . . . . . . . . . 55 3.2 ISB joints reference with kinematic fit segment origin (joint). . . . . . . . . . . . . . . . 59 3.3 Upper Arm and Upper Leg segment evaluations. . . . . . . . . . . . . . . . . . . . . 66 4.1 Ground-truth joint label correspondance with MVN simplified ISB model from Table 2.1 used in ADTF filter from Algorithm 3.1.5. . . . . . . . . . . . . . . . . . . . . . . . . 90 4.2 Evaluations related with toolchain and public data quantities. Each M# M# M# represents a subevaluation for the assessment of the influence of mixing public datasets with the toolchain generatedone. .................................... 96 4.3 PCKh measure and AUC values averaged over all 14 joints, for the 3 experimental scenarios and all 7 sub-evaluations. Each M# M# M# represents a sub-evaluation for the assessment of the influence of mixing public datasets with the toolchain generated one. EachRE# RE# RE# represents different pose estimation scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . 97 4.4 Evaluation results ([email protected]) per joint group in the three experimental scenarios. Each M# M# M# represents a sub-evaluation for the assessment of the influence of mixing public datasets with the toolchain generated one. EachRE# RE# RE# represents different pose estimation scenarios. ...................................... 98 5.1 RGB code for body part segmentation of human model. . . . . . . . . . . . . . . . . . 106
List of Tables xxiii 5.2 Axis correspondence between MakeHuman model and real human. . . . . . . . . . . . 107 5.3 Body pose joint label correspondence between ground-truth (Table 4.1) and MakeHuman humanmodel. .................................... 114 5.4 Evaluations related with real and synthetic data quantities/ratios. Each R# R# R# represents a sub-evaluation for the assessment of the influence of mixing real and synthetic datasets. . 124 5.5 PCKh measure and AUC values averaged over all 14 joints, for the 3 experimental scenarios and all 10 sub-evaluations. Each R# R# R# represents a sub-evaluation for the assessment of the influence of mixing real and synthetic datasets. Each SE# SE# SE# represents different pose estimationscenarios. ................................. 127 5.6 Evaluation results ([email protected]) per joint group in the first three experimental scenarios. Each R# R# R# represents a sub-evaluation for the assessment of the influence of mixing real and synthetic datasets. Each SE# SE# SE# represents different pose estimation scenarios. . . . . 128 6.1 Algorithmic selection evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.2 Architecture implementation in prototxt, Γp Γp Γp, where FC represents fully-connected, C represents convolution, and P represents pooling. . . . . . . . . . . . . . . . . . . . . . . 152 6.3 AE1 sub-evaluation hiper-parameter configurations: Paugment Paugment Paugment probability of 3D augmenting (i.e. changing the input image); P xaugment Pxaugment Pxaugment probability of translating the camera in the X axis; P yaugment Pyaugment Pyaugment probability of translating the camera in the Y axis; P zaugment Pzaugment Pzaugment probability of translating the camera in the Z axis; σx σx σxstandard deviation for the translation in the X axis; σy σy σystandard deviation for the translation in the Y axis; and σz σz σzstandard deviation for the translation in the Z axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 6.4 AE1 sub-evaluation performance in the evaluation dataset, assessed in terms of distance error (mAD mAD mAD,pixels). ................................. 159 6.5 AE2:2 third branch architecture implementation in prototxt, Γp Γp Γp, where FC represents fullyconnected, C represents convolution, and P represents pooling. . . . . . . . . . . . . . 159 6.6 AE2 sub-evaluation performance in the evaluation dataset, assessed in terms of distance error (mAD mAD mAD,pixels). ................................. 159 6.7 Evaluation results (PC[email protected]) per joint group. . . . . . . . . . . . . . . . . . . . . . 160 7.1 Validation sets. (FE1 FE1 FE1) samples with ToF front row PoV; (FE2 FE2 FE2) samples with ToF driver PoV; and (F E3 FE3 FE3) samples with ToF front row and driver PoV. . . . . . . . . . . . . . . 168
List of Symbols qQuaternion matrix. 26, 54, 58 Gplandmark Positions of anatomical landmarks wrt. the joint origin of the related segment global frame. 26 GSegment global frame. 26 BxVector of the landmark. 26 BBody frame. 26 GBBqOrientation of distal segment. 26 GBAqOrientation of proximal segment. 26 GBqseg Quaternion vector describing the orientation of a segment wrt. the global frame. 26 ϕToF phase shift. 34, 35 s(t)ToF emitted signal. 34, 35 r(t)ToF received signal. 34, 35 dToF pixel-object distance considered the depth frame. 34, 35, 36, 39 dmax ToF pixel-object maximum distance limit due to phase wrapping. 35 lc Light speed constant. 35 C(κ)ToF cross-correlation between emitted and received signals. xii, 34, 35, 36 tA ToF amplitude of the received signal, considered the amplitude frame. 34, 35, 36, 39 tB ToF offset coefficient due to the ambient illumination. 34, 35 fmToF modulation frequency. 34, 35, 75
List of Symbols xxxi τToF time of flight for light sent from the camera and received by it after being reflected by the object. 34, 35 fout EVK75023 output frame rate with temporal filtering. 40 fin EVK75023 output frame rate without temporal filtering. 40, 75 FIFOstacks EVK75023 number of frames for temporal median filtering. 40 IT EVK75123 integration time. 75 NP hase EVK75123 number of phases used for amplitude and depth estimation (2 or 4). 75 CPUclock EVK75123 internal cpu frequency in MHz. 75 ampx,y ToF standard format for a ampltiude frame. 36, 39, 80, 166 depthx,y Standard format for a single depth frame. Blender rendered ToF depth frame. 36, 39, 110, 115, 119, 150, 157, 166 pcfStandard format for a single point-cloud matrix. Blender rendered ToF 3D point-cloud matrix. 36, 39, 112, 115, 121, 166 f2D to 1D concatenated pixel indexing. 82, 84 IMCToF pre-calibrated intrinsic matrix. 81, 86, 90, 156, 157 fxToF pre-calibrated focal length in pixels in x-axis. 81 fyToF pre-calibrated focal length in pixels in y-axis. 81 cxToF pre-calibrated optical center in pixels in x-axis. 81 cyToF pre-calibrated optical center in pixels in y-axis. 81 sk ToF pre-calibrated axes skew angle. 81 λtADTF raw timestamps in microseconds. xii, 45, 47, 55, 57, 58, 74, 77, 84 TADTF number of recorded samples from all filters. 45 Ss,n ADTF data sample containing a set of variables {...}. 45, 54, 55, 58, 59, 74, 77 sADTF filter indexing. 45, 57, 58
xxxii List of Symbols nADTF filter sample indexing. 57, 82 NADTF number of recorded samples for a filter. 45 ΓADTF user data sent to filter. xii, xiv, 44, 54, 74, 77, 78 iADTF filter segment indexing. 57 Qs,n,i ADTF body segment quaternion data sample. 57, 58 Bs,n,i ADTF body segment name data sample. 57 jHuman body/model joint indexing. 58, 61, 62, 82, 105, 153 Bs,n,j ADTF body joint name data sample. 61 ks,n,j ADTF body joint 3D position data sample. 61 Qs,n,j ADTF body joint quaternion data sample. 61 Λt′Matlab synchronized timestamps in microseconds. 57, 58, 84, 88 t′Matlab or Blender synchronized sample indexing. 58, 62, 82, 89, 115, 116, 144 ΓfMatlab user defined frequency for synchronization. 57, 58 δs,t′,i Matlab synchronized data sample containing a set of synchronized variables {...} directly related with Ss,n,i. 57, 58 δs,t′,j Matlab synchronized data sample containing a set of synchronized variables {...} directly related with Ss,n,j. 61, 62 υs,t′,i Matlab synchronized body segment name data sample. 57 φs,t′,i Matlab synchronized body joint quaternion data sample. 57, 58 υs,t′,j Matlab synchronized body joint name data sample. 61 κs,t′,j Matlab synchronized body joint 3D position data sample. 61, 62 φs,t′,j Matlab synchronized body joint quaternion data sample. 61 sΘSensor angle of rotation in euler representation for an individual axis rotation. 52
List of Symbols xxxiii mΘMotor angle of rotation wrt. its rotation axis. 52 sµ Sensor mean error wrt. an individual axis of rotation. 52 sσ Sensor error standard deviation wrt. a axis of rotation. 52 nI Motor rotation iterations. 52 nS Sensor samples in each 360orotation. 52, 63 ξtSensor error in each timestamp wrt. an individual axis of rotation. 52 Pxyz 3D cartesian position. 53, 59, 63, 156, 157 nJ Number of joints. 53, 153, 154 Tpelvis 4x4 Transformation matrix for the pelvis joint wrt. the MVN Awinda global coordinate system. 53 Tpelvis j4x4 Transformation matrix for each joint wrt. the pelvis. 53, 61 ξjIndividual body joint Euclidian error. xiii, 52, 53, 65 θAngle of rotation in axis-angle representation. 54, 58, 81 (q0)cQuaternion conjugate for the first sample used for removal of offset rotation between systems. 54, 81 µiMVN Awinda body segment mean error. 58, 65 σiMVN Awinda body segment error standard deviation. 58 ξt′,i MVN Awinda body segment error for each timestamp. 58 Ms,t′3D mesh from κs,t′,j for each filter where each joint is a xyz vertex position. 61, 62 Tδ2,t′,j δ1,t′,j Transformation matrix that best aligns two body pose samples from MVN Awinda and Vicon systems. 62 µjMVN Awinda body pose joint mean error. 62, 63, 67 σjMVN Awinda body pose joint error standard deviation. 62, 63 ξt′,j MVN Awinda body pose joint Euclidian error for each timestamp. 58, 62, 63 CToF optical center. xiii, 72
xxxiv List of Symbols AMVN Awinda head joint. xiii, 72 JMVN Awinda body joints. xiii, 72, 87 WVicon global coordinate system. xiii, 72 OSubject’s head object tracked by the Vicon system. xiii, 72 TC JTransformation matrix that aligns MVN Awinda body joints wrt. the ToF global coordinate systemr. 72, 88, 89 PC J3x1 Translation matrix for each joint wrt. the the ToF global coordinate system. 90 TA JTransformation matrix that aligns MVN Awinda body joints wrt. the head joint. 87, 88, 89 TO ATransformation matrix that aligns MVN Awinda head joint wrt. the subject’s head joint in Vicon system. xiv, 88, 89 TW OTransformation matrix that aligns the subject’s head joint in the Vicon global coordinate system. 84, 88, 89 TC WTransformation matrix that aligns the Vicon global coordinate system wrt. the ToF global coordinate system. xiv, xxv, 81, 85, 86, 87, 88, 89 PxyCVicon marker 2D pixel position in the ToF image plane (detected by the ToF camera). 80, 81 PxyC marker Vicon marker 2D pixel position in the ToF image plane (detected by the Vicon system). 80, 81 PxyzC marker Vicon marker 3D position in the ToF global coordinate system (detected by the Vicon system). 80, 81 PxyzW marker Vicon marker 3D position wrt. the Vicon global coordinate system. 79, 81 t(0)T oF V icon Time delay between Vicon and ToF in microseconds. 81, 83 t(0)V icon Awinda Time delay between MVN Awinda and Vicon in microseconds. xiv, 81, 82, 83 t(0)T oF Awinda Time delay between MVN Awinda and ToF in microseconds. 83 tCAll timestamps for the ToF sensor λt∩Ss=tof,n. 83 tOAll timestamps for the Vicon system, λt∩Ss=vicon,n. 83
List of Symbols xxxv tAAll timestamps for the MVN Awinda system, λt∩Ss=awinda,n. 83 Ss=tof,n ADTF ToF data sample containing a set of variables {...}. 82, 84 Ss=vicon,n, ADTF Vicon data sample containing a set of variables {...}. 83, 84 Ss=awinda,n,j ADTF MVN Awinda data sample containing a set of variables {...}. 82, 84 AMPn,f ADTF ToF amplitude frame sample. 82, 84 PCn,v ADTF ToF 3D point-cloud matrix sample. 82, 84 vADTF ToF point-cloud matrix 1D concatenated voxel indexing. 82, 84 TnADTF Vicon subject’s head 3D position data sample. 82, 83, 84 RnADTF Vicon subject’s head quaternion data sample. 82, 83, 84 δs=tof,t′Matlab synchronized data sample containing a set of synchronized variables {...} directly related with Ss=tof,n. 82 δs=vicon,t′Matlab synchronized data sample containing a set of synchronized variables {...} directly related with Ss=vicon,n. 83, 84 δs=awinda,t′,j Matlab synchronized data sample containing a set of synchronized variables {...} directly related with Ss=awinda,n,j. 82, 84 deptht′,x,y Standard dataset depth frame format. Matlab synchronized ToF depth frames. 82, 84, 89, 116, 120, 144, 155, 166, 168 ampt′,x,y Standard dataset amplitude frame format. Matlab synchronized ToF amplitude frame. xiv, 82, 84, 86, 87, 89, 166 XToF horizontal resolution. 89, 120 YToF vertical resolution. 89, 120 pct′,f Standard dataset 3D point-cloud matrix format. Matlab synchronized ToF 3D point-cloud matrix. 82, 89, 116, 166, 168 pcxt′,f Matlab synchronized ToF 3D point-cloud matrix x-coordinates. 82, 84, 89, 90, 116
xxxvi List of Symbols pcyt′,f Matlab synchronized ToF 3D point-cloud matrix y-coordinates. 82, 84, 89, 90, 116 pczt′,f Matlab synchronized ToF 3D point-cloud matrix z-coordinates. 82, 84, 89, 90, 116 κt′,j Matlab synchronized MVN Awinda body joints 3D position data sample. 82, 84, 87 φt′,j Matlab synchronized MVN Awinda body joints quaternion data sample. 82, 84, 87 ρt′Matlab synchronized Vicon subject’s head 3D position data sample. 82, 83, 84 ϱt′Matlab synchronized Vicon subject’s head quaternion data sample. 82, 83, 84, 88 φt′,head Matlab synchronized MVN Awinda head quaternion data sample. 87, 88 κt′,head Matlab synchronized MVN Awinda head joint 3D position data sample. 87 TC BTransformation matrix that aligns the checkerboard plane wrt. the ToF global coordinate system. 85, 86 PC B3x1 matrix with the 3D position of the set of markers wrt. the ToF global coordinate system. 85, 86 pC B3x1 matrix with the origin coordinate system of the ToF global coordinate system. 85, 86 µPC B3x1 matrix with the centroid of the set of markers wrt. the ToF global coordinate system. 85, 86 TW BTransformation matrix that aligns the checkerboard plane wrt. the Vicon global coordinate system. 85, 86 PW B3x1 matrix with the 3D position of the set of markers wrt. the Vicon global coordinate system. 85, 86 pW B3x1 matrix with the origin coordinate system of the Vicon global coordinate system. 85, 86 µPW B3x1 matrix with the centroid of the set of markers wrt. the Vicon global coordinate system. 85, 86 BSet of 4 markers in a checkerboard plane. 85 cvM Covariance matrix. 85, 86 VSingle Value Decomposition term. 85, 86 USingle Value Decomposition term. 85, 86 dt Single Value Decomposition terms determinant. 85, 86
List of Symbols xxxvii RC WRotation matrix that aligns the Vicon global coordinate system wrt. the ToF global coordinate system. 85, 86 I4x4 identity matrix. 85, 86 (PxyC B)t′2x1xt′matrix with the 2D pixel position of the set of markers wrt. the ToF global coordinate system. 86 (PC B)t′3x1xt′matrix with the 3D position of the set of markers wrt. the ToF global coordinate system. xiv, 86, 87 (PW B)t′3x1xt′matrix with the 3D position of the set of markers wrt. the Vicon global coordinate system. xiv, 86, 87 TA4x4 Transformation matrix for the head joint wrt. the MVN Awinda global coordinate system. 87 RA3x3 Rotation matrix for the head joint wrt. the MVN Awinda global coordinate system. 87, 88 PA3x1 Translation matrix for the head joint wrt. the MVN Awinda global coordinate system. 87, 88 TJ4x4 Transformation matrix for the each joint wrt. the MVN Awinda global coordinate system. 87, 88 RJ3x3 Rotation matrix for the each joint wrt. the MVN Awinda global coordinate system. 87 PJ3x1 Translation matrix for each joint wrt. the MVN Awinda global coordinate system. 87 PO3D mesh where each vertex is a rotation of vector P with the Vicon head tracker rotations for each timestamp. 88 P3x1 vector. 88 RW ORotation matrix that aligns the subject’s head joint in the Vicon global coordinate system. 88 RO ARotation matrix that aligns MVN Awinda head joint wrt. the subject’s head joint in Vicon system. xiv, 88 PO ATranslation matrix that aligns MVN Awinda head joint wrt. the subject’s head joint in Vicon system. xiv, 88 RDt′Real dataset comprised by the group of dataset information for each synchronized time frame. 89, 116, 164, 166, 168
xxxviii List of Symbols PxyC JStandard 2D human body pose sample format. MVN Awinda joints 2D pixel position in the ToF image plane. 89, 90, 116, 144, 150, 153, 157, 166, 168 PxyzC JStandard 3D human body pose sample format. MVN Awinda joints 3D position wrt. the ToF global coordinate system. 90, 116, 157, 166, 168 ΓNF Blender user defined number of samples to render. 115 HNumber of Blender MakeHuman human models. 105, 116 Af Number of axis of freedom on each joint of a MakeHuman human model. 105, 108, 116 Jf Number of joints that can have freedom of movement on a MakeHuman human model, ΓT. 105, 108, 116, 121 ΓTBlender user defined ToF model. xvi, 106, 107, 115 ΓXBlender user defined ToF horizontal resolution. 106 ΓYBlender user defined ToF vertical resolution. 106 ΓHF oV Blender user defined ToF horizontal field of view. 106 Γtp Blender user defined ToF 3D position. 106 Γto Blender user defined ToF 3D orientation. 106 ΓnBlender user defined ToF axial noise model quadratic equation. 106, 118, 119 ΓaBlender user defined 1st term of from the ToF axial noise model quadratic equation. 106, 110, 118 ΓbBlender user defined 2nd term of from the ToF axial noise model quadratic equation. 106, 110, 118 ΓcBlender user defined 3rd term of from the ToF axial noise model quadratic equation. 106, 110, 118 ιBlender internal ToF model created from a user defined ToF model. 106, 115, 121 ιXBlender internal ToF horizontal resolution. 106, 112, 121 ιYBlender internal ToF vertical resolution. 106, 112, 121 ιHF oV Blender internal ToF horizontal field of view. 106, 112, 121 ιpBlender internal ToF 3D position. 106
List of Symbols xxxix ιoBlender internal ToF 3D orientation. 106 ιnBlender internal ToF axial noise model quadratic equation. 106 ΓCBlender user imported/defined car model. xvi, 106, 107, 115 Γcp Blender user defined car model 3D position. 106 Γco Blender user defined car model 3D orientation. 106 Γcm Blender user imported car model mesh. 106 ζBlender internal car model created from a user imported/defined car model. 106, 115 ζpBlender internal car model 3D position. 106 ζoBlender internal car model 3D orientation. 106 ζmBlender internal car model mesh. 106, 108, 115, 117 ΓH hBlender user imported/defined MakeHuman human model. xvi, 105, 107, 115 Γg h,j,a Blender user defined MakeHuman human model Gaussian motion profile associated to each of its joints axes. 105, 108, 115, 116 Γµ h,j,a Blender user defined MakeHuman human mode Gaussian mean value motion profile associated to each of its joints axes. 105, 108, 116 Γσ h,j,a Blender user defined MakeHuman human mode Gaussian standard deviation value motion profile associated to each of its joints axes. 105, 108, 116 Γinc h,j,a Blender user defined MakeHuman human model incremental motion profile associated to each of its joints axes. 105, 108 Γip h,j,a Blender user defined MakeHuman human model initial pose (3D position and rotation) associated to each of its joints axes. 105, 115 aBlender MakeHuman human model axis indexing. 105 Γrgb hBlender user imported MakeHuman human model RGB skin texture. 105, 112, 115 Γlb hBlender user imported MakeHuman human model label skin texture. 105, 112, 115
Chapter 1 Introduction This chapter presents the concept of human body pose detection, both outside and inside the vehicles, as well as its validation with ground-truth systems. These concepts are the driving factor for the goals and contributions of this thesis. The organization of the dissertation is also listed at the end of this chapter. With current development and deployment of Advanced Driver-Assistance Systems, higher levels of car automation will be available. With them, the human factor inside the car will also change. These modifications require advanced systems for passenger detection, their behaviours and the way they interact with the vehicle. Due to this fact, systems that allow for passenger body pose detection inside of vehicles are the determinant factor to ensure both safety and comfort. Currently, there are several known R&D groups already focused in this or in other use cases, such as Laboratory for Intelligence & Safe Automobiles [26, 27, 28, 29, 30], and Stanford Artificial Intelligence - Toyota Center For AI Research [31, 32, 33, 34, 35]. Others show the same focus but outside the automotive industry, such as Fraunhofer Institute of Optronics, System Technologies and Image Exploitation [36, 37, 38, 39], and Carnegie Mellon University (CMU) [40, 41, 42]. To achieve a system able to monitor occupant’s body pose, it is necessary to develop a suitable technology for monitoring (i.e. image sensor), and an algorithm to detect the human body pose. This algorithm can be seen as a measuring device, and to validate such device there is the need to do so with a higher performance one (i.e. ground-truth system). This system must be capable of measuring the human body pose, and evaluate the developed algorithm. Contents 1.1 Ground-truthsystem................................. 3 1.1.1 Motion capture systems . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 1. Introduction 1.2 Human body pose detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 Discriminative Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.2 Generative Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2.3 HibridMethods............................... 13 1.3 Datasets ...................................... 15 1.3.1 Realdatasets................................ 15 1.3.2 Syntheticdatasets ............................. 16 1.4 Motivation ..................................... 17 1.5 Goals........................................ 18 1.5.1 Ground-Truth Implementation and Evaluation . . . . . . . . . . . . . . . . 18 1.5.2 Real Dataset Toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.3 Synthetic Dataset Toolchain . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.5.4 Algorithm Development . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.5.5 Algorithm Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.6 MainContributions ................................. 21 1.7 StructureoftheThesis ............................... 22
1.1. Ground-truth system 3 1.1 Ground-truth system The ground-truth concept is related to the measurements made in cartography, where the remotely captured information from satellites would be validated with measurements made on the ground. In what concerns the information captured by Global Positioning System for investigation in the field of transportation, ground-truth refers to what the traveler is doing (i.e. travel time, distance, etc.) [43]. However, this concept can be applied transversally in other fields of 3D positioning, where to validate/calibrate a measurement device, you need a device that works has a standard (i.e. ground-truth system). This system can and must be contextualized with metrology [44]. Its concept can be applied in its different action fields, namely the scientific metrology, that ensures the organization, development and maintenance of measurement standards; the industrial metrology, that ensures the performance of measurement devices used in industry and industrial processes; and the legal metrology, that has the purpose to ensure the level of accuracy of measurements when they influence the transparency of economical, health and safety transactions. For a better understanding of this system functionality, we can use the applied standard process in industrial metrology, that is represented in Figure 1.1. Figure 1.1: Standard process in industrial metrology. Image adapted from [1]. In this process, the main objective is to insure the quality of the measurement devices used by the end consumer. To achieve this, it is necessary to use devices with high accuracy and reduced uncertainty, that will serve as standard for end devices calibration. This system must have fundamental concepts in its conception, namely that its metrological static and dynamic characteristics have a higher performance than the device being calibrated (i.e. usually with a relation of 1:10 or 1:4). As a conclusion, to validate the human body pose estimation algorithm, it is necessary to develop a ground-truth system with 6 Degrees-of-Freedom (DoF) for each human body joint (i.e. motion capture system). As mentioned previously, this system must have a higher performance than the human body pose detection, namely in terms of accuracy, precision,
4 1. Introduction uncertainty, resolution, range, drift and hysteresis. In 2006, Moeslund et al. [45] made a survey of advances made between 2000 and 2006 in vision-based human motion capture. With over three hundred related publications identified in major conferences and journals, it was possible to identify the main technological challenges, and the key advances that it: •Initialization: Automatic initialization of model shape, appearance and pose for human motion reconstruction; •Tracking: Tracking of multiple people in unstructured outdoor scenes, using appeareance, shape and motion from figure-ground segmentation; •Human motion reconstruction from multiple views: Techniques to efficiently search for space of possible pose configurations for robust reconstruction from mutiple view video acquisistion. Current approaches capture gross body movement but do not accurately reconstruct fine detail such as hand movements or axial rotations; •Monocular human motion reconstruction: Human motion capture from single views with stochastic sampling techniques using learnt motion models to constrain reconstruction based on movement; •Pose estimation in natural scenes: Probabilistic assemblies of parts based on robust body part detection has achieved 2D pose estimation in challenging cluttered scenes such as film footage; •Recognition: Understanding behavior and action for surveillance applications towards automatic detection of unusual activities. It is easy to understand that motion capture is of high demand in different areas, leaving us with an increasing number of scientific articles about the subject. From 2006 to 2017, the scientific interest in motion capture stayed relevant. To get a grasp on the current methodologies, it requires a continuous and extensive work. At the moment, more than 400 publications at journals are accounted for. 1.1.1 Motion capture systems Generating real data for Machine Learning (ML) algorithms is an important task in a wide range of areas. Motion capture data for the in-car scenario can be seen has a difficult task, given the lack of motion capture systems that can reliably work in it. Although there are accurate motion capture systems available, they are not focused in heavily occluded scenarios. The alternative can involve eletromagnetic or inertial based systems, solving the occlusion problem, but adding a new limitation - the magnetic distortion sensitivity.
1.1. Ground-truth system 5 Eletromagnetic systems Systems such as Polhemus (Polhemus, Vermont, United States) are eletromagnetic based, and despite being highly accurate, they suffer from eletromagnetic disturbances from external sources, such as metals or electronic devices. Mitobe et al. [46] were able to track finger movement of pianists with a spatial resolution of 3.8µm, although it also showed the complexity of the setup and the need for placing a single wired sensor for each tracked joint. Other wireless solutions are available through the Polhemus Liberty latus [47, 48], allowing full body motion capture, but still suffering from the same sources of uncertainty. Optical systems Optical based motion capture systems are used across several R&D fields [49, 50, 51] and can be separated in two types: (1) marker-based with high accuracy, illumination imunity and high setup time; and (2) markerless with fast setup time but with reduced accuracy and higher sensitivity to light conditions. Although marker-based systems, such as the Vicon system (Vicon, Oxford, UK), are the gold standard for motion capture, they suffer from the fact that they need to have the markers in line of sight to guarantee acurate tracking. Rahmatalla et a. [52] circumvented the occlusion problem by adding virtual (calculated) markers while tracking a seated operator in-lab. However, they only focused on the lateral pelvis’ markers. Considering the technical limitations of the most robust motion capture systems, it is not feasable to use them alone for the in-car environment. Inertial and magnetic measurement units (IMMUs) Inertial and Magnetic Measurement Units (IMMUs) based systems are an alternative to optical systems since they do not need the subject to be in line of sight. Theoretically, they are able to infer body segment orientation as well as joints’ positions, althought they are prone to errors caused by drift or magnetic sensitivity. Another issue for the estimation of full body kinematics is related to the need of a biomechanical model and its initial calibration. Current biomechanical models are proposed by the Internal Society of Biomechanics (ISB) [53]. For example, Xsens (Xsense, Enschede, Netherlands) uses a modified version with 23 segments and 22 joints [54]. During calibration, the subject needs to stand in a calibration posture, known as the N-Pose or T-Pose, which assumes that all segments are aligned and the coordinate systems of all joints are parallel to one another. This initial assumption adds a systematic error that offsets the segments’ orientations and joints’ positions. In its thesis [55], Monica Orozco compared MVN BIOMECH Awinda from Xsense against Vicon Nexus through the study of gait kinematics with calibration postures that deviate from the standard
6 1. Introduction N-Pose, showing that the error introduced could be considered as a shift in joint angle values while the shape was not affected. It was also possible to understand that this error could be corrected with the information of the true body posture captured during the calibration procedure. Two correction approaches were proposed (Orientation Correction and Planar Angle Correction), giving the possibility to achieve an initial calibration procedure for human subjects that are not able to attain a N-Pose. 1.2 Human body pose detection Human body pose detection represents an extensive research challenge for a great deal of applications. In general, these methods can be divided in two main classes: generative and discriminative. Generative approaches are designed to fit and deform a model to match with the image to detect the pose [5, 56, 57, 58, 6, 59, 60, 7, 61]. Discriminative approaches are designed to learn a mapping from image features to a body pose, using only the information of the image [2, 22, 3, 4, 62, 63, 39]. To define the best approach to detect the human body, it is needed to weight the pros and cons of both methodologies (Table 1.1). Table 1.1: Algorithmic classes. Classes Advantages Disadvantages Discriminative -No need for tracking method -Fast after training -Without error accumulation -Efficiency -No explicit model -Big training dataset Generative -Explicit model -Correlation between body parts -Needs initialization -Slow after training -Local minima Regarding the generative ones, the main advantage is the robustness, once these methods fit one or more previous models to the image, allowing to introduce shape prior information to the method. However, this class of methods uses error minimization functions, being susceptible to be trapped in local minima and having a high computational cost. In opposite, the discriminative methods are fast after training, allowing to achieve real time detection. Moreover, these methods are capable of dealing with large body shape variations. The main problem associated with discriminative approaches is that they are inherently limited by the amount and the quality of the training data, requiring a large training dataset to avoid overfitting and generalization problems. Weighting the advantages/disadvantages of each methodology and considering
1.2. Human body pose detection 7 that a pose detection algorithm with real time capability is needed in our scenario, it was decided to follow a discriminative approach. 1.2.1 Discriminative Methods Depth based discriminative approaches consist on different methods. Body part detection of the human body can be done by identifying salient points [64], or regression methods by regressing a mapping function from a large set of training data [2, 22, 3, 4, 63, 39]. This approach has the potential of generalizing to different body shapes, invariant to pose, body shape, clothing. The processing efficiency is high, allowing higher frame rate with enough DoF information related to the skeletal tracking. The down side is that the training process is computationally expensive (i.e. Kinect API requires 300k poses to be trained in 24 hours on a 1000 core cluster). Although the inference is fast and reliable, it does not work well with occlusion, because the processing is done frame-by-frame and it does not take into account the movement in time and its prediction. To develop the present Kinect Application Programming Interface (API) for skeletal tracking, Shotton et al. [2] used a large and varied (real and synthetic body pose data) training dataset that allowed the classifier to estimate body parts invariant to pose, body shape, clothing, etc. The 900k poses were filtered to 300k by just constraining the minimal distance between joints (5mm). They were used to train a Random Forest Classifier (RFoC) for body part segmentation from a single depth image. The system runs at 200 frames per second (fps) on a consumer hardware, where the computational processing was being done on the Xbox Graphics Processing Unit (GPU) (Figure 1.2). Figure 1.2: Shotton et al. human body pose detection algorithm: from depth, to body parts, to 3D joint proposal. Image adapted from [2]. Buys et al. [3] used a similar approach to Shotton et al. [2] with some differences residing on the inferring process. Shotton et al. assumed that the camera had a fixed position, so it was possible to first do a depth based background subtraction and then evaluate the pixels with the Random Decision Forest. Buys et al.
8 1. Introduction assumed that the camera did not have a fixed position so it had to evaluate all pixels without doing depth based background subtraction, which reduces the accuracy of the skeletal tracking. To solve this, there was a second stage after pose inferring (i.e. body part segmentation inferring followed by joint position calculation), where the RGB body silhouette was used to remove wrong pixels, so a second body pose inferring could be done and enhance the accuracy from the body pose detection (Figure 1.3). Figure 1.3: Buys et al. two stage RGB-D human body pose estimation. Image adapted from [3]. Estimating upper body poses from sequence of depth images is a challenging problem. Because of the adoption of randomized forest methods to label human parts in real time, it requires enormous training data to obtain favorable results. Tsai et al. [4] proposed a novel two-stage method to estimate the probability maps of upper body parts of users (Figure 1.4). These maps are then used to evaluate the region fitness of body parts for pose recovery. The probability maps estimated by the classifiers are applied to objective functions for skeleton extraction, where a Random Sample Consensus method is used to estimate approximate results. The framework was adapted to parallel computing for GPU processing and real time detection. The two-stage method was compared with a single-stage RFoC for upper body estimation. For the single-stage RFoC method, 30000 synthesized depth images were adopted, of which the postures were acquired from the CMU mocap database. For the two-stage estimation model, 10000 synthesized images to train the first upper and lower body classifier. For the second phase, 20000 images were adopted to train the detailed upper-body-part classifier. In the end, the two-stage method achieved more stable results with compact training data and real time capabilities.
1.2. Human body pose detection 9 Figure 1.4: Tsai et al. human upper body pose estimation. Image adapted from [4]. Hesse et al. [39] proposed a system with fast training and flexibility to fit the requirements of markerless 3D movement analysis of infants. It uses Random Ferns Classifier as a robust alternative to RFoC to find the 3D positions of body joints in single depth images. The training time is reduced by several orders of magnitude compared to the Kinect approach using a similar amount of data. The system was trained in 9 hours on a 32 core workstation opposed to 24 hours on a 1000 core cluster, achieving comparable accuracy to the Kinect Software Development Kit (SDK). The average distance error over all joints was 41 mm. Crabbe et al. [63] proposed a method for estimating body pose in high-level pose spaces directly from a depth image without relying on intermediate skeleton-based steps. The method is based on a Convolutional Neural Network (CNN) that maps the depth-silhouette of a person to its position in the pose space. The pose representation is initially built from skeleton data. This opens the possibility for a wider application of the movement analysis method to movement types and view-angles that are not supported by the skeleton tracking algorithm. Training took 7 hours and algorithm performance was of 100 fps. Discriminative strategies rely on two main phases: 1) training phase where the method is trained using a dataset (e.g. depth images) with the respective labels (e.g. 3D joint position); and 2) testing phase where the trained method is used to predict unlabelled samples (Figure 1.5A). The training phase normally starts with feature extraction from the images. A feature extractor strategy is used to transform an image (i.e. pixel intensities) into other type of representation (e.g. Histogram of Oriented Gradients (HoG), Scale-Invariant Feature Transform) that helps the discriminative method to classify or detect patterns on the image. After that, these features and the corresponding labels are used to train the method. In the testing phase, the same feature extraction strategy is applied, which will be used by the trained method to predict the label. Inside the discriminative class, we can define two sub-classes: the traditional and the Deep Learning (DL) methods (Figure 1.5B). The majority of methods implemented so far to human pose estimation were based
10 1. Introduction in traditional machine learning approaches (e.g. Support Vector Machine (SVM), RFoC, Neural Network). However, in the last years, human detection and pose estimation methods based on deep learning approaches appear forcefully. The major difference between these two types of discriminative methods lies in the fact that the traditional ones need hand-crafted feature extractors. In a DL approach, this step is eliminated as the method selects the best features by itself. Since the features extraction step requires a lot of time and its design depends directly of the expertise of the user, deep learning approaches open the possibility to achieve more accurate results than traditional machine learning strategies. A B Figure 1.5: (A) Discriminative method phases: in the first phase, the method trains in a labelled dataset; in the testing phase, the trained method is used to classify unlabeled images. (B) Comparison between traditional machine learning and deep learning approaches. 1.2.2 Generative Methods One difference between discriminative and generative approaches is the time consideration. Where the first is done frame by frame or multi-frame (i.e. through time with Recurrent Neural Networks or Long Short- Term Memory). The second takes time into consideration for human body pose estimation, while using prior knowledge on human kinematics, body shape and/or temporal motion continuities. Among other things, these priors allow to create a system without the need of a large body pose training dataset. Unfortunately, this leads to problems related to tracking, both on the automatic initialization process and recovery from loss of tracking. This approach can resort to different types of filtering [6, 60], Kalman Filter (KF), Extended Kalman Filter, Particle Filter (PF), Partitioned Particle Filter (PPF), Annealed Particle Filter, Condensation Particle Filter, Particle Swarm Optimization (PSO). The filtering objective is to predict joint positions while taking into account previous state, future prediction state and measured state. This way it is possible to better estimate the possible joint position and orientation. There are also other generative approaches where a template, either parametric or non-parametric, is fitted to the observed data, mostly with variants of Finite Iterative Closest Point (FICP) [5, 56, 59, 7]. This method uses a source point cloud (captured data) and a reference point cloud (template) so it can estimate the
1.4. Motivation 17 procedure was used to gather 3D CAD models from Web resources, allowing to generate depth images for each one. Object classes were manually queried and downloaded from 3D CAD model repositories, making a total of 319 categories with 30 objects each. Through the Blender engine and a Python script, depth data was generated for each object, while increasing the dataset size by changing object orientation with respect to the camera and its morphology. The last two toolchains [72, 74] focus on the advantages of 3D engines, such as Unity and Blender, enabling the access to easily customizable scenes and generation of new data from it. Also outside the in-car scenario, there are more recent approaches that make use of the Pandora dataset to exploit the generation of synthetic depth images through a GAN approach [75] to tackle the head pose estimation problem. For the same estimation problem, other methods are able to train only on synthetic images [76], however the feature input is based on RGB images, making it a more reach feature frame but less robust to light conditions. Considering that synthetic visual data realism is important and relevant for algorithmic accuracy, researchers have made efforts to better understand the existing sources of noise in ToF sensors, and to recreate them synthetically. Planche et al. [77] identified and simulated several noise sources, such as axial and lateral, specular surface, non-specular surface, structural, lens distortion, quantization step, motion, rolling shutter and shadow noise. These authors were also able to show how important it is to add realism to the frames when training a CNN, by comparing against different types of synthetic datasets. Some researchers have also avoided the noise source’s recreation into frame rendering, and instead focused in the final image noise characterization. BlenSor did this in a simplified way [78]. It focused on generating similar data for various range scanners, while synthesizing Gaussian noise and lens distortions. The procedure of generating depth data does not involve using the depth information of each pixel in Blender, instead performing ray-casting for each pixel, in some way simulating the ToF physical model. Considering a less generic noise model, Nguyen et al. [79] focused on axial and lateral noise regression for the Kinect ToF output frames. Later on, Iversen et al. [80] were able to improve this model and synthetically reproduce the cameras axial and lateral noise also. 1.4 Motivation Development of a human body pose detection system for the in-car scenario requires two basilar systems: (1) a standardized robust image sensor for real time feature aquisition, and (2) a human body pose detection algorithm with real time performance, high inference accuracy and generalization. In regard to the 2nd system, traditional discriminative based algorithmic development requires datasets with proper ground-truth
18 1. Introduction data, both for training and evaluation (i.e. in supervised learning). This approach becomes even harder to acomplish in the in-car scenario, due to the scarse or non-existent datasets depending on the use-case, as well as the non-existent ground-truth systems. Therefore, it is of high importance to develop/implement such ground-truth system and image sensor, and consecutively generate these datasets. With proper datasets available, one may then develop the final human body pose detection algorithm for the in-car scenario. 1.5 Goals This thesis focuses on the development of a pipeline to obtain a human body pose detection algorithm for the in-car scenario. The primary focus will be placed in the development of toolchains that are able to generate datasets for the algorithmic training and evaluation, as well as the evaluation of the ground-truth system. In addition, upon evaluation of state-of-the-art algorithms, an adapted human body pose detection algorithm will be implemented, with post-customization to the scenario in question. The development follows the pipeline illustrated in Figure 1.10. Figure 1.10: Overview of development pipeline. 1.5.1 Ground-Truth Implementation and Evaluation One of the most important requirements of the real dataset generation toolchain is the availability of a robust human body pose ground-truth system capable of achieving human motion capture in highly occluded scenarios such as in-car. This type of system is not available as a whole, nor as a robust human joint cartesian position capturing system. This task focuses in doing a state-of-art overview of such systems, as well as doing
1.5. Goals 19 a market selection of specific products capable of creating a ground-truth system. Before using such systems for the real dataset generation, one must evaluate the proposed ground-truth system. For the evaluation step, several evaluation methods and corresponding toolchains were implemented, capable of recording and evaluating the ground-truth system. This step requires software able to record in real time with proper synchronization between systems, as well as easy data manipulation and evaluation pipelines. 1.5.2 Real Dataset Toolchain Real datasets are the primary choice to be used to train every detector. This decision comes from the fact that a real dataset is recorded with real sensors feature data, which will later be used to infer the pose. This data not only gives the required information for pose inferring, but also gives information about the sensor’s inherent noise model, allowing to generate a training dataset with similar characteristics to the one where the human pose must be detected. Usually, creation of a real dataset consists in recording the body pose with a motion capture system, while synchronously acquiring an image using an image sensor (e.g. RGB or ToF). The pose is then referenced from one system to the other, in order to be correctly projected into the visual frame. This entire procedure is very time consuming and requires a lot of manual interaction, hampering the task of creating a large and generic dataset. Despite some datasets related with human body pose being publicly available (with RGB and depth sensors), these motion capture datasets do not focus on the in-car scenario, mostly due to the fact that standard vision based motion capture systems are not able to function properly in this scenario. This thesis addresses this need by presenting a user-friendly toolchain to generate human body pose datasets in an in-car environment, with the ground-truth system itself being also evaluated. These datasets may be used to train human body pose detection algorithms for an in-car scenario. This toolchain uses an inertial suit for human body pose capture, a ToF sensor for image capture and the Vicon to spatially and temporally align all systems. The output data is comprised of human body poses given with respect to the camera’s coordinate system in 2D and 3D for the ToF’s amplitude/depth image frame and tridimensional point cloud, respectively. The entire real dataset generation procedure requires an in-lab car scenario, something possible through a car testbed equiped with the real dataset hardware and software technologies. This toolchain requires the same software philosophy as the previous one (Section 1.5.1) due to the complexity of the entire system. The datasets recorded will be used for the algorithm training and evaluation, and can be seen as the best ones for it due to its inherited realism.
20 1. Introduction 1.5.3 Synthetic Dataset Toolchain Alternatively, synthetic datasets can be used to solve some of the real datasets problems. Unlike real datasets, synthetic datasets can be generated in large quantities and with higher generalization, allowing to obtain more training data in less time. However, synthetic images may suffer from the lack of realism when it comes to modeling the visual sensor noise. Creation of synthetic datasets can be performed using two types of approaches. On the one hand, the procedure can be entirely synthetic and automatic, where the pipeline creates the input and output models [73]. On the other hand, some procedures can still include real data as an input for the pipeline, using recorded motion capture data to give motion to a synthetic generic human model [2, 50]. This thesis addresses the synthetic dataset generation by presenting an automated and user-friendly customizable toolchain to generate realistic human body pose synthetic datasets in a in-car environment. This data must simulate a real in-car environment, allowing to maintain the robustness of the pose detector method when applied to real images. This toolchain uses humans, camera and car models as inputs, where all of them can be customized according to the data to be generated. The output data is comprised of human body poses referenced to the camera’s axes, as well as the corresponding image frames from RGB and ToF cameras. For every new frame that is generated, a new per-joint motion is applied to each human model, and it gets validated for collisions between all models. Although both ToF and RGB frames are generated, ToF is the one with more relevance, because of its ability to provide 3D information of the scene, thus giving the detector an easier way to infer an accurate 3D body pose. The entire toolchain follows a strictly software based implementation, capable of creating a car scenario similar to the previous toolchain (Section 1.5.2) but this time more generic and open to customizations, that would not be possible otherwise. While this toolchain uses comercially available software to ease 3D scene manipulation, it implements on top of it an highly customized and automated script. The script implementation allows the toolchain to be oriented with the development needs of the pipeline. The generated datasets will be used for the algorithm training, and although not as realistic as the real ones, they can improve the generalization of the algorithm. 1.5.4 Algorithm Development To detect the human body pose in images acquired with camera sensors and, thus, the activity of the car’s occupants, a robust method for human body pose estimation is needed. Specifically for the incar environment, few strategies were proposed. Indeed, the images acquired inside a car produce several occlusions, impeding the detection of some joints. This problem hampers the direct usage of traditional human pose estimation algorithms and makes this task more challenging than open space pose estimation.
1.6. Main Contributions 21 This thesis addresses this need by focusing on the development of a method for human body pose estimation with a ToF sensor inside a car. Taking into account the timeline of dataset avaiability, a first evaluation to preselected methods was performed with a publicly available dataset both for training as well as infering. Although this dataset does not represent the in-car scenario, it does use similar data formats for the image sensor as well as the ground-truth. Through a first algorithmic evaluation/selection step, the next step consisted in customizing the selected method, Part Affinity Fields (PAF) [25], to better suit our generated datasets format. A final step involved the training and evaluation through generated datasets with manually labeled groundtruth. The main requirements of the method were its accuracy in detecting the pose along with its robustness to deal with large variability between different people (i.e. regarding body shape or size). Moreover, to deal with fast human movements, it was also important to guarantee the real time capability of the pose detection. 1.5.5 Algorithm Evaluation A toolchain to quantitatively and qualitatively evaluate the developed algorithm was then developed, with several requirements in mind: • ToF camera interface; • Algorithm interface through language abstraction interface; • Dataset interface through preestablished dataset standard (real and synthetic); • Quantitative evaluation through standard metrics; • Qualitative evaluation through frame projection of dataset ground-truth and algorihm infering. This toolchain helps mostly on the qualitative evaluation procedure across the entire dataset. Finally, the algorithm from Section 1.5.5 was evaluated through several training configurations of generated datasets, from real datasets (Section 1.5.2) to synthetic ones (Section 1.5.3). Qualitative and quantitative evaluation was performed through the algorithmic evaluation toolchain (Section 1.5.5). One of the biggest considerations for algorithmic training was the use of a computationaly capable hardware system, which was used transversally across the entire development pipeline. 1.6 Main Contributions The main contributions of this thesis are two novel toolchains for dataset generation: (1) a real dataset generation toolchain, and (2) a synthetic dataset generation toolchain. In regard to the 1st toolchain, its
22 1. Introduction inertial-based ground-truth system can be seen as a novelty for the in-car scenario, together with the thorough evaluation procedure presented. In regard to the 2nd toolchain, its major contributions are: 1. Realistic synthetic human body pose generation; 2. Ability to customize car, image sensor, car occupants and their motion profile; 3. Rendering realism is achieved by image processing techniques to mimic camera’s output; 4. High throughput of synthetic data. Both toolchains were developed with the focus to train and evaluate a human body pose detection algorithm, and are currently being used by Bosch. Four datasets were made publicly available to the R&D community, being 2 real and 2 synthetic ones. This thesis does not propose a novel algorithm, however it presents a customized DL based algorithm for the in-car scenario: 1. Detection of the existence of a joint label in the image; 2. Data augmentation strategy for depth images. The algorithm was trained and evaluated with several datasets generated with the developed toolchains, giving a good understanding of the requirements for improving algorithm training and ultimately accuracy. 1.7 Structure of the Thesis Chapter 2 describes the hardware and software tools used across all chapters. Chapter 3 describes the extensive evaluation done on the selected ground-truth system. The overal evaluation methodology is presented. Static evaluations are performed at a sensor level, followed by dynamic full body evaluations at a sensor and joint level. The entire evaluation procedure allows for a better understanding of the error propagation in the system. This method was first presented in “A system for the generation of in-car human body pose datasets”, currently in revision process. Chapter 4 describes the first toolchain for dataset generation, where the development methodology of the real dataset toolchain is presented. The related work on real dataset generation is summarized. The methods for spatial and temporal calibration of all subsystem’s of the toolchain are presented. The system’s full alignment for dataset generation is shown. The system’s evaluation and the potential interest is presented and discussed, as well as the main conclusions for it. This toolchain was first presented in “A system for the generation of in-car human body pose datasets”, currently in revision process.
1.7. Structure of the Thesis 23 Chapter 5 describes the second toolchain for dataset generation, where the development methodology of the synthetic dataset toolchain is presented. The methods for scene customization, generation and validation are presented. Human model creation and motion profile considerations are also shown. The rendering pipeline tries to achieve realism through an implementation of noise sources and stylization. The toolchain’s computational performance and potential interest is presented and discussed, as well as the main conclusions for it. This toolchain was first presented in [81]. Chapter 6 presents the human body pose detection algorithm development. The selection and evaluation of ML and DL based algorithms is shown. The customization of a DL based algorithm PAF for the in-car scenario is presented. This work was first presented in [82]. Chapter 7 shows the development of a sub-toolchain for algorithmic qualitative and quantitative evaluation. The algorithm training and evaluation through the datasets generated with the developed toolchains is presented and discussed, as well as the main conclusions for it. Chapter 8 presentes conclusions and outlining new directions for future work in the field.
Chapter 2 Tools Overview This chapter discusses the hardware and software technologies used transversally throughout the subtasks. In-depth description is shown, as well as a requirement overview for each part. Contents 2.1 HardwareOverview ................................. 25 2.1.1 InertialSystem............................... 25 2.1.2 ViconSystem ............................... 30 2.1.3 ToFCamera ................................ 33 2.1.4 CarTestBed ................................ 42 2.1.5 ComputingServer ............................. 42 2.2 SoftwareOverview.................................. 43 2.2.1 ADTF ................................... 44 2.2.2 MATLAB.................................. 45 2.2.3 Blender .................................. 47 2.2.4 Python................................... 47 2.2.5 C++/C#.................................. 48
2.1. Hardware Overview 25 2.1 Hardware Overview In this section, the hardware systems used across the development pipeline are shown. The context of requirement for each chapter is described, as well an as in-depth description of each system. 2.1.1 Inertial System Section 1.5.1 refers to the implementation and evaluation of the selected ground-truth system, a main requirement for the real dataset generation toolchain in Section 1.5.2. As it is shown in Chapter 4, one of the main parts of the ground-truth system is the inertial suit MVN Awinda [19]. The selection of the inertial-based ground-truth system was done concurrently with Bosch, considering the state-of-the-art overview presented in Chapter 1 and the technological limitations when applied in the in-car scenario. Robustness to occlusion, magnetic distortion and drift converged the decision to the MVN Awinda system. The MVN Awinda is a suit comprised of 17 wireless inertial sensors capable of capturing each body segment orientation [9]. Through proprietary kinematic forwarding algorithms, the system is able to estimate specific skeletal joint 6 Degrees-of-Freedom (DoF) data wrt. its world axes. The entire inertial based motion capture system is processed in the MVN Studio software, where it is possible to calibrate the subject, monitor and record its body pose [19]. Sensor data is accessible through the MT Software Development Kit (SDK) [19] and body pose data is accessible through network protocol decoding [83], allowing for software synchronization. In regard to hardware synchronization, file format exporting is also available. Different solutions mean different types of data. 2.1.1.1 Motion Capture In order to do human motion capture, MVN Awinda provides a modified version of the biomechanical model proposed by the Internal Society of Biomechanics (ISB) [53], with 23 segments and 22 joints [54]. Through the placement of 17 sensors in each segment of the human body following the MVN Awinda procedure [9] (Figure 2.1) the system estimates and captures the kinematic model of the human subject.
26 2. Tools Overview Figure 2.1: Body sensors’ placement: orange represent the segment labels and red the joint labels. Adapted from MVN quick setup sheet [9]. The estimation is done through the MVN Studio software, using proprietary algorithms for body pose [84] and absolute positioning through Kalman Filter (KF). Once calibrated with the subject’s body anatomical dimensions and initial body pose (i.e anatomical frame), the kinematic model is post-processed and captured in real time (equation 2.1 and Figure 2.2). q=qr+qii+qjj+qkk ∴Gplandmark =Gporigin +GB q⊗Bx⊗GB q∗ ∴BABBq=GBAq∗⊗GBBq (2.1) Positions of anatomical landmarks with respect to the joint origin of the related segment Gplandmark Gplandmark Gplandmark in the global frame G G Gcan be found by rotating the vector of the landmark Bx Bx Bxin the body frame B B Bto the global frame and adding the global position of the origin. Joint rotation is defined as the orientation of a distal segment GBBq GBBq GBBqwith respect to a proximal segment GBAq GBAq GBAq. Where ⊗ ⊗ ⊗denotes a quaternion multiplication, ∗ ∗ ∗ the complex conjugate of the quaternion, GBqseg GBqseg GBqseg represents the quaternion vector describing the orientation of the segment with respect to the global frame.
2.1. Hardware Overview 33 3rd party application for recording purposes. As it was mentioned before, for the purpose of human body motion capture, the kinematic fit is the only model accessible. 2.1.2.3 Hardware synchronization Similarly to the MVN Awinda system, Vicon also allows hardware synchronization through the Lock+ system [89], where several systems can be electrically connected with a master-slave configuration. This configuration allows for a hardware trigger, where the system records its data in the proprietary software (Vicon Nexus) synchronously with the other systems software. Data is then exported through standard formats such as *.c3d files [86], where all motion data related to the subject for each timestamp is stored. In regard to the Vicon motion data, it represents the plug-in gait model. 2.1.3 ToF Camera Section 1.5.2 refers to the real dataset generation using ground-truth data as well as Time-of-Flight (ToF) images, and Section 1.5.5 refers to a ToF image sensor for the online qualitative evaluation. As it is shown in chapters 4 and 7, image data is captured by a ToF sensor. After a state-of-the-art sensor evaluation and selection and considering Bosch roadmap, several iterations of ToF sensors were used in Chapter 4. The latest ToF sensor iteration was also implemented into the algorithmic evaluation toolchain (Chapter 7) for qualitative evaluations. Image sensor requires in-depth understanding (i.e. metrological characteristics, image features, and automotive standards) as it is an important factor for the real dataset generation. It is necessary to quantify the measurement needs of the system being evaluated, it being the human body pose detection algorithmic system. This system resorts to image processing techniques and technology, so in this case we have several types of technology at our disposal to make image capture and processing. Because we are talking about image processing to obtain the position of each human body joint, it is necessary to capture the 3D space, including the subject. So, it is possible to use stereoscopic image processing or ToF (Figure 2.7). Figure 2.7: ToF principle. Illustration adapted from [12]. The sensor’s resolution is one metrological characteristic inherent to both technologies that affects the
34 2. Tools Overview ground-truth system accuracy. Stereoscopic systems use standard RGB cameras that at present capture images at 1920x1080 pixels without adding great cost, making it possible to obtain spatial resolutions in the order of the millimeter, contrarily to the ToF system that has much inferior pixel resolutions. Despite this limitation, the ToF system still shows several advantages compared to the stereoscopic one, namely a bigger ambient light immunity, and the ability to capture the raw 3D space without the need for image processing (except some types of filters to smooth the 3D point cloud). With the Light-Emitting Diode (LED) evolution, it was possible to implement them in ToF systems [12], managing a substantial price reduction for this technology and at the same time making it more accessible for investigation projects. Nontheless, it still lacks the maturing seen in RGB cameras’ pixel resolution. ToF cameras estimate the 3D space through one of the following main modulation methods: • Continuous Wave (CW): Measures the phase shift, ϕ ϕ ϕ, between the emitted, s(t) s(t) s(t), and received, r(t) r(t) r(t), signal (Figure 2.8A); • Pulse Modulation (PM): Duration of the emitted pulse is set to the round trip time from light source to the further object (Figure 2.8B and equation 2.4). A B Figure 2.8: ToF principle: (A) CW, where blue lines represent each C(κ) C(κ) C(κ)sample; (B) PM, where blue areas represent each C(κ) C(κ) C(κ)sample. Looking in-depth for the CW modulation [90] (equation 2.2), the ToF system is able to estimate the pixel-object distance, d d d, through the cross-correlation, C(κ) C(κ) C(κ), between emitted, s(t) s(t) s(t), and received, r(t) r(t) r(t), signals. Where tA tA tA represents the amplitude of the received signal and it depends on the object’s reflectivity and sensor’s sensitivity, tB tB tB represents the offset coefficient due to the ambient illumination, fm fm fmrepresents the modulation frequency, and τ τ τrepresents the time of flight for light sent from the camera and received by it after being reflected by the object. tA tA tA and tB tB tB are unknown and are estimated at the camera.
2.1. Hardware Overview 35 s(t) = acos(2πfmt) r(t) = tA cos(2πfm(t−τ)) + tB ∴C(κ) = a.tA 2cos(2πfmκ+ 2πfmτ) + tB (2.2) Estimation is possible through the four bucket method (Figure 2.8A and equation 2.3). Four equidistant samples of the received signal, r(t) r(t) r(t), within one cycle are captured, where the cross-correlations with the sent signal, s(t) s(t) s(t), are c(κ0), c(κ90), c(κ180), c(κ270) c(κ0), c(κ90), c(κ180), c(κ270) c(κ0), c(κ90), c(κ180), c(κ270). Where lc lc lc is the light speed constant. Also it is important to observe that ϕ ϕ ϕis a phase wrapping because it ranges from [0,2π] [0,2π] [0,2π], limiting the maximum distance, dmax dmax dmax, with it. tA =p[c(κ270)−c(κ90)]2+ [c(κ0)−c(κ180)]2 2 tB =c(κ0) + c(κ90) + c(κ180) + c(κ270) 4 τ=arctan hc(κ270)−c(κ90) c(κ0)−c(κ180)i ϕ= 2πfmτ= 2πfm 2d lc ∴d=τlc 2 (2.3) Looking in-depth for the PM [17], light modulation is different but the principal is the same (equation 2.4). Q1 = c(κ0), Q2 = c(κ90), Q3 = c(κ180), Q4 = c(κ270) ϕ=tan−1Q4−Q3 Q1−Q2 ∴d=c 2fm ϕ 2π (2.4) Breuer et al. made a depth sensor comparison and accuracy analysis [91], focusing more on the Kinect V2 accuracy and precision in standard scenarios. The sensor showed significant distance dependent error, requiring further calibration. The warm up experiment suggested a temperature dependent bias that needs to be corrected. Integration over multiple raw frames offered a measuring range of up to 18 meters. Analysis of pixel noise showed a strong relation to non-correlated scene illumination. The high resolution RGB camera provides a second image for triangulation, offering an extended range and higher accuracy in short range measuring. Affordable systems [13] (Figure 2.9A) show higher pixel resolution of 512x424 pixels and a range of 50 centimeters to 4,5 meters. This type of technology has had a great reception in the field of investigation,
36 2. Tools Overview mostly for 3D motion capture. Wei et al. [92] developed a method of capture and reconstruction of the human body movement in 3D space, using the depth information provided by Kinect, concluding that the system is viable for real time virtual models control with great accuracy, using a real person’s movement. Unfortunately, this technology is not normalized to be used inside car interiors, mostly because of its laser emissions, where Kinect only complies with International Electrotechnical Commission (IEC) 60825-1:2007 (Safety of laser products – Part 1: Equipment classification and requirements) for a Class 1 laser product, not focusing on several other automotive standards. TI (Texas Instruments Inc., Texas, United States)) provides an evaluation kit for the OPT8241 ToF sensor (Figure 2.9B), with a resolution of 320x240 pixels, [12; 60] frames per second (fps), and an operating range up to 4m(dependent on the modulation frequency). On the software side, there is the Voxel-SDK for 3rd party development, and the Voxel Viewer (built on top of Voxel SDK) to configure/calibrate/monitor the kit. The evaluation kit supports several output formats: Phase ,C(κ) C(κ) C(κ), amplitude, tA≡ampx,y tA≡ampx,y tA≡ampx,y, depth, d≡depthx,y d≡depthx,y d≡depthx,y, and point cloud, pcf pcf pcf. Embedded temporal and spatial filtering is also possible. Unfortunately, this evaluation kit is not certified for automotive products, where the only standard provided by the Infrared (IR) emissions is Class 1 Laser Product European Standard (EN)/IEC 60825-1 2007&2014 (similar to Kinect v2). SICK (Sick AG, Waldkirch, Germany) is a company known for its industrial sensors, and recently they developed a ToF sensor (Figure 2.9C) for industrial applications, more precisely to aid on Artificial Intelligence transporters motion. The principle is the same of other ToF sensors, but with less resolution (176x144 pixels) at 30 fps, with a Gigabit Ethernet interface and an API for easy development in Java, Python, C++, C#, etc. It also allows to filter, reduce and manipulate streamed data inside the device (embedded programming). Unfortunately, this is a certified industrial product that can be considered a closed box and is not prepared nor certified to be part of an automotive product. Still, its IR emissions are certified as EN 62471:2008 – “Risk Group 0”. A B C Figure 2.9: ToF image sensors: (A) representation of point cloud from Kinect V2 comercial product (Illustration adapted from [13]); (B) Texas Instruments OPT8241 (Illustration adapted from [14]); (C) SICK V3S110 (Illustration adapted from [15]).
2.1. Hardware Overview 37 Sensor selection was done bilaterally taking into consideration Bosch sensor roadmap, shifting the focus to ToF image sensors. Through the years of 2016 to 2018 three product iterations were made and used: (1) Melexis (Melexis, Ypres, Belgium) EVK75023, (2) Melexis EVK75123 and (3) Gene8 Pico Monstar 105. While preserving automotive standards and improved image data quality, there was always the need to achieve higher Field-of-View (FoV) due to the implicit cockpit visibility requirement as illustrated in Figure 2.10. Figure 2.10: Bosch roadmap for ToF sensor placement and visibility requirements. 2.1.3.1 Melexis EVK75023 In the in-car scenario, it is necessary to use a ToF system that is normalized, as in the case of EVK75023 (Figure 2.11) from Melexis which complies with several automotive standards: • International Organization for Standardization (ISO)/Technical Specifications 16949:2009 Quality management systems – Particular requirements for the application of ISO 9001:2008 for automotive production and relevant service part organizations; • Automotive Electronics Council-Q100 Failure Mechanism Based Stress Test Qualification for Integrated Circuits; • EN 62471:2008 Photobiological safety of lamps and lamp systems: –LED-Lens FL70 – “Risk Group 0 - Exempt Group” no warning labels needed; –LED-Lens FL66s – “Risk Group 1” warning labels needed; –LED-Lens FL63s – “Risk Group 1” warning labels needed; –LED-Lens FL90 – “Risk Group 1” warning labels needed. In the case of IR light emissions, the “Risk Group 1” LED’s need to be labeled to warn about the maximum eye exposure time for a distance of 20 cm to it. Although Melexis provides several standards on its supply chain, it still represents a tier 2 supplier, where they can only guarantee the standard for the ToF sensor and LED IR emitters. In order for the final product to be fully compliant with the automotive standards, Bosch
38 2. Tools Overview has the responsibility to make the system automotive ready. This is true because Bosch is the tier 1 supplier and needs to qualify each individual component of the system. Figure 2.11: Melexis EVK75023 ToF sensor. Illustration adapted from [16]. The evaluation kit is comprised of two LIM-U850-6 (Illumination Unit) equipped with LED-Lens FL70, one TIM-U-MLX75023 (ToF Sensor Board), one CM-i.MX6x (Processor Module), and one interface board (Figure 2.12A). In regard to the ToF sensor, it only has a pixel resolution of 320x240 pixels and an application range of 3.7mto 1.6km (dependent of the modulation frequency in Figure 2.12B), which means that in a scenario of 2.5mof height (necessary for a full human body capture) it will give us a theoretical spatial resolution of approximately 10 mm/pixel. However, such resolution is not truly achievable because this type of technology only has a depth accuracy of centimeters. It is important to point out that the spatial resolution mentioned before is relative to the X and Y coordinates, because the Z axis (depth) requires further testing to be quantified. A B Figure 2.12: EVK75023: (A) Block diagram, and (B) range vs modulation frequency. Illustrations adapted from [16]. The data and control interface is done via Gigabit-Ethernet, where the control interface is used to set and read configuration registers, allowing several types of configurations, such as: • Calibrations: temperature compensation, distance offset related to modulation frequency, lens calibration, illumination compensation, modulation frequency, frame average, and integration time;
2.1. Hardware Overview 39 • Filters: median, bilateral, sliding average, wiggling compensation, and Fixed-Pattern-Phase Noise compensation. The data interface provides a continuous stream of raw phase, amplitude, depth and point cloud data: • Amplitude frame tA≡ampx,y tA≡ampx,y tA≡ampx,y: Reconstructed from the sum of raw phase data of all 4 phases 0,90,180,270 0,90,180,270 0,90,180,270, and is associated with the material reflectivity to the IR light emitted. • Depth frame d≡depthx,y d≡depthx,y d≡depthx,y: Is associated with the distance between the pixel and the object that is pointing to. The distance of each pixel is coded in milimeters; • Point cloud matrix (XYZ voxel) pcf pcf pcf: Is associated with the cartesian position of each pixel. • Balance: Is associated with the confidence of depth measurement of each pixel. The evaluation kit comes with BltTofApi SDK that allows development in C, C++, C# and MATLAB, giving enough freedom for 3rd party toolchain implementation. SDK allows for software synchronization and with a simple pipeline it is possible to connect and capture data from the sensor as illustrated in Algorithm 2.1.4. BltTofApi is available for x86/x64 and Advanced RISC Machine architectures, meaning that higher level applications can be deployed natively onto the ToF device itself with less effort. The developer has access to a dedicated partition for user applications, embedded on the ToF device Main Flash. This is possible through SSH connection, giving access to ‘/mnt/user‘ directory. The device can be programmed with the use of the Bluetechnix ToF API (BTA), although the API runs exclusively on the i.MX6 Quad processor (four Cortex- A9 cores at 1GHz). The Graphics Processing Unit (GPU) access is also possible through Open Computing Language. Lower level access to the Central Processing Unit (CPU) is also possible through NEON, a set of Single Instruction Multiple Data instructions. Algorithm 2.1.4 BltToFApi SDK 1: Connection: 2: BT AinitConf ig(&config); 3: BT Aopen(&config); 4: Data: 5: BT AgetF rame(&frame); # Timestamp 6: frame−> timeStamp; # Frame samples # Amplitude 7: BT AgetAmplitudes(frame); # Point cloud 8: BT AgetXY Zcoordinates(frame); # Depth 9: BT AgetDistances(frame) # Balance 10: frame.channels.data
40 2. Tools Overview In terms of image quality control, the EVK75023 uses an IR exposure confidence level for each pixel. The exposure is not of the same quality for each pixel, and that leads to a noisy image. An extra frame is accessible, confidence confidence confidence, giving the confidence level of each pixel with embedded filtering, with the depth information for pixels with low confidence not being set. As mentioned before, several filters are accessible. Temporal filtering is a median FIFO stack, F IF Ostacks FIFOstacks FIFOstacks, with a maximum number of 15 frames, that allows to reduce the gaussian noise at the expense of reducing the frame rate (i.e. fout =fin F IF Ostacks fout =fin F IF Ostacks fout =fin F IF Ostacks ) and added motion blur. Spatial filtering is also available through a fixed size averaging kernelW·H W·H W·Hthat makes several frame passes. In Figure 2.13 it is possible to see temporal and spatial filtering applied to the evaluation kit’s output data. Figure 2.13: EVK75023 image filtering experimentation. Depth and point cloud are shown for each sequential filtering configurations: (top) no filtering; (middle) temporal filtering; (bottom) temporal and spatial filtering. It is important to understand that post-processing filtering (temporal and spatial) does not increase the Signal-to-Noise Ratio (SNR). To achieve a better SNR, an increased integration time is needed, although this factor increases the system’s temperature and eye safety concerns. 2.1.3.2 Melexis EVK75123 Later in 2017, the new Melexis EVK75123 was released (Figure 2.14), bringing the same automotive standards but with improved characteristics, such as: • Smaller form factor 80x50 mm; • Programmable illumination power with higher peak power; • Illumination from LED to Vertical-Cavity Surface-Emitting Laser, allowing higher modulation frequencies and better SNR;
2.1. Hardware Overview 41 • FoV increased to 110, although reduced to 100 due to barrel distortion; • Identical SDK interface. Figure 2.14: Melexis EVK75123 ToF sensor. Illustration adapted from [17]. 2.1.3.3 Gener8 Pico Monstar 105 In 2018, a new ToF iteration was possible, with the same automotive standards as the Melexis products, but with a more closed box concept (similar to the likes of Kinect V2). The Pico Monstar 105 comes with increased pixel resolution 352x287 and similar FoV of 100x85. Although lacking the lower level configurations as filtering, modulation frequency, integration time, calibration, etc, it gives access to specific use-cases with predefined embedded configurations (Table 2.3). Table 2.3: Pico Monstar 105 use-cases. Use Case Range(m) FPS (Hz) Integration Time (µs) 11.0−4.0 5 2000 21.0−4.0 10 1000 30.5−1.5 15 700 40.3−2.0 25 450 50.3−2.0 35 600 60.1−1.0 45 500 SDK support comes in the form of libroyale [93], allowing 3rd party implementation in C, C++ and MATLAB (Algorithm 2.1.5). Image data is also similar to the Melexis EVK, although changing balance frame for confidence frame, and also adding a noise frame. These last two frames are not required for the dataset generation, although they can be used for improved image data understanding.
42 2. Tools Overview Algorithm 2.1.5 Libroyale SDK 1: Connection: 2: cameraDevice−> initialize(); 3: cameraDevice−> setUseCase(Γ); 4: cameraDevice−> startCapture(); 5: Data: # Timestamp 6: data−> timeStamp; # Frame samples # Amlitude 7: data−> points.grayV alue; # Point cloud 8: data−> points.x; 9: data−> points.y; 10: data−> points.z; # Confidence 11: data−> points.depthConfidence; # Noise 12: data−> points.noise; 2.1.4 Car TestBed Sections 1.5.2 and 1.5.5 generate and evaluate data for the in-car scenario. This focus brings the need for a car testbed. As it is shown in chapters 4 and 7, a car testbed is prepared for the sole purpose of having a controlled in-lab environment for a functioning car interior. This allows for better real dataset generation as well as validation. 2.1.5 Computing Server Sections 1.5.1 to 1.5.5 require computational capabilities for the different tasks at hand. Each chapter uses the same computing server, built to satisfy the requirements of the entire development pipeline: • Chapter 3 - For the ground-truth evaluation several toolchains were developed, all needing real time recording from multiple systems. This requirement adds the need for high CPU core number, disk write/read speed, disk storage and Random-Access Memory (RAM) storage; • Chapter 4 - Real dataset generation has the same requirements of the previous chapter; • Chapter 5 - Synthetic dataset generation as the same requirements, but due to different needs. The developed toolchain does not use external systems and relyes extensively on the server resources for an high throughput of synthetic data generation; • Chapter 6 - Algorithmic development does not rely on the CPU requirements like in other chapters. Machine Learning (ML) based methods training is supported by GPU arquitectures based on Compute
Chapter 3 Ground-truth implementation and evaluation for the in-car scenario This chapter considers the creation of a ground-truth system capable of capturing human body pose inside of a vehicle, in order to train and evaluate the algorithm in its development process. To satisfy the needs of the real dataset toolchain in Chapter 4, as well as the algorithm evaluation in Chapter 7, a selected ground-truth system was implemented and evaluated through an extensive evaluation procedure, with specific toolchains developed for this purpose. Preliminary versions of the work presented in this chapter were presented in the paper “A system for the generation of in-car human body pose datasets”, currently in revision process. In the first section of this chapter, the evaluation procedures as well as the toolchains developed are shown. Four evaluation procedures were defined in order to better understand the ground-truth system sensor and full body model errors, both from a static and dynamic prespective. For each evaluation procedure, a toolchain was developed. Each toolchain presented hardware and software requirements, which are now shown in-depth. In the second and third sections of this chapter, the evaluations results, discussion and conclusions are shown. Each of the four evaluation procedures present results that support a better understanding on the ground-truth system limitations and benefits. Finally, possible future improvements are then discussed. Contents 3.1 Evaluationtoolchains ................................ 51 3.1.1 StaticEvaluation.............................. 51
50 3. Ground-truth implementation and evaluation for the in-car scenario 3.1.2 Dynamic Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 3.2 Evaluationresults.................................. 63 3.2.1 Static sensor evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.2.2 Static full body evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.2.3 Dynamic sensor evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.2.4 Dynamic full body evaluation . . . . . . . . . . . . . . . . . . . . . . . . 67 3.3 Discussion and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.1. Evaluation toolchains 51 3.1 Evaluation toolchains In this section, the evaluation procedures and corresponding toolchains are shown. To best understand how the entire inertial suit behaves in human motion capture, there is a need to evaluate it in four distinct ways: • Static evaluation: –Sensor (SSE) - understanding the sensor level sensitivity to magnetic distortions in each rotation axis; –Full body model (SFE) - understanding the full body joint’s sensitivity to drift and magnetic distortions; • Dynamic evaluation: –Sensor (DSE) - understanding the sensor level sensitivity to specific human body segments’ rotation; –Full body model (DFE) - understanding the full body joints’ translation error. 3.1.1 Static Evaluation 3.1.1.1 Static sensor evaluation To understand how the inertial sensor is prone to error in each rotation axis, a toolchain had to be developed in order to rotate the sensor in each axis and compare its rotation with the real one. The toolchain used a nanotec SMCI47-S-2 stepper motor drive [96], to rotate a stepper motor in closed-loop, where the inertial sensor was mechanically coupled (500mm shaft coupling). Through the Nanotec Software Development Kit (SDK) [97] it is possible to rotate the stepper motor, degrees degrees degrees, while capturing the sensor Euler rotation through the MT SDK [19] as shown in Algorithm 3.1.1.
52 3. Ground-truth implementation and evaluation for the in-car scenario Algorithm 3.1.1 SSE 1: Connection: # Sensor 2: Connection in Alg.2.1.1 # Motor 3: motor =ComMotorCommands() 4: Data: 5: for each iin Niterations do 6: motor.StartT ravelP rofile(degrees) 7: for each sin Nsamples do 8: mtwData._orientation.x() 9: mtwData._orientation.y() 10: mtwData._orientation.z() 11: end for 12: end for Equation 3.1 estimates the error of each sensor axis of rotation, ξt ξt ξt. Calculating the deviation from the actual sensor axis orientation, sΘt sΘt sΘt, (without the initial offset sΘ0 sΘ0 sΘ0) against the motor actual rotation, mΘt mΘt mΘt, where sΘ sΘ sΘrepresents an individual axis of rotation (roll x x x, pitch y y yor yaw z z z) depending on which is parallel with the motor axis rotation. This error allows us to know both the sµ sµ sµ and sσ sσ sσ of the error considering all the recorded samples, where nI nI nI represents the motor rotation iterations (nI ≡Niterations nI ≡Niterations nI ≡Niterations) and nS nS nS the sensor samples in each 360orotation (nS ≡Nsamples nS ≡Nsamples nS ≡Nsamples). sΘt=sΘt−sΘ0 ξt=|sΘt−mΘt| ∴sµ = nI×nS X t=0 ξt nI ×nS ∴sσ = v u u u u t nI×nS X t=0 (ξt−sµ)2 (nI ×nS)−1 (3.1) 3.1.1.2 Static full body evaluation Static full body evaluation was focused on understanding how the Internal Society of Biomechanics (ISB) model behaves in a real world driving scenario. Considering the fact that no other system can evaluate the inertial system inside a vehicle, the evaluation focused on comparing the initial N-Pose model before entering the vehicle and after driving. To achieve this evaluation a standard use of the MVN Studio is sufficient to extract both models joint’s cartesian position and rotation at a specific timestamp (before entering the vehicle and after leaving it) in Excel format. With such data, it is possible to compute the Euclidian error, ξj ξj ξj, of each joint for any final N-Pose (s= 2 s= 2 s= 2)
3.1. Evaluation toolchains 53 against the initial one (s= 1 s= 1 s= 1) (equation 3.2), where P xyzj Pxyzj Pxyzjrepresents the 3D cartesian position for each of the 20 joints, nJ nJ nJ. Pxyzs,j ={xs,j, ys,j, zs,j} ξj=q(x1,j −x2,j)2+ (y1,j −y2,j)2+ (z1,j −z2,j)2 (3.2) Another important step to improve cartesian error estimation is the alignment of both N-pose frames in terms of rotation, Tpelvis j Tpelvis j Tpelvis j. Such alignment is required given that the subject does not stand in the N-Pose facing the same orientation in regard to the Earth magnetic north. To accomplish it, a root joint is selected (pelvis) and its transformation matrix, Tpelvis Tpelvis Tpelvis, is used as a translation and rotation offset to the rest of the body joints (equation 3.3). Tpelvis j= (Tpelvis)|·Tj(3.3) 3.1.2 Dynamic Evaluation Each evaluation method (DSE and DFE) uses an independent toolchain due to its evaluation specificity. To perform a dynamic evaluation of the inertial suit, a more robust motion capture system is needed. Since this evaluation is focused in an in-lab environment, there is the possibility of using the golden-standard of human motion capture, the Vicon System. Also it is important to have a synchronized recording of both systems. Considering the fact that both allow software synchronization, the toolchains use software synchronization recording through Automated Data and Time-Triggered Framework (ADTF) [94]. Data post-processing and error quantification is done in a Graphical User Interface (GUI) implemention in MATLAB for each toolchain (Figure 3.1). A B Figure 3.1: Toolchain pipeline for dynamic evaluations: (A) DSE, and (B) DFE. MVN Awinda and Vicon Nexus Filters data (i.e. sensors and segments quaternions) are recorded synchronously in ADTF, and then post-processed in MATLAB for error quantification.
54 3. Ground-truth implementation and evaluation for the in-car scenario 3.1.2.1 Dynamic sensor evaluation To understand how the inertial sensor dynamic range behaves in each human body segment, each MVN Awinda sensor needs to be recorded synchronously with the Vicon kinematic-fit model and referenced to its corresponding segment, in order to compare both. Comparison is based on the raw quaternion data, qt qt qt, of each system (sensor for MVN Awinda and segment for Vicon kinematic-fit) sent from each filter. Each quaternion is then converted to axis-angle, θt θt θt, (equation 3.4), while removing the offset rotation of the first frame through the quaternion conjugate, (q0)c (q0)c (q0)c, in order to have a relative rotation for each segment. qt=qt,r +qt,ii+qt,jj+qt,kk qrt=qt·(q0)c θt= 2 ×arccos(qrt,r) (3.4) To achieve this, a toolchain was developed consisting of two parts: (1) synchronized recording through ADTF and (2) graphical quantitative evaluation through MATLAB. Recording (ADTF) First part requires the development of two distinct filters for data capture of MVN Awinda sensors, and Vicon kinematic fit model. Although distinct, there is a need to relate the filter output in order to later reference the sensor data with the segment data. For this, a standard output data structure is created, Ss,n Ss,n Ss,n, where each sensor address or segment label is referenced (Table 3.1). Referencing is done as a filter initialization, although it is possible to customize the information in ADTF before boot, Γ Γ Γ.
3.1. Evaluation toolchains 55 Table 3.1: Reference between sensor address and kinematic-fit segments. Ss,n Ss,n Ss,n Segment Sensor Ss,n Ss,n Ss,n Segment Sensor Head Head 00B41EA9 uLegL L_Femur 00B41ECF ShoulderL L_Collar 00B41EB4 uLegR R_Femur 00B41EB5 ShoulderR R_Collar 00B41EAD lLegL L_Tibia 00B41EB9 uArmL L_Humerus 00B41EBD lLegR R_Tibia 00B41EB6 uArmR R_Humerus 00B41EDC FootL L_Foot 00B41EAC fArmL L_Elbow 00B41EA7 FootR R_Foot 00B41E9C fArmR R_Elbow 00B41EA2 Stern LowerBack 00B41EA1 HandL L_Wrist 00B41E9D Pelvis Root 00B41EC8 HandR R_Wrist 00B41EB7 With this information, each filter is able to use the same output data structure BodySensors BodySensors BodySensors and BodySegments BodySegments BodySegments (Figure 3.2). A B Figure 3.2: Filters output for DSE: (A) MVN Awinda, (B) Vicon Nexus. Although the structure data type is different (tMotionSensor tMotionSensor tMotionSensor = = =tMotionSegment tMotionSegment tMotionSegment), the relevant data format is similar bodySegmentID bodySegmentID bodySegmentID and oneData oneData oneData. In conclusion, each time a filter sends a data sample, Ss,n Ss,n Ss,n, in reality it is sending an array of size 17 (segments :: count segments :: count segments :: count = = =sensor :: count sensor :: count sensor :: count) with each body segment name, bodySegmentID bodySegmentID bodySegmentID, and its quaternion, oneData oneData oneData. This sample is then added to an ADTF timestamp, λt λt λt, to be used synchronously. Following the SDK interaction of each system (DataStream SDK and MT SDK) as shown in algorithms 2.1.1 and 2.1.3, it is possible to implement a filter for MVN Awinda sensor data (Algorithm 3.1.2) and Vicon kinematic fit segment data (Algorithm 3.1.3).
56 3. Ground-truth implementation and evaluation for the in-car scenario Algorithm 3.1.2 RB_TOP80_MVNAWINDA 1: Init(StageFirst): 2: (tMotionSensor)MV NAwinda ←output 3: Init(StageNormal): 4: for each iin BodySensors do 5: BodySensors[i].segmentID ←Γ 6: end for 7: _Filter::Start(): 8: Connection in Alg. 2.1.1 9: T hread.start() 10: Thread: 11: for each iin BodySensors do 12: BodySensors[i].oneData ←packet.orientationQuaternion() Data in Alg. 2.1.1 13: end for 14: MV NAwinda ←BodySensors Algorithm 3.1.3 RB_TOP80_VICONNEXUS 1: Init(StageFirst): 2: (tMotionSegment)V iconNexus ←output 3: Init(StageNormal): 4: for each sin BodySegments do 5: BodySegments[i].segmentID ←Γ 6: end for 7: _Filter::Start(): 8: Connection in Alg. 2.1.3 9: T hread.start() 10: Thread: 11: for each iin BodySegments do 12: BodySegments[i].oneData ←MyClient.GetSegmentGlobalRotationQuaternion() Data in Alg. 2.1.3 13: end for 14: V iconNexus ←BodySegments Each filter is then used at a higher level in ADTF with the purpose of recording synchronized data to the hard drive as illustrated in Figure 3.3. Figure 3.3: ADTF pipeline for DSE evaluation recording. Evaluation (MATLAB) MATLAB was used for the second part, loading each recording through the dat2mat script (Figure 2.21) and post-processing them (Figure 3.4). This part of the toolchain has three main functions:
3.1. Evaluation toolchains 57 1. Data synchronization; 2. Graphical representation; 3. Metrics generation. Figure 3.4: MATLAB sub-toolchain for DSE evaluation. Using the definition of equation 3.5, the first function uses Algorithm 3.1.4 to create new timestamps,Λt′ Λt′ Λt′, from a custom user-defined frequency, Γf Γf Γf, and interpolate consecutively, n n n, all samples of each quaternion, Qs,n,i Qs,n,i Qs,n,i, from each segment,i i i, from each system,s s s, considering its real timestamp,λt λt λt. This way new samples are created for each system but with identical timestamps, δs,t′,i δs,t′,i δs,t′,i, generating synchronized data samples for all variables Bs,n,i→υs,t′,i Bs,n,i→υs,t′,i Bs,n,i→υs,t′,i,Qs,n,i→φs,t′,i Qs,n,i→φs,t′,i Qs,n,i→φs,t′,i. Note that interpolation needs to be related with the type of data being interpolated, therefore using Spherical Linear Quaterninon Interpolation (SLERP) for the quaternion data. Ss,n,i ={bodySegmentIDs,n,i, oneDatas,n,i} ≡ Ss,n,i ={Bs,n,i, Qs,n,i} δs,t′,i ={υs,t′,i, φs,t′,i} (3.5)
58 3. Ground-truth implementation and evaluation for the in-car scenario Algorithm 3.1.4 DSE SYNCHRONIZATION 1: Tini ← λt, S1,0∧S2,n =∅ λt, S2,0∧S1,n =∅ 2: Tend ← λt, S1,N ∧S2,n =∅ λt, S2,N ∧S1,n =∅ 3: Trange ←Tend −Tini 4: T←Trange 1/f 5: Λt′←0,1 Γf, ..., Trange,t′= 0, .., T 6: δs,t′,i,t′= 0, .., T 7: for each sin δs,t′,i do 8: for each t′in Λt′do 9: tini ←λt∩Ss,n, t < t′ 10: tend ←λt∩Ss,n, t > t′ 11: ratio ←t′−tini tend−tini 12: for each iin δs,t′,i do 13: qini ←Qs,n,i, t < t′ 14: qend ←Qs,n,i, t > t′ 15: φs,t′,i ←SLERP (qini, qend, ratio) 16: end for 17: end for 18: end for The second function gives the graphical representation of θt θt θtin equation 3.4 of each selected body segment (Table 3.1) and system (Figure 3.2). In this case, qt qt qtrepresents the quaternion of a segment from a system, φs,t′,i φs,t′,i φs,t′,i, across the entire timeline, Λt′ Λt′ Λt′. The third and final function calculates the error for each segment, ξt′,i ξt′,i ξt′,i, through equation 3.6. The axis-angle from both systems θ1,t′ θ1,t′ θ1,t′and θ2,t′ θ2,t′ θ2,t′is used to calculate the dynamic error of the segment across the timeline, µi,σi µi,σi µi,σi. θ1,t′,i =Eq 3.4(qt←φ1,t′→T,i) θ2,t′,i =Eq 3.4(qt←φ2,t′→T,i) ξt′,i =|θ1,t′,i −θ2,t′,i| ∴µi= T X t′=0 ξt′,i T ∴σi= v u u u u t T X t′=0 (ξt′,i −µi)2 T−1 (3.6) 3.1.2.2 Dynamic full body evaluation Dynamic full body evaluation was focused on understanding how the ISB model behaves against the Vicon kinematic fit model. To accomplish it, both systems need to be recorded synchronously and each joint referenced. Comparison is based on the Euclidian error, ξt′,j ξt′,j ξt′,j, between joints, j j j, (equation 3.2) where
3.2. Evaluation results 65 C1 Vertebrae Left Humerus Right Humerus Left Elbow Right Elbow Left Wrist Right Wrist Left Hand Right Hand Left Femur Right Femur Left Knee Right Knee Left Ankle Right Ankle Left Foot Right Foot C7 Vertebrae T8 Vertebrae Pelvis 0 10 20 30 40 50 60 70 80 90 100 error (mm) EV1 EV2 EV3 Figure 3.12: Joints’s (Table 2.1) Euclidian error, ξj ξj ξj, for each SFE evaluation procedure (EV1, EV2 and EV3). 3.2.3 Dynamic sensor evaluation To understand how the sensors behave in the human body, we placed them as indicated by the supplier (Figure 2.1) and evaluated them at a lower level. This concept allowed us to understand how each sensor behaves in each segment, in terms of rotation range. To contextualize this understanding with body movements, a total of three recording procedures were established. These had the purpose of evaluating a specific body movement plane: coronal (RC), sagittal (RS) and transversal (RT). For each one, a full body motion procedure was performed and periodically repeated for ten cycles. Each procedure was recorded five times to have suficient statistical data. Segment results in coronal and sagittal planes show the worst results (Figures 3.13A and 3.13B) in terms of segments with higher soft tissue (upper arms and legs), given the increased frequency of muscular contractions. Feet also presented sub-optimal results, but are more related to the sensor’s proximity to magnetic distortions from the iron foundations of the building. Transversal plane (Figure 3.13C) show the best results with a segment median error, µi µi µi, lower than 10o, which is related to the fact that it required less soft tissue contractions. Full body segment evaluations show a median full body error, µi µi µi, lower than 5oacross planes (Figure 3.13D).
66 3. Ground-truth implementation and evaluation for the in-car scenario Head ShoulderL ShoulderR uArmL uArmR fArmL fArmR HandL HandR uLegL uLegR lLegL lLegR FootL FootR Stern Pelvis 0 5 10 15 20 25 30 35 40 45 50 error (°) A Head ShoulderL ShoulderR uArmL uArmR fArmL fArmR HandL HandR uLegL uLegR lLegL lLegR FootL FootR Stern Pelvis 0 5 10 15 20 25 30 35 40 45 50 error (°) B Head ShoulderL ShoulderR uArmL uArmR fArmL fArmR HandL HandR uLegL uLegR lLegL lLegR FootL FootR Stern Pelvis 0 5 10 15 20 25 30 35 40 45 50 error (°) C Coronal Sagittal Transversal 0 2.5 5 7.5 10 12.5 15 17.5 20 22.5 25 error (°) D Figure 3.13: Segments’ angular error. (A) coronal plane, (B) sagittal plane, (C) transversal plane and (D) full body in all planes. Due to the higher error found in the upper arms and legs, an extra segment evaluation was performed. In this case, new sensor positions were defined and evaluated (Table 3.3), and the results can be seen in Figures 3.14A and 3.14B. The results show that the best position for fixation is the Greater trochanter for the upper leg, and Triceps lateral for the upper arm. Table 3.3: Upper Arm and Upper Leg segment evaluations. Evaluation Sensor Leg Position Sensor Arm Position Movement Plane P1C Greater trochanter Triceps lateral Coronal P1S Greater trochanter Triceps lateral Sagital P2C Iliotibial tract Triceps long Coronal P2S Iliotibial tract Triceps long Sagital P3C Bicepts femoris Triceps medial Coronal P3S Bicepts femoris Triceps medial Sagital P4C Semitendinosus Biceps Coronal P4S Semitendinosus Biceps Sagital
3.2. Evaluation results 67 P1C P1S P2C P2S P3C P3S P4C P4S 0 5 10 15 20 25 30 35 40 45 50 error (°) A P1C P1S P2C P2S P3C P3S P4C P4S 0 5 10 15 20 25 30 35 40 45 50 error (°) B Figure 3.14: Upper arm and leg orientation error in coronal and sagittal planes for different positions, p(from 1 to 4). (A) Upper Arm and (B) Upper Leg. 3.2.4 Dynamic full body evaluation To understand how the joints’ position behave in the human body, we evaluated the complete output from the inertial suit (Figure 2.1). This evaluation gives a better understanding of how the Awinda motion capture system behaves against the Vicon motion capture system in terms of joints’ position. To contextualize this understanding with body movements, the same three recording procedures from the segment evaluation were used. An extra 4th procedure was added, where a driving simulation (outside the car) was performed and assessed (RDr). In terms of joints’ evaluations, the transversal plane maintains the best results (Figure 3.15C). Coronal and sagittal planes show worst errors (Figures 3.15A and 3.15B), specifically for the lower body extremities in the coronal plane. This is due to error propagation from the kinematic forwarding method, and the fact that the coronal plane movements had considerably higher feet joint movement range compared with the sagittal and transversal planes. In regard to the 4th procedure, the error increased (Figure 3.15D), possibly due to the increase in range of motion in almost every joint, specifically the right hand (simulating its movement to the back part of the car seat). Full body joint results in Figure 3.15E show a median error, µj µj µj, lower than 15mm for the coronal, sagittal and transversal planes, and 30mm for the driving simulation.
68 3. Ground-truth implementation and evaluation for the in-car scenario Head LeftUpperArm RightUpperArm LeftForearm RightForearm LeftHand RightHand LeftUpperLeg RightUpperLeg LeftLowerLeg RightLowerLeg LeftFoot RightFoot LeftToe RightToe Neck Chest Pelvis 0 15 30 45 60 75 90 105 120 135 150 error (mm) A Head LeftUpperArm RightUpperArm LeftForearm RightForearm LeftHand RightHand LeftUpperLeg RightUpperLeg LeftLowerLeg RightLowerLeg LeftFoot RightFoot LeftToe RightToe Neck Chest Pelvis 0 15 30 45 60 75 90 105 120 135 150 error (mm) B Head LeftUpperArm RightUpperArm LeftForearm RightForearm LeftHand RightHand LeftUpperLeg RightUpperLeg LeftLowerLeg RightLowerLeg LeftFoot RightFoot LeftToe RightToe Neck Chest Pelvis 0 15 30 45 60 75 90 105 120 135 150 error (mm) C Head LeftUpperArm RightUpperArm LeftForearm RightForearm LeftHand RightHand LeftUpperLeg RightUpperLeg LeftLowerLeg RightLowerLeg LeftFoot RightFoot LeftToe RightToe Neck Chest Pelvis 0 15 30 45 60 75 90 105 120 135 150 error (mm) D Coronal Sagital Transversal Driving 0 10 20 30 40 50 60 70 80 90 100 error (mm) E Figure 3.15: Joints’ positional error. (A) coronal plane, (B) sagittal plane, (C) transversal plane, (D) driving simulation and (E) full body in all evaluations. 3.3 Discussion and Conclusions We evaluated a specific inertial suit, highlighting its limitations through an extensive evaluation procedure that separates itself from other more specific methods [55] where the evaluation is focused mainly in the calibration procedure and the full body kinematics output. Although there was no focus in evaluating the calibration procedure, a specific sub-toolchain was developed that allowed us to learn the best stance for
3.3. Discussion and Conclusions 69 the human subject in the calibration step. This sub-toolchain is not used each time we perform a recording due to the fact that it requires both the Awinda and the Vicon full body suits, creating to much entropy while recording. Sub-optimal performance was detected at a sensor level for the Yaw rotation (Figure 3.10), however this behaviour did not propagate to the full body analysis. Full body analysis showed larger errors for sensors in segments with increased soft tissue, or performing an higher Range of Motion (RoM) (Figures 3.13A and 3.13B). This source of error propagates into the joints’ position analysis, due to its inherited kinematic forwarding pipeline, showing the larger errors in the furthest body joints wrt. to the pelvis joint (Figures 3.15A, 3.15B and 3.15D). We believe that this evaluation to the inertial suit brings a better understanding on its behaviour and limitations.
Chapter 4 Real Dataset Toolchain The present chapter follows up on the previous one, focusing on the real dataset generation problem. Preliminary versions of the work presented in this chapter were presented in the paper “A system for the generation of in-car human body pose datasets”, currently in revision process. In the first section of this chapter, the real dataset toolchain (previously mentioned in Section 1.5.2) development is shown in-depth. The complete real dataset generation pipeline is shown through three main parts: recording in Section 4.1.1, alignment in Section 4.1.2, and rendering in Section 4.1.3. Recording (Section 4.1.1) shows the Automated Data and Time-Triggered Framework (ADTF) sub-toolchains that allow for real time synchronized recording, describing each developed filter. Alignment and rendering (sections 4.1.2 and 4.1.3) are based on a single MATLAB sub-toolchain, shown in-depth in both sections. Specific temporal and spatial calibration methods and algorithms are presented in Section 4.1.2, while dataset specific data rendering is shown in Section 4.1.3. In the second section of this chapter, the entire toolchain’s evaluation and potential interest is shown. Two evaluation procedures were defined, one focused on the real data generation itself, and a second focused on the real data application for human body pose estimation. The first evaluation procedure (Section 4.2.1.1) is divided in tightly secured human motion and free human motion, car seat position and human actions, in order to show how the recorded human body pose behaves in different scenarios. The second evaluation procedure (Section 4.2.2) shows how real datasets generated by the toolchain can improve the accuracy of different Machine Learning (ML) based methods for human body pose detection. The chapter proceeds with the discussion of the obtained results, and its main conclusions. Results from evaluation procedures show that the toolchain falls behind the market gold standard in terms of out-car scenario, however it improves considerably for the in-car scenario, being able to capture the human body pose wrt. a Time-of-Flight (ToF) sensor. This understanding goes behond the in-car scenario, opening possibilities
71 for highly occluded scenarios. Toolchain generated data was shown as being valuable for ML based methods, increasing their detection accuracy. Dataset sources of error were identified across chapters 3 and 4 and future error minimization approaches were proposed. Contents 4.1 ToolchainOverview ................................. 72 4.1.1 Recording(ADTF).............................. 73 4.1.2 Alignment (MATLAB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.1.3 Rendering (MATLAB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.2 Evaluationresults.................................. 91 4.2.1 Toolchain ................................. 91 4.2.2 Application to Pose Estimation Problems . . . . . . . . . . . . . . . . . . . 94 4.3 Discussion ..................................... 100 4.4 Conclusions .................................... 101
72 4. Real Dataset Toolchain 4.1 Toolchain Overview In this section, the previously selected ground-truth system (Chapter 3) is used for the purpose of developing a toolchain capable of generating ToF images with associated human body pose ground-truth for in-car scenario. To achieve such toolchain, several systems are required: • a ToF sensor for image capture (C C Cbeing the position of the camera’s optical center); • an Inertial suit (namely a MVN Awinda) for relative human body pose ground-truth (A A Abeing the head joint, and J J Jeach one of the remaining body joints); • a global object positioning system, such as the Vicon system (W W Wbeing the Vicon’s global coordinate system, and O O Othe subject’s head object tracked by it); • a car testbed. As Figure 4.1 illustrates, there is the need to indirectly estimate TC J TC J TC Jin order to project each joint into the ToF perspective. This estimation adds a certain complexity with the added systems, making it necessary to directly estimate all other transformations between systems. With it, there is a need to spatially and temporally align the data, to correctly project the human body pose information into the ToF camera’s coordinate system. Figure 4.1: 3D representation of coordinate systems when recording a real dataset. W W W: Vicon global coordinate system; C C C: ToF optical center and orientation; O O O: subject’s head object tracked by the Vicon system; A A A: inertial suit head joint; J J J: inertial suit joints. To satisfy the abovementioned requirements, the toolchain implements the pipeline illustrated in Figure 4.2, where the entire real time recording procedure is done with ADTF sub-toolchains, and the alignment and rendering is done in a MATLAB sub-toolchain (Figure 4.3).
4.1. Toolchain Overview 73 Figure 4.2: Overview of the toolchain pipeline. Recording: blue highlight represents the Vicon system; orange highlight represents the MVN Biomech Awinda system; red highlight represents the ToF camera. Alignment: gray highlights correspond to the developed algorithms, with the other variables being determined by concatenation of the other algorithms’ output. Figure 4.3: MATLAB sub-toolchain for real dataset generation. 4.1.1 Recording (ADTF) Dataset recording is done for all relevant systems: image data is recorded from a ToF sensor; relative body pose data is recorded from the MVN Awinda inertial suit; global positioning data is recorded with Vicon Nexus through the creation of a virtual head object for the human subject. Note that this object was selected for two main reasons: (1) low soft tissue related errors for both Vicon and inertial suit’s markers/sensors; and (2) best joint visibility for the Vicon system in an in-car environment, generating more valid data. The entire recording process follows the same philosophy as previous toolchains in Chapter 3, where there is the need to use ADTF to implement a sub-toolchain for real time recording. As it was already mentioned, there are three main systems requiring an ADTF filter (Figure 4.4A), shown in subsections: (4.1.1.1) ToF camera, (4.1.1.2) MVN Awinda Full Body, and (4.1.1.3) Vicon head tracker. Since the temporal alignment between the ToF sensor and the Vicon system is performed independently prior to any acquisition, a separate recording procedure was necessary (Figure 4.4B), being shown in detail in subsections 4.1.1.4 and 4.1.2.1.
74 4. Real Dataset Toolchain A B Figure 4.4: ADTF sub-toolchain for real dataset generation: (A) main real dataset recording, and (B) recording for Vicon to ToF temporal alignment. 4.1.1.1 ToF camera Despite the latest toolchain using one single ToF sensor, being the latest Bosch sensor iteration the Pico Monstar 105, all sensor iterations will be shown as well as their in-depth implementation. Melexis EVK75023 and EVK75123 Although different evaluation kits, both sensors use the same BltTofApi Software Development Kit (SDK), allowing for an identical filter implementation. In terms of filter output data, independent camera frames and a custom data structure (i.e. comprised by the data necessary for the real dataset [Figure 4.5A]) are used, where Amplitude Amplitude Amplitude and P ointCloud PointCloud PointCloud store the amplitude, depth and point cloud data from the sensor at a 320x240 pixel resolution. Sample dataSs,n Ss,n Ss,n is comprised by the EV K75123_F rames EV K75123_Frames EV K75123_Frames structure variable, this sample is then added to an ADTF timestamp λt λt λtto be used synchronously. One of the main differences between the ToF filter and previous ones in Chapter 3 is the ability to configure the sensor itself. This is done through the initialization process in ADTF, where user data, Γ Γ Γ, (Figure 4.5B) is read by the filter and sent to the sensor. A B Figure 4.5: EVK75123 filter: (A) output, and (B) user configurations, Γ Γ Γ.
4.1. Toolchain Overview 81 PxyzC marker =TC W·PxyzW marker ∴PxyC marker =P xyzC marker ·IMC (4.3) Equation 4.3 relies on two calibrations: (1) the camera’s pre-calibrated intrinsic matrix IMC IMC IMC(equation 4.4), with fx fx fx,fy fy fybeing the focal length in pixels, cx cx cx,cy cy cybeing the optical center in pixels, and sk sk sk being the camera axes skew angle; and (2) the Vicon-to-ToF spatial calibration TC W TC W TC W(subsection 4.1.2.4). IMC= fx0 0 sk fy0 cxcy1 (4.4) Both virtual markers must exist for each timestamp, generating an oscilating wave in the ToF x-axis (Figure 4.14). Assuming that both signals are delayed copys of each other, this projection allows to estimate the time delay t(0)T oF V icon t(0)T oF V icon t(0)T oF V icon between both systems through the cross-correlation of the two discrete-time sequences, PxyC PxyC PxyCand PxyC marker PxyC marker PxyC marker. 21 21.5 22 22.5 23 23.5 24 24.5 100 200 300 400 Time (s) Pixel P xyC P xyC marker Figure 4.14: Projection of the Vicon’s marker in the ToF x-axis (red) and the marker’s x-axis coordinate in the image frame (blue), giving the delay between systems t(0)T oF V icon t(0)T oF V icon t(0)T oF V icon. Spikes in blue line are related to ToF marker centroid perspective parallax error. 4.1.2.2 Awinda-to-Vicon temporal alignment To determine the temporal mismatch between the Vicon system and the Awinda suit, both systems’ head joint quaternions were converted and represented in axis-angle, θt θt θt, (equation 3.4), while removing the offset rotation of the first frame through the quaternion conjugate, (q0)c (q0)c (q0)c. This provides the head orientation as a relative rotation for each system (Figure 4.15). Through the cross-correlation of both signals, t(0)V icon Awinda t(0)V icon Awinda t(0)V icon Awinda is obtained, which allows to synchronize the Awinda suit with the Vicon system.
82 4. Real Dataset Toolchain 22 24 26 28 30 32 0 0.5 1 Time (s) Angle (rad) Vicon Awinda Figure 4.15: Axis-angle representation of both Vicon and Awinda head rotation, giving the delay between systems t(0)V icon Awinda t(0)V icon Awinda t(0)V icon Awinda. 4.1.2.3 Toolchain temporal alignment The definitions in equations 4.5, 4.6 and 4.7 simplify the variable groups from raw ADTF data, n n n, to synchronized, t′ t′ t′, for the three ADTF filter samples recorded in Figure 4.4A. In terms of ToF filter (Algorithm 4.1.2), ampt′,x,y ampt′,x,y ampt′,x,y represents the synchronized t′ t′ t′amplitude frame considering the raw one,AMPn,f AMPn,f AMPn,f , withf f fbeing the frame 1D concatenated pixel index;pct′,f ={pcxt′,f ,pcyt′,f ,pczt′,f } pct′,f ={pcxt′,f ,pcyt′,f ,pczt′,f } pct′,f ={pcxt′,f ,pcyt′,f ,pczt′,f } represents the synchronized 3D point cloud fromP Cn,v PCn,v PCn,v withv v vbeing the frame 1D concatenated voxel index; deptht′,x,y deptht′,x,y deptht′,x,y represents the synchronized depth frame from pczt′,f pczt′,f pczt′,f . Ss=tof,n ={Amplituden,f , P ointCloudn,v} ≡ ∴Ss=tof,n ={AMPn,f , P Cn,v} ∴δs=tof,t′={ampt′,x,y, pct′,f ={pcxt′,f , pcyt′,f , pczt′,f }, deptht′,x,y} (4.5) In terms of MVN Awinda Full Body filter (Algorithm 3.1.5), κt′,j κt′,j κt′,j represents the synchronized joint, j j j, 3D position and φt′,j φt′,j φt′,j the quaternion rotation. Ss=awinda,n,j ={bodySegmentIDn,j, XY ZDatan,j, QuatDatan,j} ≡ ∴Ss=awinda,n,j ={Bn,j, Kn,j, Qn,j} ∴δs=awinda,t′,j ={υt′,j, κt′,j, φt′,j} (4.6) Finally, for the Vicon Head Tracker filter (Algorithm 4.1.3), ρt′,ϱt′ ρt′,ϱt′ ρt′,ϱt′represent the synchronized position and rotation of the subject’s head from the respective raw ones, Tn,Rn Tn,Rn Tn,Rn.
4.1. Toolchain Overview 83 Ss=vicon,n, ={HeadT ranslationn, HeadRotationn} ≡ ∴Ss=vicon,n, ={Tn, Rn} ∴δs=vicon,t′={ρt′, ϱt′} (4.7) Using the definitions in equations 4.5, 4.6 and 4.7 for each filter output and with each previous temporal calibration, all recorded systems from a real dataset recording are temporally aligned with each other (equation 4.8). Each calibrated temporal mismatch, t(0)T oF V icon t(0)T oF V icon t(0)T oF V icon, and t(0)V icon Awinda t(0)V icon Awinda t(0)V icon Awinda, serves as a time offset to the timestamp of each system’s sample: tC tC tCbeing the ToF, tO tO tOthe Vicon, and tA tA tAthe MVN Awinda. In Algorithm 4.1.5, it is shown how each individual system is temporaly aligned, considering the initialization process of adding the time offset. t(0)T oF Awinda =t(0)T oF V icon +t(0)V icon Awinda tO=tO+t(0)T oF V icon tA=tA+t(0)T oF Awinda tC=tC (4.8)
84 4. Real Dataset Toolchain Algorithm 4.1.5 REAL DATASET SYNCHRONIZATION 1: initialize: 2: Eq 4.8 3: # Get ToF timestamp range Trange 4: Tini ←λt∩Stof,0 5: Tend ←λt∩Stof,N 6: Trange ←Tend −Tini 7: T←N, Ss=tof,n 8: # Create new synchronization timestamps Λt′and samples δs,t′for all systems 9: Λt′←λt∩Stof,0→N,t′= 0, .., T 10: δs,t′,t′= 0, .., T 11: # Interpolate new samples for Awinda δs=awinda,t′,j and Vicon δs=vicon,t′ 12: for each t′in Λt′do 13: #MVN Awinda joint position κt′,j and rotation φt′,j 14: tini ←λt∩Ss=awinda,n,j , t < t′ 15: tend ←λt∩Ss=awinda,n,j , t > t′ 16: ratio ←t′−tini tend−tini 17: for each jin δs=awinda,t′,j do 18: qini ←Qn,j , t < t′ 19: qend ←Qn,j , t > t′ 20: φt′,j ←SLERP (qini, qend, ratio) 21: pini ←Kn,j , t < t′ 22: pend ←Kn,j , t > t′ 23: κt′,j ←(pend −pini)·ratio +pini 24: end for 25: #Vicon Head Tracker position ρt′and rotation ϱt′ 26: tini ←λt∩Ss=vicon,n,, t < t′ 27: tend ←λt∩Ss=vicon,n,, t > t′ 28: ratio ←t′−tini tend−tini 29: qini ←Rn, t < t′ 30: qend ←Rn, t > t′ 31: ϱt′←SLERP (qini, qend, ratio) 32: pini ←Tn, t < t′ 33: pend ←Tn, t > t′ 34: ρt′←(pend −pini)·ratio +pini 35: #ToF sensor point cloud pcxt′,f , pcyt′,f , pczt′,f 36: for v= 1,v+=3, while v < 352 ·287 ·3do 37: f←f+ 1 38: pcxt′,f ←P Cn,v 39: pcyt′,f ←P Cn,v+1 40: pczt′,f ←P Cn,v+2 41: end for 42: #ToF sensor amplitude ampt′,x,y depth deptht′,x,y 43: for x= 1,x++, while y < 352 do 44: for y= 1,y++, while y < 287 do 45: f←x+ (y−1) ·352 46: ampt′,x,y ←AMPn,f 47: deptht′,x,y ←pczt′,f 48: end for 49: end for 50: end for 4.1.2.4 Vicon-to-ToF spatial alignment Vicon Head to Vicon World (TW O TW O TW O) The TW O TW O TW Otransformation is automatically recorded through the Vicon system, and requires the setup of a head object with a fixed pattern of markers as it was shown in Section 4.1.1.3. TW O TW O TW Ois the transformation matrix formed with the synchronized position and rotation information from the subject’s head ρt′,ϱt′ ρt′,ϱt′ ρt′,ϱt′.
4.1. Toolchain Overview 85 Vicon World to ToF Camera (TC W TC W TC W) For the calibration ofTC W TC W TC W, a checkerboard pattern was used together with four Vicon markers,B=,1, ..., 4 B=,1, ..., 4 B=,1, ..., 4, placed in its surface (Figure 4.16A). Several samples are taken (Figure 4.16B), and for each, two object plane surfaces were generated for both the ToF, TC B TC B TC B, [99] and Vicon, TW B TW B TW B, systems (Figure 4.16C). A B C Figure 4.16: Vicon world to ToF camera calibration. (A) checkerboard patern with Vicon markers visible to the ToF camera and Vicon system. (B) matlab toolchain for static Vicon and ToF data capture andTC W TC W TC Wcalculation. (C) 3D representation of the coordinate systems when calibrating TC W TC W TC W. W: Vicon global coordinate system; C: ToF optical center; B: Checkerboard object plane surface. This information allowed to calculate the transformation between systems through a least square minimization problem (equation 4.9), where in order to compute the optimal rotation matrix [100], first both sets of marker, B B B, 3D coordinates PC B PC B PC Band PW B PW B PW Bmust be translated, so that their centroid coincides with the origin of the coordinate system pC B pC B pC Band pW B pW B pW B. This is done by subtracting from the point coordinates the coordinates of the respective centroid µP C B µPC B µPC Band µPW B µPW B µPW B. Second step consists of calculating a covariance matrix, cvM cvM cvM, followed by the Single Value Decomposition terms V,U V,U V,U, followed by the determinant, dt dt dt, of both terms to ensure right-handed coordinate system. Finally, the optimal rotation is calculated, RC W RC W RC W, and then added to the translation component in order to calculate the transformation matrix between Vicon world and ToF camera, TC W TC W TC W, where I I Iis a 4x4 identity matrix.
86 4. Real Dataset Toolchain pC B=PC B−µPC B pW B=PW B−µPW B cvM = (pW B)|·pC B cvM =V·S·U| dt =det(V·U|) RC W=U· 1 0 0 0 1 0 0 0 d ·V| TC B=pC B·I TW B=pW B·I ∴TC W=TC B·RC W·TW B (4.9) Algorithm 4.1.6 shows the entire process of TC W TC W TC Wspatial calibration. First, the static amplitude frames, ampt′,x,y ampt′,x,y ampt′,x,y, obtained in MATLAB give the visible markers position (2D (PxyC B)t′ (PxyC B)t′ (PxyC B)t′and 3D (PC B)t′ (PC B)t′ (PC B)t′[Figure 4.17A]) wrt. the ToF camera. Second, the static samples from Vicon give the four markers’ 3D position in each timestamp, (PW B)t′ (PW B)t′ (PW B)t′(Figure 4.17B). Finally, this information from each system is used in equation 4.9 to calculate TC W TC W TC W(Figure 4.17C shows (PW B)t′ (PW B)t′ (PW B)t′being projected into ToF, using TC W TC W TC W). Algorithm 4.1.6 TC W TC W TC WCalibration 1: # Get PC Bfrom amplitude images 2: # Detect ToF markers (P xyC B)t′from amplitude images ampt′,x,y 3: (P xyC B)t′←Eq. 4.2(ampt′,x,y ),(P xyC B)t′={x, y} 4: # Convert ToF 2D markers (P xyC B)t′to 3D markers (PC B)t′ 5: (PC B)t′←((P xyC B)t′)|·IMC,(PC B)t′={x, y, z}(Figure 4.17A) 6: # Get PW Bfrom Vicon markers 7: (PW B)t′={x, y, z}(Figure 4.17B) 8: # Get TC Wfrom ToF 3D markers (PC B)t′and Vicon markers (PW B)t′ 9: TC W←Eq. 4.9(PC B←(PC B)t′, P W B←(PW B)t′)
4.1. Toolchain Overview 87 A B C Figure 4.17: Vicon world to ToF camera calibration frames: (A) markers 3D position (PC B)t′ (PC B)t′ (PC B)t′detected in amplitude frames ampt′,x,y ampt′,x,y ampt′,x,y, (B) markers 3D position (PW B)t′ (PW B)t′ (PW B)t′detected in Vicon system, and (C) markers (PW B)t′ (PW B)t′ (PW B)t′2D position in amplitude frames using TC W TC W TC W. 4.1.2.5 Awinda-to-Vicon spatial alignment Awinda Joints to Awinda Head (TA J TA J TA J) The MVN Awinda body pose is tracked inside the MVN global positioning system. This is possible through specific proprietary algorithms that estimate the body gait movement. To minimize sources of error from the MVN Awinda system, one chose to use the relative body pose, removing the global positioning information and its associated errors. To convert the global body pose into a relative one, a joint of reference (root joint) needs to be defined. In this case, the head joint was chosen given its direct relation with the Vicon’s head object. To determine the relative position/orientation of each joint wrt. the head, TA J TA J TA J, equation 4.10 is used, with RA,PA RA,PA RA,PAbeing the Awinda head joint rotation/position wrt. the Awinda world coordinate system, and RJ,PJ RJ,PJ RJ,PJthe Awinda joint rotation/position (J J Jrepresenting each of the 18 body joints) wrt. the Awinda world coordinate system. In its essence, TJ TJ TJand TA TA TAare comprised by the recorded rotation quaternions φt′,j φt′,j φt′,j, φt′,head φt′,head φt′,head, and translation κt′,j κt′,j κt′,j,κt′,head κt′,head κt′,head that were synchronized in Section 4.1.2.3. TJ= RJPJ 000 1 ∴TA J= (TA)|·TJ (4.10)
88 4. Real Dataset Toolchain Awinda Head to Vicon Head (TO A TO A TO A) Considering the body pose as being relative to the head (root joint), the alignment between the MVN Awinda head and the Vicon head needs to be determined. To determine the TO A TO A TO Atransformation, each recording procedure is initiated by a small recording of head rotations in each axis (i.e. flexion/extension, lateral flexion and rotation). This information is then used to generate a set of points for the Vicon head object PO PO PO, and the Awinda head joint, PA PA PA(equation 4.11). P= (0,0,1) PA=RA·P PO=RW O·P (4.11) Each set of points PO,PA PO,PA PO,PAcorresponds to a vector P P Pbeing rotated in each timestampΛt′ Λt′ Λt′with the head rotation RA=φt′,head RA=φt′,head RA=φt′,head,RW O=ϱt′ RW O=ϱt′ RW O=ϱt′at the specific timestamp. Through the Finite Iterative Closest Point (FICP) algorithm created by Kroon [98], it is possible to find the optimal rotation, RO A RO A RO A, that best aligns both point clouds that represent the head joint from both systems (Figure 4.18A). With the extra manual translation of the Vicon head position to the real head position PO A PO A PO A(C1 vertebrae) as it is shown in Figure 4.18B, the transformation matrix is obtained TO A TO A TO A. −1 0 1 −1 0 1 −1 0 1 PO PA A B Figure 4.18: Awinda head to Vicon head spatial alignment, TO A TO A TO A. (A) shows the rotation RO A RO A RO Aalignment, and (B) shows the translation PO A PO A PO Aalignment. 4.1.2.6 Toolchain spatial alignment With each previous spatial calibration, the human body pose, TJ TJ TJ, can be projected into the ToF camera’s prespective (equation 4.12). ∴TC J=TC W·TW O·TO A·TA J(4.12)
4.1. Toolchain Overview 89 TC J TC J TC Jis the combined transformation matrix that spatially aligns each joint from the inertial suit with the camera world, with TA J TA J TA Jbeing the transformation that maps each joints’ position/orientation wrt. to the head in the inertial suit system, TO A TO A TO Athe transformation that maps the head joint from the inertial suit system to the Vicon one, TW O TW O TW Othe position/orientation of the head object within the Vicon’s world coordinate system, TC W TC W TC Wthe transformation that maps the Vicon’s system to the ToF sensor coordinate system. 4.1.3 Rendering (MATLAB) After data alignment, the toolchain starts rendering the dataset information (Figure 4.19), including: (A) an amplitude frame; (B) a depth frame; and (C) a 3D point cloud. Moreover, the 2D and 3D body pose of each human model is generated and exported in JavaScript Object Notation (JSON) format. Each exported dataset RDt′ RDt′ RDt′is comprised by the group of dataset information (equation 4.13) for each frame t′ t′ t′. ∴RDt′={ampt′,x,y, deptht′,x,y, pct′,f ={pcxt′,f , pcyt′,f , pczt′,f }, (PxyC J)t′,(pxyzJC)t′} (4.13) A B C Figure 4.19: Rendered frames: (A) amplitude, (B) depth, (C) point cloud. Images (A, B, C) are represented in color for better visualization. 4.1.3.1 Amplitude frame The amplitude frame (Figure 4.19A) ampt′,x,y,x= 1, ...,X,y= 1, ...,Y ampt′,x,y,x= 1, ...,X,y= 1, ...,Y ampt′,x,y,x= 1, ...,X,y= 1, ...,Y , is rendered with the information recorded from the ToF camera. Each pixel information reflects the intensity from the object projected on the pixel in the camera’s XY XY XY plane. 4.1.3.2 Depth frame The depth frame (Figure 4.19B) deptht′,x,y,x= 1, ...,X,y= 1, ...,Y deptht′,x,y,x= 1, ...,X,y= 1, ...,Y deptht′,x,y,x= 1, ...,X,y= 1, ...,Y , where X X Xis the camera’s horizontal resolution and Y Y Yits vertical resolution, is rendered with the information recorded from the ToF camera,
90 4. Real Dataset Toolchain with each pixel representing the distance from the object to the projected pixel in the camera’s XY XY XY plane. 4.1.3.3 Point cloud The 3D point cloud (Figure 4.19C) has the Cartesian coordinates xyz of the voxel that was projected in each pixel, pcxt′,f ,pcyt′,f ,pczt′,f ,f= 1, ..., X ×Y pcxt′,f ,pcyt′,f ,pczt′,f ,f= 1, ..., X ×Y pcxt′,f ,pcyt′,f ,pczt′,f ,f= 1, ..., X ×Y. 4.1.3.4 Ground-Truth The ground-truth information (black squares in Figure 4.19) consists in exporting the pose information for the human using the ground-truth standard in Table 4.1, with respect to the perspective of each frame (equation 4.14). With that in mind, two types of ground-truth are possible: 2D pose for amplitude and depth frames; and 3D pose for the point cloud. Both types of ground-truth consist in the same pose information for the human, that is a structure comprised of all joints’ pixel, PxyC J PxyC J PxyC J(2D), or voxel, PxyzC J PxyzC J PxyzC J(3D), positions. PxyzC J=PC J PxyC J=PxyzC J·IMC (4.14) Table 4.1: Ground-truth joint label correspondance with MVN simplified ISB model from Table 2.1 used in ADTF filter from Algorithm 3.1.5. Ground-truth joints (Index) Simplified ISB (Index) Ground-truth joints (Index) Simplified ISB (Index) head (1) Head(6) rhand (11) neck (2) Neck(5) hip (12) L5(0) chest (3) T8(4) lpelvis (13) LeftUpperLeg(19) lshoulder (4) LeftUpperArm(12) rpelvis (14) RightUpperLeg(15) rshoulder (5) RightUpperArm(8) lknee (15) LeftLowerLeg(20) lelbow (6) LeftF orearm(9) rknee (16) RightLowerLeg(16) relbow (7) RightF orearm(13) lankle (17) LeftF oot(21) lwrist (8) LeftHand(14) rankle (18) RightF oot(17) rwirst (9) RightHand(10) lfoot (19) LeftT oe(22) lhand (10) rfoot (20) RightT oe(18)
4.2. Evaluation results 97 Feature (Input) Label (Output) RE1 RE2 RE3 Figure 4.24: Visual representation of input features and output used for each experimental scenario RE#: (RE1) 2D pose estimation from depth images using normalized depth frame as input and 2D body pose as output; (RE2) 2D pose estimation from point cloud using normalized point cloud as input and 2D body pose as output; and (RE3) 3D pose estimation from 2D pose using 2D body pose as input and 3D body pose as output. Table 4.3: PCKh measure and AUC values averaged over all 14 joints, for the 3 experimental scenarios and all 7 sub-evaluations. Each M# M# M# represents a sub-evaluation for the assessment of the influence of mixing public datasets with the toolchain generated one. Each RE# RE# RE# represents different pose estimation scenarios. M1 M2 M3 M4 M5 M6 M7 RE1 PCKh195.97 0.01 69.54 94.88 12.64 94.57 95.48 AUC 56.14 0.01 33.36 59.39 5.26 58.04 55.33 RE2 PCKh196.47 AUC 64.43 RE3 PCKh295.53 0.00 95.12 97.25 0.00 95.80 97.73 AUC 59.87 0.00 56.81 57.68 0.00 62.07 65.63 1RE1 and RE2 does matching threshold to 26 pixels.2RE3 does matching threshold to 200 mm. same metrics from RE1 were employed. Results are shown in Tables 4.3, 4.4, and Figure 4.25B. 3D Pose Estimation from 2D Pose (RE3) To evaluate the toolchain generated 3D ground-truth, a 3D pose estimation method [104] was used. The method uses a 2D body pose as input features (provided as joint pixel coordinates) and the 3D body pose as output (Figure 4.24). Once again, similar metrics were employed, but in this case PCKh matching threshold was normalized to a fixed head size of 200 mm. Results are shown in Tables 4.3, 4.4, and Figure 4.25C.
98 4. Real Dataset Toolchain Table 4.4: Evaluation results ([email protected]) per joint group in the three experimental scenarios. Each M# M# M# represents a sub-evaluation for the assessment of the influence of mixing public datasets with the toolchain generated one. Each RE# RE# RE# represents different pose estimation scenarios. M1 M2 M3 M4 M5 M6 M7 RE16 Head199.88 0.00 60.00 100.00 5.00 99.48 94.68 Shoulder299.87 0.02 62.89 100.00 0.00 99.87 99.85 Elbow397.23 0.00 79.71 99.31 40.87 95.23 97.14 Wrist462.99 0.00 19.80 49.14 25.93 44.35 64.34 Hip5100.00 0.00 93.99 100.00 0.00 99.90 99.75 RE26 Head199.94 Shoulder2100.00 Elbow398.06 Wrist459.38 Hip5100.00 RE37 Head1100.00 0.00 99.64 100.00 0.00 100.00 100.00 Shoulder2100.00 0.00 100.00 100.00 0.00 99.94 100.00 Elbow390.54 0.00 86.39 92.76 0.00 89.06 95.94 Wrist482.66 0.00 84.70 90.75 0.00 85.85 90.42 Hip5100.00 0.00 100.00 100.00 0.00 100.00 100.00 1Head uses head and neck joints. 2Shoulder uses rshoulder, lshoulder and chest joints. 3Elbow uses relbow and lelbow joints. 4Wrist uses rwrist and lwrist joints. 5Hip uses rhip, lhip and pelvis joints. 6RE1 and RE2 does matching threshold to 26 pixels.7RE3 does matching threshold to 200 mm 0 0.1 0.2 0.3 0.4 0.5 0 20 40 60 80 100 Normalized distance Detection rate % A 0 0.1 0.2 0.3 0.4 0.5 Normalized distance B 0 0.1 0.2 0.3 0.4 0.5 Normalized distance M1 M2 M3 M4 M5 M6 M7 C Figure 4.25: PCKh total for all sub-evaluations, M#, and the three first experimental scenarios, RE#: (A) 2D pose estimation from depth images (RE1); (B) 2D pose estimation from point cloud (RE2); and (C) 3D pose estimation from 2D pose (RE3). Color gradient represents different combinations of datasets. Continuous lines represent one dataset trained for 200 epochs, dotted lines represent two datasets trained in sequence (1st →180 epochs, 2nd →20 epochs), and dashed lines represent two mixed datasets trained for 200 epochs.
4.2. Evaluation results 99 0 20 40 60 80 100 Detection rate % M1 M2 M3 M4 M5 M6 M7 0 20 40 60 80 100 Detection rate % 0 20 40 60 80 100 Detection rate % 0 20 40 60 80 100 Detection rate % 0 0.1 0.2 0.3 0.4 0.5 0 20 40 60 80 100 Normalized distance Detection rate % 0 0.1 0.2 0.3 0.4 0.5 Normalized distance 0 0.1 0.2 0.3 0.4 0.5 Normalized distance Figure 4.26: PCKh for all sub-evaluations, M#, and the three first experimental scenarios, RE#: (1st column) 2D pose estimation from depth images (RE1); (2nd column) 2D pose estimation from point cloud (RE2); (3rd column) 3D pose estimation from 2D pose (RE3); (1st row) Head; (2nd row) Shoulder; (3rd row) Elbow; (4th row) Wrist; and (5th row) Hip. Color gradient represents different combinations of datasets. Continuous lines represent one dataset trained for 200 epochs, dotted lines represent two datasets trained in sequence (1st →180 epochs, 2nd →20 epochs), and dashed lines represent two mixed datasets trained for 200 epochs.
100 4. Real Dataset Toolchain 4.3 Discussion In terms of the toolchain output for human body pose detection, it falls behind other methods [51, 49] when used in an open space. The big novelty and advantage of the proposed toolchain is for the in-car scenario. Here, the toolchain improves considerably on others that share the same in-car focus [67]. As mentioned before, two state-of-the-art motion capture systems (optical and inertial) were fused. By doing it, their stand-alone limitations were suppressed (marker occlusion, global positioning drift) and their added benefits increased by creating a motion capture system for highly occluded scenarios. It was possible to record and project a human motion capture system into an image sensor in an heavily occluded scenario. The projection is possible through specific calibration procedures that allow for a temporal and spatial alignment of all recorded systems. Due to this complex pipeline, several sources of error exist, with the major ones being associated to the inertial motion capture suit (Figure 3.15) and the Awinda to Vicon head spatial alignment (Figure 4.21). Despite this calibration sensitivity, it was possible to record in-car datasets with proper human body pose motion capture (Figure 4.23). The toolchain shows robustness to magnetic distortion scenarios, namely inside the vehicle, where it was possible to observe a performance similar to movements performed outside the vehicle (Figure 4.22). The toolchain can also be applied in other scenarios where ambient occlusion is a limitation factor for motion capture. In terms of data validation, Figures 4.25, 4.26 and Table 4.3 demonstrate the interest in using toolchain generated data in ML training for the in-car scenario, showing PCKh improvements in all experiments when adding toolchain generated data. RE1:M1 RE1:M1 RE1:M1and RE2:M1 RE2:M1 RE2:M1proved that training with specific use-case datasets can achieve best accuracy (in-car scenario). On the other end, mixed dataset combinations (i.e. ITOP or NTU RGB+D plus MoLa 8.7k InCar) also performed better then single generic dataset training (e.g. M2< M4 M2< M4 M2< M4and M5< M7 M5< M7 M5< M7) demonstrating again the interest of using specific use-case datasets for training. Evaluations that rely on fine-tuning also presented the same results (e.g. M2< M3 M2< M3 M2< M3and M5< M6 M5< M6 M5< M6), meaning that pre-trained models can be fine-tuned with the toolchain’s dataset to achieve good results. Interestingly, besides demonstrating the interest of toolchain generated data for increased algorithmic accuracy, the present results also seem to suggest that the use of a 3D point cloud as input may lead to a better pose inference when compared to networks using depth images (see for example the higher AUC values for RE2:M1 RE2:M1 RE2:M1compared with RE1:M1 RE1:M1 RE1:M1). In the end, for the in-car 2D body pose estimation problem, a higher PC[email protected] total score in RE2:M1 RE2:M1 RE2:M1(i.e. MoLa 8.7k InCar point cloud based training) of 96.47% and corresponding AUC of 64.43% was achieved. For the in-car 3D body pose estimation problem, the same conclusions can be made with regard to using specific use-case datasets vs. generic ones. However, better
4.4. Conclusions 101 results were also achieved when mixing datasets instead of training with the toolchain generated dataset alone (i.e. RE3:M1< M6< M7 RE3:M1< M6< M7 RE3:M1< M6< M7). In this case, considering both metrics ([email protected] total and AUC), it achieved 97.73% and 65.63% respectively for RE3:M7 RE3:M7 RE3:M7. Finally, Table 4.3 summarizes the results for individual joints, being possible to conclude that joints frequently present at the image’s limits (wrists and elbows) are the most problematic. This may be related with the lower number of training samples with these joints visible (as they are more frequently outside of the camera’s field-of-view or in the camera’s deadzone). Hip joints also show similar problematic results, but in this case is related to two types of errors (i.e. Awinda-to- Vicon spatial alignment [Section 4.1.2.5], and forward kinematics error propagation from head joint [Chapter 3, Section 3.2.4]), creating less stable ground-truth data for these specific joints. 4.4 Conclusions In this chapter, a novel toolchain for the generation of in-car human body pose datasets is presented (Appendix B). The toolchain demonstrated to be able to generate datasets through a specific setup consisting in an inertial suit, a global positioning system and a ToF camera, coupled with a set of calibration procedures. The motion capture system was thoroughly evaluated and the sources of error were presented. A toolchain generated dataset is also made publicly available. In terms of future work, and regarding the calibration procedure, an extra step could be added for the correction of the initial suit calibration, as previously presented in [55]. This would allow a lower sistematic error for the projected body pose. Notwithstanding, this step would have to be non-intrusive for the recording procedure. In terms of dataset quality, there are currently several limitations, mostly coming from the inertial suit (namely related with sensor fixation and soft tissue movement). This could be solved with future inertial suits or better initial calibration procedures from the supplier.
Chapter 5 Synthetic Dataset Toolchain As shown in Chapter 1, given the aimed development pipeline, this chapter is parallel to Chapter 4 and is a requirement for chapters 6 and 7. Preliminary versions of the work presented in this chapter were presented in paper [81]. In the first section of this chapter, the synthetic dataset toolchain (previously mentioned in Section 1.5.3) overview is shown. The three conceptual modules are then presented: the first module shows the human model creation and its customization aspects (Section 5.1.1); the second module shows how the entire 3D virtual environment is created, generated and validated through specific collision verifications (Section 5.1.2); and the third module shows the entire dataset rendering output, focused on image sensor frames and human body pose ground-truth (Section 5.1.3). In the second section of this chapter, the synthetic dataset toolchain implementation is shown in-depth. The automation prespective is presented, with context to the software tools used. The mathematical algoritmic concept is shown for the complete toolchain automation, as well as for sub-algorithms, such as collision detection, frame rendering, noise modeling, etc. Algorithmic implementation focuses in mimicking the real dataset toolchain image sensor characteristics (Section 2.1.3.3). Sub-algorithm algorithm complexity is also shown for the more complex ones. In the third section of this chapter, the entire system’s evaluation and potential interest is shown. Two evaluation procedures were defined, one focused on the algorithmic performance of the toolchain, and a second focused on the synthetic data application for human body pose estimation. The first evaluation procedure (Section 5.3.1) evaluates each sub-algorithm complexity, in order to identify maximum toolchain performance in regard to user configurations. The second evaluation procedure (Section 5.3.2) shows how synthetic datasets generated by the toolchain can improve the accuracy of a Machine Learning (ML) based method for human body pose detection.
103 In the forth and fifth sections of this chapter, discussion, conclusions and future work are shown. Results from evaluation procedures show that the toolchain improves on others, while being the only one focused in the in-car scenario. Toolchain generated data demonstrated to be valuable for ML based methods, increasing their detection accuracy, specifically with the 3D point cloud. Future improvements are discussed, specifically for the most complex sub-algorithms. Contents 5.1 ToolchainOverview ................................. 104 5.1.1 Human model creation . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5.1.2 Sceneengine ............................... 106 5.1.3 Rendering ................................. 109 5.2 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 5.2.1 PythonEngine............................... 115 5.3 Evaluationresults.................................. 122 5.3.1 Performance................................ 122 5.3.2 Application to Pose Estimation Problems . . . . . . . . . . . . . . . . . . . 123 5.4 Discussion ..................................... 130 5.5 Conclusions and future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
104 5. Synthetic Dataset Toolchain 5.1 Toolchain Overview In this section, the pipeline of the proposed toolchain is described. The proposed pipeline can be divided into three conceptual modules, as illustrated in Figure 5.1. The first module corresponds to the human model creation (Section 5.1.1). In this module, different human models are created through the MakeHuman [105] engine, with the associated skeleton and skin texture. The second module concerns the scene engine (Section 5.1.2). Using as input the human models created in the first stage, this module is responsible for the initialization of the scene considering all objects in it (humans, car and camera), followed by the body pose generation for each human model and associated validation with respect to collisions. Finally, the third module corresponds to the rendering phase (Section 5.1.3), where specific camera frames and human body poses are rendered taking into account the camera perspective and customization. This last module also improves the output data (Time-of-Flight (ToF) images and point cloud) through image processing procedures (namely using the Neural Style Transfer (NST) technique [106]). Both modules (sections 5.1.2 and 5.1.3) are based on Blender and Python programming. Figure 5.1: Overview of the toolchain pipeline. 5.1.1 Human model creation The first step of the proposed toolchain is the creation of different human models using the MakeHuman [105] engine. Within this human model creation module, a full customization of the model shape is allowed, through the definition of several parameters, namely body size, body mass, body asymmetry, among others. In fact, the creation of human models with different characteristics, in terms of their shape, is an important task in the toolchain. The higher the variability of the different human models, the higher the quality of the dataset, allowing to give the expected generality for the body pose detection algorithm. This step is fully automated in the toolchain, as the models are randomly created in the initialization step and customized through specific parameters accessible to the user. Each created human model (equation 5.1), ηh ηh ηh, is comprised of a full body skin mesh, ηsm h ηsm h ηsm h, a full
5.1. Toolchain Overview 105 body skin texture, ηst h ηst h ηst h, and a body skeleton with 6 Degrees-of-Freedom (DoF) per joint, ηbp h,j,a ηbp h,j,a ηbp h,j,a, with joint position/orientation,ηp h,j,ηo h,j,a ηp h,j,ηo h,j,a ηp h,j,ηo h,j,a, and Range of Motion (RoM),ηrm h,j,a ηrm h,j,a ηrm h,j,a,h= 1, ..., H h= 1, ..., H h= 1, ..., H,j= 1, ..., Jf j= 1, ..., Jf j= 1, ..., Jf,a= 1, ..., Af a= 1, ..., Af a= 1, ..., Af, where H H Hrepresents the number of human models, Jf Jf Jf the number of joints that can have freedom of movement in the model, and Af Af Af the axis of freedom on the joint. Finally, a human motion profile is defined within the toolchain, for each human a user input, ΓH h ΓH h ΓH h, is defined (Figure 5.3B) with a Gaussian, Γg h,j,a Γg h,j,a Γg h,j,a, or incremental, Γinc h,j,a Γinc h,j,a Γinc h,j,a, motion profile, an initial body pose, Γip h,j,a Γip h,j,a Γip h,j,a, associated to each of its joints, j j j, axes, a a a, and an RGB and label skin texture, Γrgb h,Γlb h Γrgb h,Γlb h Γrgb h,Γlb h. ΓH h={Γg h,j,a ={Γσ h,j,a,Γµ h,j,a}Γinc h,j,a,Γip h,j,a,Γrgb h,Γlb h} ηh={ηsm h, ηst h, ηbp h,j,a ={ηp h,j, ηo h,j,a}, ηrm h,j,a, ηsk h} (5.1) Even though MakeHuman presents different formats for the body skeleton, the Carnegie Mellon University (CMU) format was employed given its relationship with the Vicon kinematic fit model (Chapter 2) and the inherent resemblance with the MVN Awinda Internal Society of Biomechanics (ISB) model (Chapter 2), making it easier to establish a ground-truth format similar to the real dataset (Table 4.1). Each human label skin texture is fully segmented according to the different body parts, where this texture is transversal to all body models, being deformed to fit the different body shapes. The segmented skin labels (i.e. body joints and body segments) has specific RGB color codes, as illustrated in Figure 5.2 and Table 5.1. This skin does not exist when the human model is created (i.e. each human model comes with a generic real skin texture representation), thus its color code and painting needed to be defined/created. Body part segmentation is not used for the final algorithmic development in this thesis, however it is considered a relevant information for current [2, 50] and future methods. Figure 5.2: RGB body part segmentation of the human model.
106 5. Synthetic Dataset Toolchain Table 5.1: RGB code for body part segmentation of human model. Label RGB Label RGB Label RGB Label RGB Foot Left 0x000055 Thigh Left 0x00AA55 Shoulder Left 0x550000 Wrist Left 0x55AA00 Foot Right 0x0000AA Thigh Right 0x00AAAA Shoulder Right 0x550055 Wrist Right 0x55AA55 Ankle Left 0x0000FA Hip Left 0x00AAFA Upper Arm Left 0x5500AA Hand Left 0x55AAAA Ankle Right 0x005500 Hip Right 0x00FA00 Upper Arm Right 0x5500FA Hand Right 0x55AAFA Shin Left 0x005555 Hip Center 0x00FA55 Elbow Left 0x555500 Neck 0x55FA00 Shin Right 0x0055AA Torso Left 0x00FAAA Elbow Right 0x555555 Head Left 0x55AA55 Knee Left 0x0055FA Torso Right 0x00FAFA Forearm Left 0x5555AA Head Right 0x55AAAA Knee Right 0x00AA00 Forearm Right 0x5555FA 5.1.2 Scene engine The scene engine module is responsible for the creation of the scene to be rendered. This block is subdivided into three different parts, namely initialization, generation, and validation. These three stages will be explained in detail in the next sub-sections. Moreover, this engine requires user input to create the scenes (equations 5.1, 5.2 and 5.3). A camera model is chosen (equation 5.2), ι ι ι, with given user-defined camera parameters, ΓT ΓT ΓT, (Figure 5.3A), including camera resolution, ΓX,ΓY ΓX,ΓY ΓX,ΓY, horizontal Field-of-View (FoV), ΓHF oV ΓHF oV ΓHF oV , position, Γtp Γtp Γtp, orientation, Γto Γto Γto and axial noise model, Γn= {Γa,Γb,Γc} Γn= {Γa,Γb,Γc} Γn= {Γa,Γb,Γc}. ΓT={ΓX,ΓY,ΓHF oV ,Γtp,Γto,Γn={Γa,Γb,Γc}} ι={ιX, ιY, ιHF oV , ιp, ιo, ιn} (5.2) A car model (equation 5.3), ζ ζ ζ, is also given as user input, ΓC ΓC ΓC, to this block (Figure 5.3C), which is imported to create the realistic 3D car model mesh, Γcm Γcm Γcm, with 6DoF position/orientation, Γcp,Γco Γcp,Γco Γcp,Γco, to their equivalent set or variables from the car model, ζ ζ ζ. ΓC={Γcp,Γco,Γcm} ζ={ζp, ζo, ζm} (5.3)