## 3 Methodology and Implementation
### Architecture and Principle of Operation of Victim Identification Module
#### 3.1.2 Metric Learning  
A key component of the disaster victim identification module is a neural network that assists in the process of face recognition and victim identification. A deep learning metric technique was used here, which has been described in detail by [PERSON] and [PERSON] [45]. The method is based on the use of similar algorithms as in the case of image classification using neural networks, but instead of learning to assign data to specific categories, the network learns to calculate the distance function between elements from the training dataset, according to the relation [46]:  
\[d:X\times X\to R^{+}, \tag{1}\]  
\(X\)--dataset, \(X=\{x_{1},\dots,x_{N}\}\),  
\(d\big{(}x_{i},x_{j}\big{)}=\) short distance--elements are semantically similar to each other,  
\(d\big{(}x_{i},x_{j}\big{)}=\) large distance--no semantic similarity between elements. The convolutional network is responsible for determining a low-level representation of the data called embeddings, which are feature vectors of a specific length for each image in the dataset. Semantic similarity or lack thereof is assessed using a simple distance metric, in this case Euclidean distance:  
\[d(x,y)=||x-y||=\sqrt{\sum_{i=1}^{n}(x_{i}-y_{i})^{2}}, \tag{2}\]  
\(x,y\)--coordinates of a vector in space. During the neural network learning process, images from the input \(N\)-dimensional space are projected onto a \(k\)-dimensional representation space, where \(k\) denotes a fixed embedding length [47]--Figure 2.  
The identification system developed adopted an embed length of 256 elements (usually a value in the range of 128-2048 is adopted). This value was chosen as a balance between computational efficiency and the ability to represent facial features with sufficient granularity, ensuring compatibility with state-of-the-art deep metric learning approaches, while optimizing performance for performance-constrained environments. The system used a neural network architecture consisting of six convolutional blocks and one fully connected layer, subjected to normalization. A symbolic description of the used network according to the methodology proposed by [PERSON] in [48] is given below--Figure 3.  
Figure 3: Symbolic description of neural network architecture. Figure 2: The concept of how conversion form input space to representation space works. In the case of supervised deep metric learning, the model has access to an extensive set of labelled training data, each consisting of a training instance and its label from a discrete finite set. From these, learning datasets are generated in the form of:  
* pairs of semantically similar and dissimilar objects;
* triplets of objects, of which element no. 1 is similar to element no. 2 and is not similar to element no. 3. As the works of [PERSON] et al. [49] as well as [PERSON] and [PERSON] [50] show, the use of the method of teaching triplets instead of teaching pairs allows for much better results. The flowchart of the method is shown below--Figure 4.  
Figure 4: Idea of triplet metric learning. According to the above concept, the computational algorithm processes batches of data during each iteration, within which learning triplets are generated that include a base element (anchor), a semantically similar element (positive) and a semantically dissimilar element (negative). During the learning process, the coefficients of the convolution filters (weights in the convolution layers) are modified in such a way as to decrease the distance in the representation space between the anchor and the positive element and to increase it for the anchor and the negative element.