Deep learning-based chest X-ray film quality control method
Through the YOLOv3 and Segvol medical image segmentation model combined with the Inception-V4 network, intelligent quality control of chest X-rays is achieved, solving the problem of insufficient artificial dependence and multi-dimensional feature fusion in traditional methods, and improving the accuracy and efficiency of diagnosis.
Patent Information
- Application Number
- CN202510417416.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-25
AI Technical Summary
Traditional chest X-ray quality control relies on manual experience, lacks intelligent evaluation methods, and it is difficult to achieve accurate quantification and multi-dimensional feature fusion, which cannot meet the clinical comprehensive evaluation needs of high-quality chest radiographs.
The scapula area is automatically extracted by YOLOv3 model, combined with the Segvol medical image segmentation model for precise segmentation, the type and position of foreign objects are judged by the Inception-V4 network, and the clavicle angle and position offset are calculated in combination with traditional algorithms to determine the shrugging and position abnormalities.
It improves the automation of chest X-ray quality control, reduces the workload of manual review, and improves the accuracy and efficiency of imaging diagnosis.
Smart Images

Figure CN120374523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and specifically, to a method for quality control of chest X-ray films based on deep learning. Background Art
[0002] Digital chest X-ray imaging is one of the conventional imaging methods for disease diagnosis and plays an important role in disease diagnosis. It has won clinical favor due to advantages such as low equipment cost, fast examination speed, high image resolution, and low radiation dose. However, there are many factors affecting image quality during the chest X-ray imaging process, such as in-vivo and in-vitro foreign objects, positioning postures, respiratory states, exposure, irradiation fields, central lines, resolution, etc. Among them, the human positioning posture is an important factor affecting the imaging quality of chest X-ray films.
[0003] Among them, the traditional quality control process of chest X-ray films highly depends on manual experience judgment and lacks intelligent evaluation means, resulting in low detection efficiency, strong subjectivity, and insufficient consistency. Especially for complex quality elements such as the positioning posture of chest X-ray films (such as the abduction degree of the scapula, the offset of the body position, etc.), it is difficult to achieve precise quantification by manual interpretation and is easily affected by the operator's experience level. Secondly, existing research mostly uses a single network to process specific quality defects and lacks a multi-dimensional feature fusion mechanism, and cannot simultaneously perform collaborative analysis on multiple factors such as body position offset and respiratory artifacts, making it difficult to meet the comprehensive evaluation requirements of clinical high-quality chest X-ray films. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for quality control of chest X-ray films based on deep learning to solve the problems raised in the above background art.
[0005] To achieve the above purpose, the present invention provides the following technical solution: A method for quality control of chest X-ray films based on deep learning, comprising the following steps:
[0006] Step S1: Obtain a chest X-ray film dataset containing excellent films and abnormal conditions, where the abnormal conditions include at least one of in-vitro foreign objects, in-vivo foreign objects, collarbone submission for inspection, incorrect body position, scapula protruding outside the ribs, and incorrect scapula positioning.
[0007] Step S2: Perform standardization processing on the chest X-ray films, including uniformly scaling to a size of 416×416 pixels using cubic interpolation with a 4×4 pixel neighborhood, and performing mean subtraction and standard deviation division on the scaled image to obtain a standardized image.
[0008] Step S3: Manually annotate the left and right lung fields, left and right collarbone regions, and left and right scapula regions in the standardized image through an annotation tool to generate an annotated image.
[0009] Step S4: Automatically extract the left and right scapula image areas in the labeled image, output the probability of whether the scapula protrudes outside the rib, and determine whether the scapula protrudes outside the rib;
[0010] Step S5: If an image where the scapula does not protrude outside the rib is obtained, use an image segmentation model to train the six labeled areas of the labeled image, and debug the optimal model that conforms to each part;
[0011] Step S6: Judge the foreign object type and foreign object position according to the classification model for the segmented left and right lung field image areas and other part areas;
[0012] Step S7: Use a traditional algorithm to detect the segmented left and right clavicle areas and left and right scapula areas to judge whether shrugging shoulders occurs and whether the body position is offset.
[0013] Preferably, in step S4, the YOLOv3 model is used for automatic extraction of the scapula area.
[0014] Preferably, in step S5, the Segvol medical image segmentation model is used to segment six areas including the left and right lung fields, left and right clavicles, and left and right scapulas.
[0015] Preferably, in step S6, the Inception-V4 network is used to judge the foreign object type and foreign object position of the chest radiograph.
[0016] Preferably, in step S7, obtain the coordinate values of the left and right clavicle areas, calculate the angle between the two clavicles and the horizontal line, set the shrugging shoulder threshold at 30°, and if the clavicle angle is greater than this threshold, it can be defined as shrugging shoulders.
[0017] Preferably, in step S7, by calculating the average value a of the maximum abscissa of the left clavicle and the minimum abscissa of the right clavicle, and comparing it with the overall horizontal center point b of the taken image, judge whether there is a body position offset in the chest X-ray film.
[0018] Preferably, in step S7, according to the left and right lung field areas and left and right scapula areas segmented in step S5, calculate the coincidence rate between the scapula and the lung field, and define no coincidence, mild coincidence, and severe coincidence according to the coincidence rate.
[0019] Preferably, in step S5, the image segmentation model uses the Segvol image segmentation model to train the six labeled areas.
[0020] Preferably, in step S7, the specific calculation formula for the body position offset is
[0021] Among them, Lmax represents the maximum abscissa value of the left clavicle region, Rmin represents the minimum abscissa value of the right clavicle region, W is the total horizontal pixel width of the standardized chest X-ray film. When
[0022] |a - b| > T is determined as a body position deviation, and T is a preset horizontal deviation threshold.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: By using YOLOv3 to automatically extract the scapula region, it is convenient to judge whether the scapula protrudes outside the rib cage. Combining with the Segvol medical image segmentation model, key regions such as the lung field, clavicle, and scapula are accurately segmented, providing a reliable basis for subsequent foreign object detection and body position evaluation. In addition, the Inception-V4 network is used to accurately judge the type and position of foreign objects, and traditional algorithms are combined to calculate the clavicle angle and body position deviation, realizing the determination of shrugging shoulders and abnormal body positions, thereby improving the degree of automation of chest X-ray film quality control, reducing the workload of manual review, and enhancing the accuracy and efficiency of image diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic flowchart of the method for quality control of chest X-ray films based on deep learning according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0026] Please refer to Figure 1 , the embodiment of the present invention provides a method for quality control of chest X-ray films based on deep learning, including the following steps:
[0027] Step S1: Obtain a dataset of chest X-ray films including high-quality films and abnormal conditions, where the abnormal conditions include at least one of foreign objects outside the body, foreign objects inside the body, clavicle for examination, incorrect body position, scapula protruding outside the rib cage, and incorrect scapula position;
[0028] Step S2: Standardize the chest X-ray film, including uniformly scaling it to a size of 416×416 pixels using the cubic interpolation method with a 4×4 pixel neighborhood, and performing mean subtraction and standard deviation division on the scaled image to obtain a standardized image;
[0029] Step S3: Manually annotate the left and right lung fields, left and right clavicle regions, and left and right scapula regions in the standardized image using an annotation tool to generate an annotated image;
[0030] Step S4: Automatically extract the left and right scapula image areas in the annotated image, output the probability of whether the scapula protrudes outside the rib, and determine whether the scapula protrudes outside the rib;
[0031] Step S6: Use the image segmentation model to train the six annotated regions of the annotated image, and debug the optimal model that conforms to each part;
[0032] Step S6: Judge the foreign object type and foreign object position according to the classification model for the segmented left and right lung field image regions and other part regions;
[0033] Step S7: Use traditional algorithms to detect the segmented left and right clavicle regions and left and right scapula regions to judge whether shrugging shoulders occurs and whether the body position is shifted.
[0034] In step S4, the YOLOv3 model is selected for automatic extraction of the scapula region. The YOLOv3 detection network automatically extracts the scapula region in the chest X-ray film. The processing process of the detection network is divided into the first stage and the second stage;
[0035] The first stage is to freeze the first 249 layers of the neural network except the last three layers, train the last three layers of the neural network to obtain a relatively stable loss function. The Adam optimizer is used during the neural network training process. The initial learning rate is set to 0.001, the minimum batch size is set to 32, and the epochs are set to 50. The model maintained in the first stage is the model with the smallest validation loss during the training process.
[0036] In the second stage, the model is fine-tuned as a whole. The initial learning rate is set to 0.0001, the minimum batch size is set to 8, and the epochs are set to 300. When the validation loss does not improve after 3 epochs, the learning rate is changed to 1 / 10 of the current learning rate. When the validation loss does not improve after 10 epochs, the training of the network is terminated.
[0037] In another embodiment, in step S4, a classification network based on a residual network is also built, using two different types of residual blocks (linear convolution block and linear non-convolution block). The input is the minimum bounding box area of the left and right scapula patches detected by the detection network, which is interpolated into a patch of the same matrix size of 384×224 based on the 3rd order interpolation method of 4×4 pixel neighborhood. The network consists of 1 max pooling layer, 1 average pooling layer, 1 fully connected layer, and 36 convolutional layers. The final output is the probability of whether the scapula protrudes outside the rib. The network weights are optimized by selecting the Adam optimizer. The initial learning rate is set to 0.001, the minimum batch size is set to 32, and the number of epochs is set to 300. Whenever the validation loss has not improved after 3 epochs, the learning rate becomes 1 / 10 of the current value. When the validation loss optimization is less than 0.0001 after 20 epochs, the training of the network is terminated early.
[0038] Preferably, in step S5, the Segvol medical image segmentation model is selected to segment six regions including the left and right lung fields, the left and right clavicles, and the left and right scapulas, and the six regions are subjected to model training. Among them, the SegVol medical image segmentation model includes an image encoder, a text encoder, a prompt encoder, and a mask decoder. The SegVol model supports three types of interactive segmentation prompts, including "box" prompts, "point" prompts, and "text prompts". Among them, the text prompt can be a description of a medical anatomical structure such as "left clavicle" or "right lung field". The specific implementation method is as follows:
[0039] Segvol uses ViT as the image encoder to extract features from the input medical image and generate image embeddings. Segvol uses the CLIP model as the text encoder to encode the input text prompt and generate corresponding text embeddings. In the spatial prompt encoder of Segvol, according to the SAM framework, the "point" prompt and "box" prompt are encoded to obtain point embeddings and box embeddings respectively. Subsequently, the three types of prompt embeddings of point prompt, box prompt, and text prompt are concatenated to form a prompt embedding. The image embedding obtained by the image encoder, the prompt embedding obtained by the prompt encoder, and the text embedding obtained by the text encoder are input into the mask decoder to predict the final medical image segmentation mask. During the model training process, the binary cross-entropy loss and the Dice loss are combined and used as the loss function to optimize the model parameters and improve the accuracy of medical image segmentation.
[0040] In step S6, the Inception-V4 network is selected to judge the foreign body type and foreign body position of the chest radiograph. The Inception-V4 network can specifically judge inevitable in-vivo foreign bodies such as cardiac pacemakers, thoracic rib fixation clips, and spinal fixation clips, effectively preventing misdiagnosis caused by such foreign bodies.
[0041] In step S7, the coordinate values of the left and right clavicle regions are obtained, and the angles between the two clavicles and the horizontal line are calculated. The shrugging threshold is set at 30°. If the clavicle angle is greater than this threshold, it can be defined as shrugging.
[0042] Furthermore, in step S7, the overlap rate between the scapula and the lung field is obtained by calculation based on the left and right lung field regions and the left and right scapula regions segmented and obtained in step S5. Among them, by using the formula to calculate the overlap rate between the scapula and the lung field, a represents the overlap rate, S c represents the area of the overlapping region, and S j represents the area of the scapula region. is defined as no overlap, is defined as mild overlap, is defined as severe overlap.
[0043] Specifically, in step S7, the circumscribed matrix box of the clavicle region is obtained, the maximum and minimum horizontal and vertical coordinate values of each region are obtained, and the average value a of the maximum horizontal coordinate of the left clavicle and the minimum horizontal coordinate of the right clavicle is calculated and compared with the overall horizontal center point b of the captured image.
[0044] The specific calculation formula for body position deviation is where Lmax represents the maximum horizontal coordinate value of the left clavicle region, Rmin represents the minimum horizontal coordinate value of the right clavicle region, and W is the total horizontal pixel width of the standardized chest X-ray film. When |a - b| > T, it is determined that there is a body position deviation. T is the preset horizontal deviation threshold. For example, T is 150 pixel points. When the absolute value of the difference |a - b| is less than 150 pixel points, the body position is normal. If it exceeds 150 pixel points, the body position has a deviation.
[0045] In summary: By using YOLOv3 to automatically extract the scapula region, it is convenient to judge whether the scapula protrudes outside the ribs. Combining with the Segvol medical image segmentation model, key regions such as the lung field, clavicle, and scapula are accurately segmented, providing a reliable basis for subsequent foreign object detection and body position evaluation. In addition, the Inception-V4 network is used to accurately judge the type and position of foreign objects, and traditional algorithms are combined to calculate the clavicle angle and body position deviation, realizing the determination of shrugging and abnormal body position, thereby improving the automation degree of chest X-ray film quality control, reducing the workload of manual review, and enhancing the accuracy and efficiency of image diagnosis.
[0046] Parts not involved in the present invention are the same as or can be implemented by using the prior art. Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art will understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A quality control method for chest X-ray films based on deep learning, characterized in that, It includes the following steps: Step S1: Obtain a dataset of chest X-ray films including high-quality films and abnormal conditions, where the abnormal conditions include at least one of foreign objects outside the body, foreign objects inside the body, clavicle submission for inspection, incorrect body position, scapula protruding outside the ribs, and incorrect scapula positioning; Step S2: Perform standardization processing on the chest X-ray films, including uniformly scaling them to a size of 416×416 pixels using cubic interpolation with a 4×4 pixel neighborhood, and performing mean subtraction and standard deviation division on the scaled image to obtain a standardized image; Step S3: Manually annotate the left and right lung fields, left and right clavicle regions, and left and right scapula regions in the standardized image through an annotation tool to generate an annotated image; Step S4: Automatically extract the left and right scapula image regions in the annotated image, output the probability of whether the scapula protrudes outside the ribs, and determine whether the scapula protrudes outside the ribs; Step S5: If an image where the scapula does not protrude outside the ribs is obtained, use an image segmentation model to train the six annotated regions in the annotated image, and debug the optimal model that conforms to each part; Step S6: Judge the foreign object type and foreign object position for the segmented left and right lung field image regions and other part regions according to a classification model; Step S7: Use a traditional algorithm to detect the segmented left and right clavicle regions and left and right scapula regions to judge whether there is shoulder shrugging and whether the body position is shifted.
2. The method for quality control of chest X-ray films based on deep learning according to claim 1, wherein: In step S4, the YOLOv3 model is selected for automatic extraction of the scapula region.
3. A method for quality control of chest X-ray films based on deep learning according to claim 1, characterized in that: In step S5, the Segvol medical image segmentation model is selected to segment the six regions of the left and right lung fields, left and right clavicles, and left and right scapulas.
4. The method for quality control of chest X-ray films based on deep learning according to claim 1, characterized in that: In step S6, the Inception-V4 network is selected to judge the foreign object type and foreign object position of the chest X-ray film.
5. A quality control method for chest X-ray films based on deep learning according to claim 1, characterized in that: In step S7, obtain the coordinate values of the left and right clavicle regions, calculate the angle between the two clavicles and the horizontal line, set the shoulder shrugging threshold at 30°, and if the clavicle angle is greater than this threshold, it can be defined as shoulder shrugging.
6. The method for quality control of chest X-ray films based on deep learning according to claim 1, wherein: In step S7, by calculating the average value a of the maximum abscissa of the left clavicle and the minimum abscissa of the right clavicle, and comparing it with the overall horizontal center point b of the captured image, judge whether there is a body position shift in the chest X-ray film.
7. A quality control method for chest X-ray films based on deep learning according to claim 1, characterized in that: In step S7, according to the left and right lung field regions and left and right scapula regions obtained by segmentation in step S5, calculate the overlap rate between the scapula and the lung field, and define no overlap, mild overlap, and severe overlap according to the overlap rate.
8. A quality control method for chest X-ray films based on deep learning according to claim 1, characterized in that: In step S5, the Segvol image segmentation model is selected as the image segmentation model to train the six annotated regions.
9. A method for quality control of chest X-ray films based on deep learning according to claim 1, characterized in that: In step S7, the specific calculation formula for the body position deviation is as follows where Lmax represents the maximum abscissa value of the left clavicle region, Rmin represents the minimum abscissa value of the right clavicle region, W is the total horizontal pixel width of the standardized chest X-ray film. When |a - b| > T, it is determined that there is a body position deviation, and T is a preset horizontal deviation threshold value.