A device for primary diagnosis of the nature of lung lesions using X-ray images
The device addresses the lack of precise masking, lesion detection, and visualization in existing systems by integrating a mask application and lesion classification unit, using U-Net and ResNet34 models, achieving accurate and rapid lung lesion diagnosis.
Patent Information
- Authority / Receiving Office
- RU · RU
- Patent Type
- Utility models
- Current Assignee / Owner
- САМОХВАЛОВ ДМИТРИЙ АЛЕКСАНДРОВИЧ
- Filing Date
- 2025-12-05
- Publication Date
- 2026-07-01
AI Technical Summary
Existing devices for diagnosing lung lesions from X-ray images lack a masking unit for precise image masking, a separate lesion detection unit, and a visualization unit, leading to reduced accuracy and automation in the diagnosis process.
A device integrating a mask application unit, lesion detection unit, and visualization unit, utilizing a U-Net segmentation model for lung contour extraction and a ResNet34 classification model, with data augmentation and training on labeled datasets, to automate the analysis and improve accuracy.
The device achieves highly accurate and rapid diagnosis of lung pathologies with automated lesion localization and classification, minimizing medical errors and enhancing user convenience.
Smart Images

Figure 00000001_ABST
Abstract
Description
[0001] The utility model relates to the field of image processing, more specifically to supporting medical decision-making based on the analysis of medical images.
[0002] During the global COVID-19 pandemic, the world has faced enormous medical challenges, including difficulties in diagnosing the disease. The spread of the virus has created a need for rapid and effective methods of detecting infection to ensure timely and accurate intervention. The epidemic has affected millions of people worldwide, resulting in thousands of casualties. Most COVID-19 deaths are associated with severe forms of the disease. Effective treatment of severe cases remains a challenge due to the lack of early diagnosis. One of the most accessible and popular methods for diagnosing COVID-19 is chest X-ray. However, despite its widespread use, it remains difficult to distinguish patients with COVID-19 from those with viral or bacterial pneumonia.Difficulties arise due to the similarity of visual manifestations on X-ray images for various diseases, especially in the early stages. This similarity creates challenges for doctors and complicates the process of accurate diagnosis. One solution to this problem may be the use of devices for diagnosing lung diseases based on X-ray analysis using machine learning methods, including image segmentation and classification.
[0003] A device is known that uses a machine learning model to detect lung damage, in particular COVID-19, based on chest X-rays (US 11087883 B1, published 10.08.2021 [1]). The device includes an image acquisition unit, a preprocessing unit (contrast normalization), a segmentation unit that divides X-ray images into non-overlapping parts to focus on lung areas, and a convolutional neural network (CNN)-based model for classifying images for the presence or absence of COVID-19. The model is trained using a transfer-to-transfer learning approach for working with imbalanced data, where the data is divided into mini-corpora for sequential training.
[0004] The disadvantage of the known device is the lack of a block for applying a mask to the original image and a separate block for isolating lesions, which limits the accuracy of localization and visualization of the results, as well as the lack of a visualization block for displaying segmented areas and classification to the user.
[0005] A device for image identification and localization using a three-point loss function and predicted regions is known (US 11449717 B2, published 09.20.2022 [2]). The device is designed to analyze medical images, including chest X-rays, and comprises an image acquisition unit, a spatial transformer for orientation normalization, a feature extraction unit using a neural network (e.g., DenseNet), a classification unit for multi-label classification of diseases (e.g., pneumonia, cardiomegaly), and a localization unit for identifying regions with disease features without explicitly applying a bounding box. Segmentation is achieved through heatmap generation and applying a bounding box to focus on lung lesions. Training uses a three-point loss function to separate features of similar and dissimilar images.
[0006] A disadvantage of the known device is the lack of a masking unit on the original image for accurately applying the segmentation results, a separate lesion extraction unit, and a visualization unit for displaying the analysis results to the user, which reduces the convenience and accuracy of diagnosis. A device for diagnosing medical images using machine learning is known (US 20220012875 A1, published 01 / 13 / 2022 [3]). The device includes a multimedia content acquisition unit (including X-ray videos and images), a frame identification unit for target assignments, a segmentation unit for extracting regions of interest (e.g., lung structures), a measurement unit for calculating metrics (e.g., lesion sizes), and a composite classification unit for aggregating the results into a final diagnosis (normal / abnormal). CNN and RNN-based models are used for segmentation and classification, taking into account missing species.Although the device is based on the use of ultrasound, the device is applicable to X-ray images for the diagnosis of lung lesions.
[0007] The disadvantage of the analog is the lack of a block for applying a mask to the original image, a separate block for highlighting lesions after masking, and a visualization block for displaying segmented areas and classification, which limits the integration of analysis stages and visualization for the user.
[0008] A device for identifying possible lung lesions is known (US 11361443 B2, published 06 / 14 / 2022 [4]). The device includes a cross-sectional chest image acquisition unit, a segmentation unit for dividing the image into segments for subsequent classification (the first segment is a possible lesion, the second is other lesions), a unit for dividing the images into regions from the center to the periphery in n ways for analysis (n≥2), a lesion data calculation unit (e.g. area ratio), and an identification unit based on a second machine learning model (e.g. SVM-Support Vector Machine) for outputting the result (lesion probability, e.g. IPF). The first model (deep learning, CNN) is trained for segmentation, the second for classification.
[0009] The disadvantage of the analogue is the lack of a block for applying a mask to the original image, a separate block for highlighting lesions and a visualization block for displaying the results, as well as a focus on regional division without masking, which reduces the accuracy of primary diagnosis.
[0010] The closest technical essence to the claimed utility model is a device using a machine learning model to detect lung damage, in particular COVID-19, based on chest X-rays (US 11087883 B1, published 08 / 10 / 2021 [1]), which includes image acquisition, pre-processing, segmentation into non-overlapping parts, and classification using a CNN (Convolutional Neural Network) to determine the presence of damage. The disadvantage of the prototype is the lack of a block for applying a mask to the original image to apply the segmentation results, a separate block for highlighting lesions after masking, as well as a visualization block for displaying segmented areas and classifying them, which does not allow for full integration of the analysis stages and user convenience.
[0011] The utility model is aimed at improving the accuracy of lung disease diagnosis.
[0012] The technical result is achieved in that the device for the primary diagnosis of the nature of lung lesions using X-ray images comprises a control unit 1, configured to coordinate the operation of all components of the system, an image loading unit 2 connected to the control unit, intended to obtain an initial medical image, a segmentation unit 3, the input of which is connected to the image loading unit and is configured to isolate areas of interest in the image using a segmentation model 8 attached to it, a mask overlay unit 4, connected to the segmentation unit and intended to apply the obtained mask to the initial image, the output of which is connected to the input of unit 5, configured to determine the type or degree of damage to the detected foci, the output of which is connected to the input of classification unit 6 with a classification model 9 attached to it, and a visualization unit 7,connected to the classification unit and designed to display the results of the analysis - including segmented areas and their classification - to the user.
[0013] The specified result is also achieved by the fact that the segmentation model is implemented in the form of a sequentially connected data storage unit 10 used for training the model, a training unit 11, and a unit 12 for issuing the finished file.
[0014] The specified result is also achieved by the fact that the classification model is implemented in the form of a sequentially connected data storage unit 13 used for training the model, an augmentation unit 14, a segmentation unit 15 with a segmentation model unit 8 attached to it, a mask application unit 16, a training unit 17, and a unit 18 for issuing the finished file.
[0015] Distinctive features of the utility model are the addition of a device for the primary diagnosis of the nature of lung lesions using X-ray images with a mask application unit, a lesion detection unit, a lesion classification unit with a classification model and a visualization unit, as well as the connection of all of the listed units to each other.
[0016] Thus, the technical problem, the solution of which is ensured by the implementation of the utility model and which could not be solved by the implementation of known analogues of the utility model, consists in the creation of a device that provides automated primary diagnostics of the nature of lung lesions from X-ray images with increased accuracy due to the sequential use of segmentation, masking, detection of foci and classification, with visualization of the results.Known obstacles to solving this technical problem in utility model analogues include the lack of integration of a masking unit for precise masking of the original image based on segmentation, a separate lesion detection unit for determining the type or extent of the lesion, and a visualization unit, which leads to a decrease in the accuracy of lesion localization, a lack of full automation of the process, and limited opportunities for expanding the arsenal of technical means for the primary diagnosis of lung lesions.
[0017] Thus, the device is a comprehensive hardware and software system that automates the process of analyzing X-ray images, ensuring highly accurate and rapid diagnosis of lung pathologies.
[0018] The essence of the utility model is explained by graphic materials and an implementation example.
[0019] Fig. 1 shows the structural diagram of the device as a whole;
[0020] Fig. 2 shows the structural diagram of the segmentation model used in the device;
[0021] Fig. 3 shows the structural diagram of the classification model used in the device;
[0022] Fig. 4 shows an illustration of the use of lung masks;
[0023] Fig. 5 shows an illustration of the operation of augmentation on lung images.
[0024] A device for the primary diagnosis of lung lesions using X-ray images comprises a control unit 1, capable of coordinating the operation of all system components. A personal computer equipped with appropriate software may serve as the control unit. Connected to the control unit is an image acquisition unit 2, designed to receive and initially process the original X-ray image uploaded by the user. In certain embodiments, the image acquisition unit may be a network card or similar data receiving device. In another embodiment, the image acquisition unit may be an X-ray machine, directly connected to the computer in a suitable manner. The output of the image acquisition unit is connected to the input of a segmentation unit 3, which extracts regions of interest—the lung contours—from the original image.Mask overlay unit 4, connected to segmentation unit, is designed to apply the obtained mask to the original image. As a result, a new image is created containing only the lung area cleared of the background (see Fig. 4). This allows further analysis to be focused on the relevant information. The output of unit 4 is connected to the input of lesion determination unit 5, configured to determine the type or degree of lesion of the detected lesions. The output of unit 5 is connected to the input of classification unit 6, which determines the type of pathology. The output of unit 6 is connected to the input of visualization unit 7, which is designed to display the analysis results - including segmented areas and their classification - to the user. Segmentation model 8 is connected to segmentation unit 3, and classification model 9 is connected to lesion classification unit 6. Segmentation model 10 (Fig.2) contains a dataset of model 10, which provides a set of labeled images (X-ray images with corresponding lung masks). Based on this dataset, the segmentation model training block 11 interactively trains the U-Net model using the Dice Loss function for optimization, with the Accuracy, IoU, and Dice metrics at the level of ~99%. After training, the block 12 for outputting the finished model file saves the trained model weights for use in the main segmentation block 3. The classification model 9 contains a dataset of classification model 13, which contains X-ray images labeled into three classes: healthy, pneumonia, and COVID-19. The augmentation block 14 artificially increases the diversity of the training set (rotations, reflections) to improve the robustness of the model (Fig. 5 illustrates the results of augmentation on lung images).Segmentation block 15 and masking block 16 preprocess images from the dataset, extracting the lung region, as is done in the device's operating mode. This allows the classification model to be trained on the most relevant data. Segmentation model 8 is connected to segmentation block 15. Classification model training block 17 trains the ResNet34 model based on the prepared data. The trained model is saved by model output block 18 for further use in classification block 6.
[0025] All the listed blocks can be separate microprocessors equipped with the corresponding software or separate parts of the general program.
[0026] The device is used as follows.
[0027] The process begins with Image Loading Block 2, which receives a raw chest X-ray image (e.g., in PNG or JPEG format). The image can be loaded from an external source, such as a medical database or a file selected by the user through the application interface. Control Block 1 coordinates this step, ensuring the data is passed to subsequent blocks. Pre-processing can occur at this step, such as pixel normalization (bringing values to the [0; 1] range taking into account the mean and standard deviation calculated for the dataset, e.g., mean≈0.169 and std≈0.283 for images). The image is then passed to Segmentation Block 3, which is connected to Segmentation Model 8. The model is based on the U-Net architecture, which effectively extracts lung contours by using residual connections to preserve spatial information, creating an accurate mask that highlights the lung tissue.The model is trained on a dataset containing X-ray images and corresponding lung masks. The process includes data augmentation (to increase sample diversity), training, and subsequent model evaluation. As a result, a binary lung mask is formed at the output of block 3. Masking block 4 applies the resulting mask to the original image, cropping out lung regions and centering them for further analysis. This improves focus on relevant areas while eliminating background noise.
[0028] The processed image is fed to lesion extraction block 5, which determines the type or extent of lesions in the identified areas. Visual features such as shadowing, tissue density, and lesion distribution (e.g., bilateral for COVID-19 or segmental for pneumonia) are analyzed here. For COVID-19, lesion areas are additionally segmented (using a separate model for infection masks), highlighting them, and calculating the lesion percentage. The results are fed to classification block 6, which is connected to classification model 9. The model is based on ResNet34 with residual blocks for efficient feature extraction, preventing gradient decay, and processing deep networks. It is trained on a dataset that includes labeled images (healthy, with pneumonia, with COVID-19). The training process also includes augmentation.A key feature is that this model is trained on data preprocessed by segmentation and masking blocks, allowing the network to focus on the most informative regions (see Fig. 6). The classification model demonstrates an accuracy of approximately 95% and an F1-score of 97.4% on test data, outperforming some existing models. Visualization block 7 displays the results to the user.
[0029] The device minimizes medical errors, achieving accuracy higher than comparable systems (95% vs. 91-94% in existing systems). It is resistant to overfitting, stable (no spikes in the loss function values), and explainable (highlighting zones to enhance physician confidence).
[0030] Suitable for primary diagnosis in pandemic conditions, integrated into medical institutions to speed up analysis (hundreds of images per day).
[0031] Thus, the device is a comprehensive hardware and software system that automates the process of analyzing X-ray images, ensuring highly accurate and rapid diagnosis of lung pathologies.
Claims
1. A device for the primary diagnosis of the nature of lung lesions using X-ray images, comprising a control unit, an image loading unit designed to obtain an initial medical image, a segmentation unit and a segmentation model, characterized in that it is supplemented by a mask application unit, a lesion isolation unit, a lesion classification unit with a classification model and a visualization unit, wherein the control unit is configured to coordinate the operation of all components of the system, is connected to an image loading unit designed to obtain an initial medical image, the output of which is connected to the input of a segmentation unit configured to isolate areas of interest in the image using a segmentation model attached thereto, the output of the segmentation unit is connected to a mask application unit, the output of which is connected to the input of the lesion isolation unit,the output of which is connected to the input of the lesion classification block with a classification model attached to it and a visualization block designed to display the analysis results - including segmented areas and their classification - to the user.
2. The device according to paragraph 1, characterized in that the segmentation model is made in the form of a sequentially connected data storage unit used for training the model / augmentation unit, a training unit, and a unit for issuing the finished file.
3. The device according to paragraph 1, characterized in that the classification model is made in the form of a sequentially connected data storage unit used for training the model, an augmentation unit, a segmentation unit with a segmentation model unit attached to it, a mask application unit, a training unit, and a unit for issuing the finished file.