1 Introduction

Classification of Bloodstains Forensic bloodstain pattern analysis involves analysing the shape and location of bloodstains at the crime scene to obtain case-relevant information. Since blood as a biological fluid is subject to physical laws, identical drop shapes indicate identical formation dynamics. Thus, there are classification schemes designed by forensic scientists who try to classify blood samples according to their shape. It is assumed that blood patterns of the same class have also been formed in the same way. Among the best known classification schemes are the system by Gardner et al. which is based on the velocity of blood drops [7] and the system by Bevel and Gardner which is based on the causative force [4]. This system fundamentally distinguishes between actively and passively induced bloodstains. Passive bloodstains are generated by the pure action of gravity, while active bloodstains are additionally accelerated by other external forces.

Fig. 1
figure 1

A schematic depiction of one of the most common classification schemes for bloodstain patterns in Europe. It distinguishes between traces that were generated passively (“Passive”), traces that were created actively through transfer (“Transfer”), and traces that were created actively through projection (“Projected”). Other traces, which are difficult to assign, are assigned to the category “Miscellaneous”. (modified from [4]; expiratory stain and fly spot taken from [4])

At the scene of a crime this classification makes it possible to distinguish whether a bloodstain is the direct result of an active force or whether it has been passively dripped from wounds or elevated objects. Further, the system by Bevel and Gardner [4] subdivided active bloodstains into transfer bloodstains and projected bloodstains, thus resulting in four supercategories: passive traces, transfer traces, projected traces and miscellaneous. Each of these upper categories contains a different number of blood patterns that can be distinguished from each other. An overview is shown in Fig. 1.

Deep learning via Inception v3 The open-source project of Google called Tensorflow is easy to use and can be operated on almost all systems due to its many interfaces [1]. We utilize this framework to train a CNN (Convolutional Neural Network) with the aim to be able to automatically distinguish blood spatters from blood drops.

CNN are artificial neural networks inspired by biological processes in the brain. This method of deep learning is often used for processing images or audio files. Basically, CNN consists of units of one or more convolutional layers followed by a pooling layer. While in the convolutional layer a small convolutional matrix is places onto the input to determine the activity of the individual neurons, in the pooling layer excess information is discarded. For this purpose the matrix is divided into areas of equal size and only the most active neuron in each area is passed on (“Max-Pooling”). This keeps the memory requirement small and increases the calculation speed. After one or more of such units of convolutional and pooling layers, the so-called fully connected layer usually follows. In this last layer, the number of neurons usually corresponds to the number of predefined classes that the network should distinguish. The associated Softmax function translates the activities of the fully connected layer into a probability distribution. Overall, this simplified structure is used to extract information from 2D or 3D data and calculate the probabilities, with which the data input matches the given classes. Among the most well-known applications of CNN are speech and image recognition.

While conventional CNN have piled up more and more layers in hope of increasing performance, a new approach was developed during the ImageNet Recognition Challenge: Inception or the current version Inception v3 from Googlenet increases the performance with some programming tricks [16]. Different and reduced filter sizes increase the performance and recognize prominent image areas more easily, even if they may be of different sizes (Fig. 2).

Fig. 2
figure 2

A schematic representation of the Inception model. It consists of symmetric and asymmetric building blocks, including convolutions, average-pooling, max-pooling, concatenations, dropouts, and fully connected layers. A special feature is transfer learning which enables the model to retrain the final layer of an existing model which results in a decrease of training time and required training data. (modified from [13])

In 2015, the Google Brain Team released the TensorFlow framework [1], which was designed to optimize programming, especially in the area of machine learning, since it included many ready-made software solutions and was compatible with many major programming languages. In TensorFlow, mathematical operations are displayed in the form of a graph. The graph represents the sequential flow of all operations to be performed by TensorFlow. The CNN Inception v3 is also included with version 1.4.1 TensorFlow and offers scientists an excellent opportunity to apply pre-trained models to their own data or to train their own models. In this publication self-created two-dimensional image data from bloodstains are classified. Therefore, Inception v3 is the ideal platform within TensorFlow, because it promises high performance for this kind of data and is easy to copy.

Motivation and Aim Experienced bloodstain pattern analysts can classify blood stain pattern on a crime scene with a high success rate but it was shown earlier that contextual information of the crime scene is often incorporated into pattern classification decisions which leads to a 20 % higher proportion of misclassifications [17]. Based on this, the present study will evaluate whether it is possible to automate the process of bloodstain classification. This approach promises a purely objective view of the bloodstains. Deep learning approaches are known for properties that are good for image recognition, where the information of many thousands or millions of pixels has to be matched to a few allowed classes [18]. Many fields and disciplines of forensic science already benefit from computer-aided analysis, which shortens the computation time and enables high-throughput analysis [3, 6, 9, 10, 14]. In the field of forensic blood trace pattern analysis, new approaches to digital analysis have also emerged in recent years [2, 5, 8, 19]. There are even final software products that are supposed to support the interpretation of blood stains at the crime scene [11, 12]. Especially in this field, the possibility of an automatic classification would be enormously helpful.

In order to establish an origin for automatic bloodstain pattern classification, this publication focuses only on the distinction between passively originated drip stains and actively originated blood spatters. While, by definition, drip stains are created by blood drops falling down only due to gravity, blood spatters are created by blood drops that are thrown through the air due to a force against a source of liquid blood. [15]. The differentiation of drip stains and blood spatters is comparatively simple, since they can be easily distinguished visually. While the drip stains are almost perfectly round, blood spatters take different shapes depending on the applied force.

2 Data Acquisition and Method

Untreated and mixed porcine blood from a local butchery was used to create the bloodstain pattern. To prevent premature blood clotting, it was transported in airtight bags, stored in the refrigerator and used within 12 h.

For the passively originated drip stains, blood was drawn into a commercially available disposable pipette and dropped vertically onto paper strips from various heights between 25 and 35 cm. Care was taken to ensure that the drops would dissolve on their own and that they would not fall on already formed bloodstains. The finished blood-stained paper strips were placed on a DIN A3 sheet of paper. For taking the pictures, a camera was positioned orthogonally to the background with a tripod (height of 45 cm). The paper strips were pulled underneath and photographed.

For the actively originated blood spatters, a structure consisting of cardboard boxes, a polystyrene board, a cardboard tube, a metal plate and several A3 sheets of paper was designed. This structure was fixed with adhesive tape and made impermeable to liquids. Thereby it is possible to exert a constant force on a puddle of 15 ml blood placed in the middle of the box by dropping the cardboard tube onto it from a height of 50 cm. By removing the blood-spattered paper from the setup and cutting lengthwise into strips (Fig. 3) the resulting active blood spatters could be photographed by a vertically positioned camera at a height of 45 cm (Fig. 3).

The images were transferred via a storage medium to an average PC (specifications: Ubuntu 18.04.4 LTS; 4GB RAM; AMD Ryzen 7 3700x 8-core processor; 42 GB HDD; VMSVGA 30MB RAM) and then edited with the free available image editing software GIMP 2. The image processing involved white balance and cutting out the individual blood stains (\(400\times 400\) pixels). Each blood stain was then saved as an individual image file. This procedure resulted in a total of 2926 images. These images were divided into blood spatters (n=1595) and drip stains (n = 965) according to their origination and placed in two folders. These two folders represented the classes for the following training. 366 images were not subdivided and later used as the test data set.

So in total we have a training data set (1595 blood spatters and 965 drip stains) and a test data set (366 images without class reference).

By means of the programming language Python 2.7 the training programm for the CNN Inception v3 was created. Essential libraries provided by pip for the presented method were Tensorflow, Pandas, Tensorboard, Numpy, Argparse, Hashlib and Tarfile. A complete listing of all necessary libraries can be found in the supplements. At the end, 2000 training steps were used, so that the classification accuracy of the model is as high as possible. One step corresponds to one complete training epoch (batchsize = 100). For randomization the images were modified by cropping (reducing the content to max. 50%) and flipping (to the left or to the right). Already cropped images were also flipped.

The training of the CNN using Tensorflow was done in the given 2000 training steps with an internal evaluation during the training. For this, our training data set was split into three subfolders: 80% training data, 10% internal test data (this is not our own test data set) and 10% internal validation data. The training data and the internal test data now have no association, so it is unknown on which images drip stains or blood spatters are seen. In the internal validation data set, this information about the class affiliation remains. This way, an evaluation step can be inserted every 10 training steps, in which the current training status is queried with the internal evaluation data and, if necessary, a shift in the training focus can be initiated. At the end of each validation step, the internal test data is classified using the current training state of the CNN. This makes it possible to see in retrospect how good the adjustments were. This is to prevent overfitting during the training. After the training, our test data set (366 images) was given to the CNN for classification. These were not used in training. Their class affiliation was known to us and unknown to the CNN. Using this classification result, we evaluated the accuracy of the trained CNN.

Fig. 3
figure 3

Schematic depiction of the generation of the CNN using Tensorflow. Bloodstains generated in the laboratory were divided into two categories and provided to the network as a training dataset. The finished model is now able to automatically classify unknown bloodstains from both categories with high accuracy

3 Results

Training the network with 2560 images took 5:42 min. The resulting model had a size of 87.5 MB. In Fig. 4, it can be seen that the two predefined classes are mostly separated after only a few training steps. Few exceptions are gradually separated in the course of the 2000 training steps.

Fig. 4
figure 4

Schematic depiction of the results of the internal cross validation during the training. On the left hand side the internal validation data is shown. Since the class affiliation is known here, the focus of the network can be adjusted if the classification accuracy is not yet optimal. On the right hand side the internal test data is shown. The adjustments made to the evaluation data also affect the accuracy of their classification. Over the course of the 2000 training steps, the test data can be used to track the approximate increase in classification accuracy of the training data. While the majority of the images can be clearly assigned after only 50 steps, there are some difficult images that can only be cleanly separated after the 2000 training steps. This slow but steady separation is marked with arrows

The classification of the 366 test images took 30 s. The classification result contains a statement about whether it is a drip or a blood splash as well as a so-called score, which indicates how certain the result is. Based on the features previously determined by the model, this is a percentage indication of how certain the statement is. 365 of the 366 test images were correctly classified in this way (99.73%).

4 Discussion

With the help of TensorFlow, a CNN was trained to distinguish between passively originated drip stains and actively originated blood spatters. From the 366 test images, 99.73% were correctly classified. This result proves that it is possible to classify bloodstains automatically and that the simple approach presented here is suited for this purpose.

Despite this encouraging result, there are limitations so far. In previous experiments (data not shown here), it was found that our model currently still has problems classifying wet bloodstains. The present dataset only includes dried bloodstains for training and testing, due to the fact that the surface of wet bloodstains reflects nearby light sources from above. Hence, reflections occurring at the drop surface apparently were misinterpreted by the model.

To avoid this problem in the future, more wet blood drops should be included in the training dataset or a separate class could be defined that includes only wet bloodstains. Furthermore, as with almost all classification difficulties of a CNN, the problem can be minimized with more data.

Therefore, we are already generating additional images of different classes of blood trace patterns. In the future, we will also have to think about integrating images from other databases or crime scenes into our dataset. This way, the approach would always remain up-to-date.

To find out which other factors can have a negative influence on the classification we tried to detect those features in the images that are mainly responsible for the classification. In Fig. 5 we can show with the help of a heat map that there are basically two factors that influence the classification: the droplet shape and the distribution of solid blood components. Within a few minutes, a bloodstain gradually dries out under the influence of atmospheric oxygen. This causes all the solid blood components to contract further and further, leaving behind an edge area of dried blood plasma residue. Depending on the substrate condition and the angle of impact, this area takes on different shapes and is wetted with blood to different degrees. In the case of actively formed blood spatters on walls, gravity during drying ensures that this edge area is formed on only one side, namely the upper one. Blood spatters on horizontal surfaces does not have this special feature; here, only the drop shape determines the classification result.

Fig. 5
figure 5

Visual representation of the decision-making basis for classification. The first row shows the original images, while the second row uses a heat map to highlight which regions in the image were particularly relevant to the classification result. The higher the proportion of yellow in an area, the higher its proportion was in decision-making. In the bottom row, the heatmap was superimposed on the original image to further identify the relevant regions. It is noticeable that apparently not only the shape contributes to the classification, but that features such as the degree of wetness stemming from blood are also used in the decision (color figure online)

5 Outlook

Since the approach presented here worked out well we repeat it with a larger number of training images at the moment. Based on this publication, we now plan to separate other bloodstain patterns and take into account other factors such as texture or background color. It also lends itself to a comparison of the classification quality of our approach with that of experts in forensic blood trace pattern analysis.

We will continue to collect information about the areas which were responsible for decision-making when classifying additional blood pattern classes in the future, as it may also provide useful guidance for manual classification because the CNN reveals visual differences in an unbiased manner. In our vision the method presented here provides a simple and effective basis for a stepwise integration of computer-aided methods into forensic bloodstain pattern analysis. Figure 6 depicts an schematic overview of a fully automated BPA in 3D space.

Fig. 6
figure 6

Our vision of an automated forensic bloodstain pattern analysis. After a crime scene with relevant bloodstains has been digitally scanned, first all bloodstains have to be extracted from the background to be processed. Subsequently, the pattern classification (yellow = presented in this publication) gives a first overview of the crime sequence and helps to determine those bloodstains which are suitable for a determination of the Area of Convergence (point of contact of the trajectories in space which gives information about the position of the victim or perpetrator). In order to determine the convergence point, boundaries must first be set around the the so-called primary stains, from which the angle of incidence can be calculated. Other forensic aspects of blood such as bloodstain age estimation can now also be realized in the 3D model (color figure online)

We have already successfully implemented the partial steps shown in Fig. 6 and are currently optimizing them with additional bloodstain patterns. In the next publications, we then plan to present a stand-alone software solution that includes all components.