One symptom that has become a problem in the medical field in recent years is "bedsores." As bedsores primarily affect human skin, early treatment is essential. Macnica has been working with Nagano Prefectural University of Nursing, which has been focusing on research into bedsores, on a project that utilizes AI.

This time, Urara Sakakibara of Macnica, a member of the project, spoke about the initiative.

This article is divided into two parts, with the main focus on the following:

[Part 1]: "Development of an AI model for early detection of bedsores (PoC1)" worked on from June 2022 to March 2023
[Part 2]: Presentation at the NPIAP 2024 Annual Conference held in the United States (hereinafter referred to as NPIAP2024)
"Development of a machine learning model for early detection of bedsores (PoC2)" worked on from April to September 2023

Joint project launched to detect bedsores early

We are working with Nagano Prefectural Nursing University on a project to develop AI that can detect bedsores early. Bedsores are painful conditions that occur when parts of the body are continuously compressed due to long periods of bedriddenness or sitting in a wheelchair, leading to poor blood flow and skin necrosis or inflammation. They are also called "bedsores."

For example, in nursing care settings, measures such as changing the patient's position every few hours are taken. However, it is said that the patient may not feel much pain due to poor blood flow, or symptoms may progress under the surface even if the patient appears normal, leading to delayed detection. It is said that if pressure is continuously applied to a part of the body while the immune system is weakened due to aging or other reasons, the disease may develop even if the pressure is relieved and left untreated. Treatment also takes a long time, and in some cases surgery may be necessary.

Among the various research projects aimed at treatment, Nagano Prefectural University of Nursing is also aiming for the early detection of bedsores. Preventing bedsores from worsening and treating them early will ultimately improve the quality of life of patients and reduce medical costs. Towards that final goal, one of the objectives of this project is to "detect bedsores within 24 hours after pressure is released."

However, early detection of bedsores has been a difficult task. Even if they cannot be seen on the surface with the naked eye, symptoms may be progressing internally. Therefore, we thought, "We should make it possible to predict the onset of bedsores by having AI learn from images of the skin condition." In this project, with the cooperation of Nagano Prefectural University of Nursing, we used image data of simulated bedsores created in rats.

Collection and pre-processing of development data

In the process of collecting data, we changed some conditions to confirm various patterns, such as the presence or absence of bedsore development and differences in condition. For example, "congestion after x minutes, bedsore with ulcer after x hours."

Specifically, the pressure applied to the skin was divided into two types: strong and weak. First, weak pressure was applied for 45 minutes, and the progress was observed from 0 to 60 minutes after the pressure was released. Next, strong pressure was applied for 3 hours and 50 minutes, and the progress was observed from 30 minutes to 120 hours after the pressure was released. It was found that in the strong pressure group, pressure ulcers progressed even if the pressure was left untreated after the pressure was released.

▲ "Congestion" indicates redness that eventually returns to normal skin color, "bedsore without ulcer" indicates bedsore with little skin damage, and "bedsore with ulcer" indicates bedsore with significant skin damage. The black dots on the outside are used to mark the areas where pressure has been applied.

▲Data showing the results of visual observation of changes in skin over time. Comparing the first 0.5 hours and the final 96 hours, there is a clear difference.

Source: Chen, L.; Yuan, Y.; Takashi, E.; Kamijo, A.; Liang, J.; Fan, J. Establishing an Appropriate Pressure for the Transparent Disc Method to Distinguish Early Pressure Injury and Blanchable Erythema. Diagnostics 2022, 12, 1075.

The case in the above image shows the result of applying pressure for 3 hours and 50 minutes, then releasing the pressure, and then leaving it alone. Gradually the pink part darkens and red dots appear, and finally after 96 hours, an ulcer is formed. Although the conditions under which the symptoms progress are different, similar symptoms occur in the human body. And since it becomes difficult to treat once it reaches the state shown after 96 hours, it is best to treat it within the 12 to 18 hour stage.

To train an AI model on these images and correctly predict that "this skin will eventually develop a bedsore," it is necessary to secure data of sufficient quality and quantity. This time, it was difficult to prepare many images, and we also had a lot of trouble adjusting the minute misalignments that had occurred in the image coordinates, but we overcame the problem by using various ingenuity.

As an example of data pre-processing, this time I will talk about image noise removal. We were recommended by university professors that "black and white images taken with a UV (ultraviolet) camera should be able to see not only the surface of the skin but also the inside," so we used images taken with a compatible camera. In fact, since skin colors in color photos contain a variety of hues, the issue was that the images were prone to noise. However, skin is not as uniform as it appears, and there are also influences such as blood flow, so even in the black and white images, dots that were not related to ulcers were noticeable.

Setting a threshold value of "areas that exceed a certain level of blackness are considered ulcers" still left a lot of noise, and manual cropping took too much time to process the data. Therefore, we decided to blur the dotted areas. This allowed us to capture the ulcers with a certain degree of accuracy, and ultimately made it possible to automatically label the areas as "ulcers" with a high degree of accuracy.

▲The red parts in the bottom image are automatically labeled as ulcers through data preprocessing. The raw data without processing contains many irrelevant parts, but you can see that the noise has been reduced by adding processing.

Analysis using open data

This time, we used the existing deep learning model "ResNet50" to train the AI on both images with and without ulcers. The aim was to have it correctly infer that "this skin pattern will later lead to a bedsore." The learning approach was broadly divided into two types.

 The first is the use of the large-scale image database "ImageNet." This is a database unrelated to the medical field, but since the number of images we were able to secure this time was small, we adopted it to maximize accuracy and used the weights of the model obtained by pre-training from it.

 The second method is to conduct pre-learning using open data on affected skin areas. Although the content of the open data is images of skin diseases other than bedsores, we thought that "this method would probably be more efficient and accurate than the first method."

In addition, we also compared the learning and accuracy for each time point, and for UV (black and white) and LED (color) images. Since one of the goals of this project is to "detect bedsores within 24 hours after decompression," we conducted trial and error to make accurate predictions even at an early point in time by labeling images from multiple specimens taken at the same time.

Black and white images are more accurate

We conducted AI training on all four models with different combinations of conditions: "Whether or not pre-training with open data was performed" and "Whether the image was UV (black and white) or LED (color)". As a result, the model with pre-training and UV images achieved high inference accuracy. In the graph below, the area surrounded by the green line corresponds to this.

The three graphs show, from left to right, Accuracy, Recall, and FNR (Failure Rate). The vertical axis of each graph is the corresponding index, and the horizontal axis is the elapsed time.

It would have been better if there were models with uniformly high accuracy in the graphs on the left and center, but since there is variation in accuracy at each point in time, the lines fluctuate to some extent. However, one of the features of the "Pre-trained UV images" model is that the accuracy did not drop significantly even at an early point.

In this project, we focused on the middle score, "Recall." This score indicates whether the system was able to comprehensively infer that an ulcer was present in the image. The higher the score, the lower the risk of misdiagnosing a symptom that should be present as "not present." This is extremely important in the medical field.

 This is an image showing the AI model's prediction of "Where are ulcers likely to appear after 96 hours?", displayed in a heat map. It is difficult for humans to predict where ulcers will appear 6 hours after decompression on the left, but the AI model trained on images accurately identified the location.

▲The areas in the heat map that are darker red indicate a higher likelihood of developing ulcers, while the areas that are darker blue indicate a lower likelihood of developing ulcers.

 Although only images of "bedsores with ulcers" were used for training the AI, data on hyperemia (a condition in which the skin is red but returns to its original color over time) was also collected to verify whether it would be mistaken for a bedsore. As a result, although there was variation in the accuracy of inference depending on the time point, it was ultimately found that inference accuracy was high for images taken 10 minutes after pressure was released. Unlike ulcers, hyperemia fades when pressure is released, so one could say that a distinctive feature of this is that it becomes easier to infer the longer the time passes.

Summary

The benefit of this project was that we were able to develop a model that can accurately predict the progression of skin conditions that may not be immediately obvious at first glance as ulcers. In addition, by working together with Nagano Prefectural Nursing University on this project, we were able to work on the project with a stronger awareness of social good. I think that the extent to which bedsores are viewed as a problem has not yet been fully realized, but AI can be used to solve these issues and help people, and we are developing various products to that end.

Continued in Part 2