Chest radiograph segmentation system based on Raspberry Pi, local contexts of different position features and different pooling layer feature combinations

By combining the technology of Raspberry Pi and cloud server in the chest X-ray segmentation system, using the context attention module and different pooling layer feature combinations, the problem of insufficient accuracy and computing resource dependence in chest X-ray image segmentation is solved, and efficient Chest X-ray segmentation and resource saving.

CN118628741APending Publication Date: 2024-09-10INNER MONGOLIA MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410750456.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing technology ignores local context information of different position features in chest X-ray image segmentation, resulting in insufficient segmentation accuracy. In addition, deep learning models require a large amount of computing resources and expensive computing equipment, making it difficult to be widely used.

Method used

A chest X-ray segmentation system based on Raspberry Pi and local context of different location features and different pooling layer feature combinations is used to collect and preprocess images through Raspberry Pi, send them to the cloud server for segmentation model processing, and use the contextual attention module Combining features with different pooling layers to improve segmentation accuracy, while deploying a deep learning framework on the Raspberry Pi to alleviate computing resource requirements.

Benefits of technology

The chest X-ray segmentation accuracy is improved, the dependence on computing resources and expensive equipment is reduced, the deep learning segmentation model is run on the Raspberry Pi, and the receptive field and multi-scale context information utilization of the model are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628741A
    Figure CN118628741A
Patent Text Reader

Abstract

The invention discloses a chest radiograph segmentation system based on Raspberry Pi, local contexts of different position features and different pooling layer feature combinations, which is applied to the technical field of embedded medical image segmentation and comprises the Raspberry Pi, an image acquisition module, a display module, a communication module, a storage module and a cloud server. The Raspberry Pi controls an image acquisition module to acquire a chest radiograph image, preprocesses the chest radiograph image, and sends the chest radiograph image to a chest radiograph segmentation model based on local contexts of different position features and different pooling layer feature combinations on a cloud server through a communication module to perform chest radiograph segmentation; the cloud server sends the chest radiography segmentation result to the Raspberry Pi, and the segmentation result is displayed and stored through the display module and the storage module. According to the method, the chest radiograph segmentation precision is further improved, and the dilemma that the current deep learning chest radiograph segmentation technology needs a large number of computing resources and expensive computing equipment is relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded medical image segmentation, and in particular to a chest X-ray segmentation system based on Raspberry Pi, local contexts of different position features, and different pooling layer feature combinations. Background Art

[0002] Chest X-rays are one of the most classic and commonly used medical images. They are used to examine the chest cavity and the various tissues and organs within the cavity. They are of great significance for the diagnosis of related diseases and surgical planning. These images are often difficult to interpret, especially when they are used to diagnose pneumonia. There are many situations, such as heart failure, scars, lumps or nodules, that may confuse the diagnosis. Relying solely on radiologists to manually read the images and make medical diagnoses is a labor-intensive task that relies on subjective experience and is prone to misdiagnosis.

[0003] Medical image segmentation is a key step to extract key information from a specific image and realize medical image visualization. The segmented image is provided to doctors for different tasks such as tissue volume analysis and diagnosis, which can improve the efficiency and accuracy of film reading to a certain extent. Chest X-ray image segmentation requires segmenting specific areas (lungs, heart, clavicle, pneumothorax, ribs, etc.) in medical images from other irrelevant areas.

[0004] With the development of deep learning, the use of convolutional neural networks for automatic segmentation of chest X-ray images has become mainstream. Although convolutional neural networks have a certain accuracy rate for chest X-ray segmentation, there are still the following shortcomings in the convolutional neural network chest X-ray segmentation process: First, in the segmentation prediction process, the local context information of features at different positions is ignored, and the segmentation accuracy still needs to be improved; second, running deep learning models requires a lot of computing resources and expensive computing equipment, which is not conducive to popularization.

[0005] Therefore, how to provide a local context information that fully considers the features at different positions in the segmentation prediction process, further improve the segmentation accuracy, and alleviate the current deep learning chest X-ray segmentation technology that requires a large amount of computing resources and expensive computing equipment, which makes it difficult to implement. A chest X-ray segmentation system based on Raspberry Pi and local context of features at different positions and different pooling layer feature combinations is an urgent problem that technicians in this field need to solve. Summary of the invention

[0006] In view of this, the present invention proposes a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] A chest X-ray segmentation system based on Raspberry Pi, local contexts of different position features, and different pooling layer feature combinations, comprising: Raspberry Pi, image acquisition module, display module, communication module, storage module, and cloud server;

[0009] The Raspberry Pi controls the image acquisition module to acquire chest X-ray images, pre-processes the chest X-ray images, and sends them to the cloud server through the communication module for chest X-ray segmentation based on the local context of different position features and the chest X-ray segmentation model of different pooling layer feature combinations; the cloud server sends the chest X-ray segmentation results to the Raspberry Pi, and displays and stores the segmentation results through the display module and storage module respectively.

[0010] Optionally, the Raspberry Pi is a RaspberryPi5, which includes 4 USB ports, 2 microHDMI ports, 40 GPIO pins, and is configured with a raspbian system.

[0011] Optionally, the chest X-ray image can also be obtained by converting the DICOM data format of the target patient's chest X-ray image in the medical image archiving and communication system PACS into a JPG image format and performing a desensitization process.

[0012] Optionally, preprocessing includes: cropping, scaling, and normalization.

[0013] Optionally, a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations is trained on a cloud server based on a public training set NIHChestX-rays14.

[0014] Optionally, a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations is trained on a cloud server based on a public training set Chest X-rays8.

[0015] Optional, a chest X-ray segmentation model based on local context of different position features and different pooling layer feature combinations, including a backbone network ResNet-50, a context attention module and an upsampling layer;

[0016] The chest X-ray image is input into the backbone network ResNet-50, and the different scale features output by Res-1, Res-2, Res-3, Res-4, and Res-5 are used as the first prediction feature;

[0017] The feature combination output by Res-5 and Res-4 is used as the deep feature, the feature combination output by Res-3 and Res-2 is used as the shallow feature, and the combination of the deep feature and the shallow feature is used as the input feature of the context attention module; the feature sizes from different residual network blocks are unified by deconvolution, so that the input W×H dimensional features have D-dimensional channels, and a new feature map is obtained; the new feature map is pooled in two paths, where the kernel sizes of the two pooling layers are 2×2 and 4×4 respectively, and the small-sized features are upsampled to obtain the same-sized features as the original feature map; the concatenated features of the two features are added to the new feature map to obtain an output feature with a spatial size of W×H×2D as the second prediction feature;

[0018] Based on the first prediction feature and the second prediction feature, chest X-ray segmentation prediction is performed, and the chest X-ray segmentation result is obtained through the upsampling layer.

[0019] Optionally, before performing chest X-ray segmentation prediction, the method further includes: changing the output size of the context attention module.

[0020] Optionally, it also includes building a deep learning framework on the Raspberry Pi, and performing chest X-ray segmentation on the Raspberry Pi using a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations.

[0021] Optionally, it also includes training a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations on a Raspberry Pi based on a public training set, building a deep learning framework on the Raspberry Pi, and performing chest X-ray segmentation on the Raspberry Pi using the chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations.

[0022] It can be seen from the above technical solutions that compared with the prior art, the present invention proposes a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations. By constructing a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations, the context attention module uses the local contexts of different position features to enhance each spatial position of the input feature map, and the combination of different pooling layer features not only expands the receptive field, but also better utilizes multi-scale context information. Based on this, the chest X-ray segmentation accuracy is further improved. By deploying a deep learning framework based on a cloud server and on a Raspberry Pi, based on a Raspberry Pi, using the public data sets NIHChestX-rays14 or ChestX-rays8 for model training and recognition, the deep learning segmentation model is run on a cloud server and a Raspberry Pi, alleviating the current dilemma that deep learning chest X-ray segmentation technology requires a large amount of computing resources and expensive computing equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0024] Figure 1 It is a schematic diagram of the system structure of the present invention.

[0025] Figure 2 It is a schematic diagram of the chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations of the present invention.

[0026] Figure 3 Schematic diagram of the context attention module of the present invention.

[0027] Among them, Raspberry Pi-1, image acquisition module-2, display module-3, communication module-4, storage module-5, cloud server-6, chest X-ray image-7. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Embodiment 1:

[0030] Embodiment 1 of the present invention discloses a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations, such as Figure 1 As shown, it includes: Raspberry Pi 1, image acquisition module 2, display module 3, communication module 4, storage module 5, and cloud server 6.

[0031] The Raspberry Pi 1 controls the image acquisition module 2 to acquire the chest X-ray image 7. The chest X-ray image 7 is preprocessed and sent to the chest X-ray segmentation model based on the local context of different position features and different pooling layer feature combinations on the cloud server 6 through the communication module 4 for chest X-ray segmentation. The cloud server 6 sends the chest X-ray segmentation result to the Raspberry Pi 1, and displays and stores the segmentation result through the display module 3 and the storage module 5 respectively.

[0032] The Raspberry Pi 1 is a Raspberry Pi 5, which includes 4 USB interfaces, 2 micro HDMI interfaces, 40 GPIO pins, and is configured with a raspbian system; wherein the image acquisition module 2 is connected to the USB interface of the Raspberry Pi through a USB cable; and the display module 3 is connected to the micro HDMI interface of the Raspberry Pi through an HDMI interface.

[0033] The image acquisition module 2 is a USB interface camera.

[0034] The display module 3 is an IPS touch screen.

[0035] The communication module 4 is a USB interface wireless network card.

[0036] Storage module 5 is a 32G TF card.

[0037] The chest X-ray image 7 can also be obtained by converting the DICOM data format of the target patient's chest X-ray image in the medical image archiving and communication system PACS into a JPG image format and performing a desensitization process.

[0038] Preprocessing includes: cropping, scaling, and normalization to meet the input requirements of the deep learning model, so as to obtain an image of a preset size, for example: an image of size 512x512. The image size can be set as needed.

[0039] The chest X-ray segmentation model based on the local context of different position features and the combination of different pooling layer features is trained on the cloud server 6 based on the public training set NIHChestX-rays14

[0040] The NIHChestX-rays14 dataset is a chest X-ray dataset released by a clinical center of a health research institute. This dataset collects a total of 112,120 chest X-ray images of more than 30,805 patients, including many patients with advanced lung diseases. This dataset is mainly used for medical image processing tasks such as image reconstruction, image segmentation, feature extraction, and pattern recognition. One of the characteristics of the dataset is that it contains a large number of frontal view X-ray images and provides image labels of 14 categories of diseases mined from relevant radiology reports (each image can have multiple labels). These 14 common chest pathologies include atelectasis, consolidation, infiltration, pneumothorax, edema, emphysema, fibrosis, effusion, pneumonia, pleural thickening, cardiac hypertrophy, and nodules.

[0041] A chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations can also be trained on the cloud server 6 based on the public training set ChestX-rays8.

[0042] ChestX-rays8 is a medical imaging dataset that is primarily used to study and support the application of deep learning algorithms in chest X-ray image classification and disease detection. It contains 108,948 frontal X-ray images of 32,717 unique patients collected from 1992 to 2015. The dataset provides eight common chest disease labels that are mined from relevant radiology reports using natural language processing (NLP) techniques. These diseases include but are not limited to pneumonia, emphysema, and cardiac hypertrophy. Since an X-ray image may be associated with multiple diseases at the same time, ChestX-ray8 is a dataset for multi-classification tasks.

[0043] The chest X-ray segmentation model based on the local context of different position features and different pooling layer feature combinations is implemented based on the public platform TensorFlow, Python version 3.6, such as Figure 2 As shown, it includes the backbone network ResNet-50, the context attention module and the upsampling layer.

[0044] The backbone network is an improved ResNet-50 and is pre-trained on the ImageNet dataset. Specifically, taking the input image of 512×512 pixels as an example, when the input image is 512×512 pixels, the output resolutions of the convolutional blocks are 256×256 (Res-1), 128×128 (Res-2), 64×64 (Res-3), 32×32 (Res-4), and 16×16 (Res-5).

[0045] Since the feature maps at the front are conducive to the detection of small objects, and the feature maps at the back are conducive to the detection of large objects, both are important for medical segmentation, so a contextual attention module is added.

[0046] To adapt to the ResNet architecture, upsampling layers are added.

[0047] The chest X-ray image is input into the backbone network ResNet-50, and the different scale features output by Res-1, Res-2, Res-3, Res-4, and Res-5 are used as the first prediction features.

[0048] like Figure 3As shown in the figure, the feature combination of Res-5 and Res-4 outputs is used as the deep feature, the feature combination of Res-3 and Res-2 outputs is used as the shallow feature, and the combination of deep and shallow features is used as the input feature of the context attention module; the feature sizes from different residual network blocks are unified through deconvolution, so that the input W×H dimensional features have D-dimensional channels to obtain a new feature map; the new feature map is pooled in two paths, where the kernel sizes of the two pooling layers are 2×2 and 4×4 respectively, and the small-sized features are upsampled to obtain the same-sized features as the original feature map; the concatenated features of the two features are added to the new feature map to obtain an output feature with a spatial size of W×H×2D as the second prediction feature; the context attention module uses the local context of features at different positions to enhance each spatial position of the input feature map, and the combination of features from different pooling layers not only expands the receptive field, but also makes better use of multi-scale context information, based on which the chest X-ray segmentation accuracy is further improved.

[0049] Based on the first prediction feature and the second prediction feature, chest X-ray segmentation prediction is performed, and the chest X-ray segmentation result is obtained through the upsampling layer.

[0050] In order to accurately predict small targets, before performing chest X-ray segmentation prediction, it also includes: changing the output size of the context attention module, for example: when the input image is 512×512 pixels, changing the output of the context attention module to 16×16 pixels.

[0051] It also includes building a deep learning framework on Raspberry Pi 1, and performing chest X-ray segmentation based on the local context of different position features and chest X-ray segmentation models of different pooling layer feature combinations on Raspberry Pi 1, specifically:

[0052] The public dataset NIH Chest X-rays14 or ChestX-rays8 is trained on the cloud server 6 using a deep learning algorithm to obtain a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations.

[0053] Deploy a deep learning framework such as TensorFlowLite or PyTorchMobile on the Raspberry Pi 1 to run the trained model; because the computing resources and memory of the Raspberry Pi 1 are limited, considering the complexity and size of the model, the model can be compressed, such as: knowledge distillation, lightweight model architecture (replace the backbone network Resnet50 with SqueezeNet, MobileNets, etc.), pruning, quantization; for TensorFlow, use the TensorFlowLite converter to convert the model to TFLite format.

[0054] Raspberry Pi 1 controls the image acquisition module 2 to acquire the chest X-ray image 7 (it can also be obtained by converting the DICOM data format of the target patient's chest X-ray image in the medical image archiving and communication system PACS into the JPG image format and performing desensitization processing), and pre-processes the chest X-ray image 7. A chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations is input on Raspberry Pi 1 to perform chest X-ray segmentation prediction, and the segmentation results are displayed and stored through the display module 3 and the storage module 5 respectively, and fed back to the cloud server 6 through the communication module 4.

[0055] It also includes training a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations based on a public training set on Raspberry Pi 1, building a deep learning framework on Raspberry Pi 1, and performing chest X-ray segmentation of the chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations on Raspberry Pi 1, specifically:

[0056] Deploy deep learning frameworks such as TensorFlowLite or PyTorchMobile on the Raspberry Pi 1.

[0057] Use deep learning algorithms to train the public datasets NIHChestX-rays14 or ChestX-rays8 on Raspberry Pi 1 to obtain a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations; MobileNet, MobileNetV2withSSD, YOLO, TinyYOLO, etc. can be used as the backbone network of the deep learning algorithm.

[0058] Raspberry Pi 1 controls the image acquisition module 2 to acquire the chest X-ray image 7 (it can also be obtained by converting the DICOM data format of the target patient's chest X-ray image in the medical image archiving and communication system PACS into the JPG image format and performing desensitization processing), and pre-processes the chest X-ray image 7. A chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations is input on Raspberry Pi 1 to perform chest X-ray segmentation prediction, and the segmentation results are displayed and stored through the display module 3 and the storage module 5 respectively, and fed back to the cloud server 6 through the communication module 4.

[0059] The embodiment of the present invention discloses a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations. By constructing a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations, the context attention module uses the local contexts of different position features to enhance each spatial position of the input feature map, and the combination of different pooling layer features is used to not only expand the receptive field, but also better utilize the multi-scale context information, based on which the chest X-ray segmentation accuracy is further improved. By deploying a deep learning framework based on a cloud server and on a Raspberry Pi, based on a Raspberry Pi, using a public data set NIH Chest X-rays14 or Chest X-rays8 for model training and recognition, the deep learning segmentation model is implemented on a cloud server and a Raspberry Pi, which alleviates the dilemma that the current deep learning chest X-ray segmentation technology requires a large amount of computing resources and expensive computing equipment.

[0060] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0061] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A chest X-ray segmentation system based on Raspberry Pi and local context of different position features and different pooling layer feature combinations, characterized in that: include: Raspberry Pi (1), image acquisition module (2), display module (3), communication module (4), storage module (5), cloud server (6); The Raspberry Pi (1) controls the image acquisition module to acquire chest X-ray images (7), pre-processes the chest X-ray images (7), and sends them to the cloud server (6) through the communication module (4) for chest X-ray segmentation based on the local context of different position features and the chest X-ray segmentation model of different pooling layer feature combinations; the cloud server (6) sends the chest X-ray segmentation results to the Raspberry Pi (1), and displays and stores the segmentation results through the display module (3) and the storage module (5), respectively.

2. According to claim 1, a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations, characterized in that: The Raspberry Pi (1) is a Raspberry Pi 5, comprising 4 USB interfaces, 2 micro HDMI interfaces, 40 GPIO pins, and configured with a Raspbian system.

3. According to claim 1, a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations, characterized in that: The chest X-ray image (7) can also be obtained by converting the DICOM data format of the target patient's chest X-ray image in the medical image archiving and communication system PACS into a JPG image format and performing a desensitization process.

4. According to claim 1, a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations, characterized in that: The preprocessing includes: cropping, scaling and normalization.

5. According to claim 1, a chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations, characterized in that: The chest X-ray segmentation model based on the local context of different position features and the combination of different pooling layer features is trained on the cloud server (6) based on the public training set NIH Chest X-rays14.

6. A chest X-ray segmentation system based on Raspberry Pi and local contexts of different position features and different pooling layer feature combinations according to claim 1, characterized in that: The chest X-ray segmentation model based on the local context of different position features and the combination of different pooling layer features is trained on the cloud server (6) based on the public training set Chest X-rays8.

7. The chest X-ray segmentation system based on Raspberry Pi and deep learning according to claim 1, characterized in that: The chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations includes a backbone network ResNet-50, a context attention module and an upsampling layer; The chest X-ray image is input into the backbone network ResNet-50, and the different scale features output by Res-1, Res-2, Res-3, Res-4, and Res-5 are used as the first prediction features; The feature combination output by the Res-5 and the Res-4 is used as a deep feature, the feature combination output by the Res-3 and the Res-2 is used as a shallow feature, and the combination of the deep feature and the shallow feature is used as an input feature of the context attention module; Unifying the feature sizes from different residual network blocks through deconvolution, so that the input W×H dimensional features have D-dimensional channels, and obtaining a new feature map; pooling the new feature map in two paths, wherein the kernel sizes of the two pooling layers are 2×2 and 4×4 respectively, and upsampling the small-sized features to obtain the same-sized features as the original feature map; adding the connection features of the two features to the new feature map to obtain an output feature with a spatial size of W×H×2D as the second prediction feature; Based on the first prediction feature and the second prediction feature, a chest X-ray segmentation prediction is performed, and the chest X-ray segmentation result is obtained through the upsampling layer.

8. The chest X-ray segmentation system based on Raspberry Pi and deep learning according to claim 7, characterized in that: Before performing chest X-ray segmentation prediction, the method further includes: changing the output size of the context attention module.

9. The chest X-ray segmentation system based on Raspberry Pi and deep learning according to claim 1, characterized in that: The method also includes building a deep learning framework on the Raspberry Pi (1), and performing chest X-ray segmentation on the Raspberry Pi (1) using a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations.

10. The chest X-ray segmentation system based on Raspberry Pi and deep learning according to claim 1, characterized in that: The method further includes training a chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations on the Raspberry Pi (1) based on a public training set, building a deep learning framework on the Raspberry Pi (1), and performing chest X-ray segmentation on the chest X-ray segmentation model based on local contexts of different position features and different pooling layer feature combinations on the Raspberry Pi (1).