# Human Body Shapes Anomaly Detection and Classification Using Persistent Homology
## 2 Methodology
### Interpretation of Persistent Homology  
The persistence diagram of a body point cloud is composed of three types of homologies (see Figure 2). Since the points are distant from each other at an equivalent distance, all the balls are rapidly connected, thus giving a single connected component. Several \(H_{1}\) and \(H_{2}\) homologies representing the internal body cavities appear and disappear when the radius \(\epsilon\) of the balls varies to \(+\infty\). We now explain our approach to interpret and identify these homological features in terms of human anatomy. Since displaying the homologies in their entirety is too costly, we thought of other approaches for each degree. For each homology, we know the radii of the balls at their birth and death. A simplex tree represents abstract simplicial complexes of any dimension. All faces of the simplicial complex are explicitly stored in a tree whose nodes are in bijection with the faces of the complex. This data structure allows us to efficiently implement a large range of basic operations on simplicial complexes. Using the simplex tree of a set of points, we know the values of the radii when pairs of points, triangles and tetrahedra are covered. The approach is slightly different depending on the dimension:  
* Dimension 0: All \(H_{0}\) homologies are born when the radius of the balls is zero. For each homology \(H_{0}\), we choose to display the second point of the pair covered at the birth of the homology as its representative. * Dimension 1: First, we make an undirected graph containing all the points of a set, where each time a pair of points is covered, as the radius of the balls increases, we connect these points by an edge with a weight equal to the radius of the balls. At the birth of a homology \(H_{1}\), before adding the edge to our graph, we compute the shortest path connecting these two points, which we display by closing it with the segment connecting these points. The lace displayed is a likely representative of this homology. At the death of this homology, we recover the information of the triangle covered by the balls, and we add it to the display to give a general idea of the evolution of our homology. * Dimension 2: For each homology \(H_{2}\), we simply display the triangle covered at its birth and the tetrahedron covered at its death. For example, in the persistence diagram of the individual S0013 given in Figure 2, there are 13 different homologies numbered in the persistence barcode from 0 to 12. With this approach, we display each homology in Figure 5 and we can interpret them as follows:  
Figure 4: Representation of a vector obtained by persistence silhouette. * n\({}^{\circ}\)0: \(H_{2}\) corresponding to the left part of the torso,
* n\({}^{\circ}\)1: \(H_{2}\) corresponding to the right part of the torso,
* n\({}^{\circ}\)2: \(H_{1}\) corresponding to a loop between legs at foot level,
* n\({}^{\circ}\)3: \(H_{1}\) corresponding to a loop between legs from ankles to calves,
* n\({}^{\circ}\)4: \(H_{1}\) corresponding to a loop between legs from knees to calves,
* n\({}^{\circ}\)5: \(H_{2}\) corresponding to the head,
* n\({}^{\circ}\)6: \(H_{2}\) corresponding to the right calf,
* n\({}^{\circ}\)7: \(H_{2}\) corresponding to the left calf,
* n\({}^{\circ}\)8: \(H_{2}\) corresponding to the right foot,
* n\({}^{\circ}\)9: \(H_{2}\) corresponding to the whole body,
* n\({}^{\circ}\)10: \(H_{1}\) corresponding to a loop around the right foot,
* n\({}^{\circ}\)11: \(H_{1}\) corresponding to a loop around the left foot,
* n\({}^{\circ}\)12: \(H_{0}\) of all the connected balls. We remark that the arms and the left foot do not appear on the diagram. This is caused by the minimal persistence and the facts that the arms are too thin and that the scan of the left foot is more flat and deformed compared to the right one. Homology n\({}^{\circ}\)9 is particularly distinguished, and we call it the principal \(H_{2}\)-homology. It corresponds to the aggregation of the parts and limbs of the body, thus forming the inner cavity of the body point cloud.