Tuberculosis-based chest radiograph lesion detection method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-12
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]该类问题会导致转换后的影像丢失结核诊断所需的细粒度特征信息,使源域训练的结核病灶筛查模型无法从转换后的影像中提取有效的诊断特征,出现结核病灶筛查的灵敏度与特异度下降的情况
[0022]This invention first acquires chest images with tuberculosis annotations from the source center to form a source center chest image set, and acquires chest images without tuberculosis annotations from the target center to form a target center chest image set. The source center chest image set is segmented image by image to obtain an anatomical partition table. The grayscale and noise of each partition are statistically analyzed and written into the source center style codebook according to the partition index. The target center chest image set is smoothed to obtain a target tone map. The tone map is subtracted to obtain a target detail map. Grayscale and energy parameters are extracted from the detail map to form a diagnostic fingerprint. Under the constraint of the anatomical partition table, the grayscale and noise of the target tone map are statistically analyzed and compared with the source center style codebook to determine a matching identifier. Based on the matching identifier, a segmented monotonic tone mapping is performed to obtain a transformed tone map. The mapping amplitude is constrained by the diagnostic fingerprint map. After replacing the target tone map, the detail map is superimposed to generate a transformed chest image set. A screening model is trained using the source center chest image set. The transformed chest image set and the target center chest image set are input into the screening model to obtain the first and second representation vectors. The representation constraint is determined and the model is updated to obtain a cross-center tuberculosis screening model.
Smart Images

Figure CN122199530B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of healthcare informatics technology, and more specifically, to a method and system for detecting tuberculosis lesions on chest X-rays. Background Technology
[0002] Cross-domain adaptation of medical imaging is a key support for large-scale screening and cross-regional monitoring of tuberculosis. Differences in the models of medical imaging equipment, chest scanning protocols, and imaging parameter settings used by different public health and disease control institutions and designated medical facilities lead to distributional shifts in the image representation of the same lung anatomy and tuberculous lesions. This causes performance degradation in tuberculosis screening models trained on data from a single institution when viewed in image data from other regions or institutions. Unsupervised domain adaptation techniques can achieve distributional adaptation without requiring tuberculosis-related labeled data in the target domain and are widely used in cross-institutional image screening and localization of tuberculous lesions. Among these, image-to-image translation frameworks based on generative adversarial networks are the mainstream technical implementation path in this field.
[0003] This unsupervised domain adaptation framework based on semantically aware generative adversarial networks (GANs) achieves style transfer between source and target domain chest images through a cyclic translation structure consisting of two symmetrical generators and discriminators. The generator converts the target domain chest images into image data in the style of the source domain, while the discriminator distinguishes between the generated source-domain style images and the real source-domain images. Adversarial learning ensures that the style distribution of the generated images remains consistent with the source domain. The framework also introduces a cyclic consistency loss to constrain the pixel-level consistency between the generated images and the original input images after back-translation. An additional semantic discriminator, using a lung anatomy mask generated by a segmentation network, ensures that the semantic information related to lung structure and tuberculosis lesions in the generated images remains unchanged, allowing the tuberculosis lesion screening model trained in the source domain to be directly applied to the converted target domain images.
[0004] During image conversion, the generator can perform nonlinear, non-monotonic, spatially dependent remapping of grayscale values in local image regions. This type of remapping operation can alter the relative grayscale contrast between tuberculous lesions and adjacent normal lung tissue, the ordering of local grayscale values, and the mid-to-high frequency energy spectrum distribution characteristics of tuberculous lesions without changing the mask morphology of lung anatomy or disrupting cyclic consistency. The semantic discriminator can only constrain the overall morphological distribution of lung anatomy and cannot effectively supervise fine-grained features such as grayscale contrast and texture spectrum related to tuberculosis diagnosis in local areas. Therefore, during style conversion, the generator treats local grayscale and texture features carrying tuberculosis diagnosis information as domain-dependent style features for conversion and rewriting.
[0005] Such problems can lead to the loss of fine-grained feature information required for tuberculosis diagnosis in the converted images. This prevents the tuberculosis lesion screening model trained in the source domain from extracting effective diagnostic features from the converted images, resulting in a decrease in the sensitivity and specificity of tuberculosis lesion screening. Furthermore, grayscale remapping operations may introduce artifacts into the converted images that do not match the actual features of tuberculosis lesions, or erase truly existing subtle tuberculosis lesion features. This causes the output of the screening model to deviate from the actual tuberculosis infection status in the images, failing to meet the accuracy requirements of public health and disease control for cross-regional tuberculosis epidemic monitoring and large-scale screening, and affecting the formulation and implementation of tuberculosis prevention and control strategies.
[0006] In view of this, the present invention proposes a method and system for detecting tuberculosis lesions on chest X-ray to solve the above problems. Summary of the Invention
[0007] To overcome the aforementioned deficiencies of the prior art and achieve the above objectives, the present invention provides the following technical solution: a method for detecting tuberculosis lesions via chest X-ray, comprising:
[0008] Chest images with tuberculosis annotations are collected from the source center to obtain the source center chest image set; chest images without tuberculosis annotations are collected from the target center to obtain the target center chest image set.
[0009] The anatomical partition table is obtained by extracting and segmenting each image from the source center chest image set; grayscale and noise statistics are performed on each partition of the anatomical partition table, and the partition index is written into the source center style codebook.
[0010] Smoothing is performed on the target center chest image set to obtain the target tone map. The target detail map is obtained by subtracting the target tone map from each image in the target center chest image set. Gray level and energy parameters are extracted from the target detail map to obtain the diagnostic fingerprint map.
[0011] Under the constraints of the anatomical partition table, grayscale and noise statistics are performed on the target tone map, and the matching identifier is determined by comparing it with the source center style codebook.
[0012] Based on the matching identifier, a segmented monotonic tone mapping is performed on the target tone map to obtain a transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The transformed tone map is used to replace the target tone map and the target detail map is superimposed to obtain a transformed chest image set.
[0013] A screening model is trained using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain the first representation vector and the second representation vector; the representation constraint is determined by the first representation vector and the second representation vector; and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model.
[0014] A tuberculosis-based chest X-ray lesion detection system includes:
[0015] The data acquisition module is used to acquire chest images with tuberculosis annotations from the source center to obtain the source center chest image set; and to acquire chest images without tuberculosis annotations from the target center to obtain the target center chest image set.
[0016] The style writing module is used to extract and segment the source center chest image set one by one to obtain the anatomical partition table; perform grayscale and noise statistics on each partition of the anatomical partition table, and write it into the source center style codebook according to the partition index;
[0017] The fingerprint diagnostic module is used to perform smoothing processing on the target central chest image set to obtain the target tone map, and to subtract the target tone map from each image in the target central chest image set to obtain the target detail map; grayscale and energy parameters are extracted from the target detail map to obtain the diagnostic fingerprint map;
[0018] The style matching module is used to perform grayscale and noise statistics on the target tone map under the constraints of the anatomical partition table, and compare it with the source center style codebook to determine the matching identifier;
[0019] The tone mapping module is used to perform segmented monotonic tone mapping on the target tone map based on the matching identifier to obtain the transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The transformed tone map is used to replace the target tone map and the target detail map is superimposed to obtain the transformed chest image set.
[0020] The model training module is used to train the screening model using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain the first representation vector and the second representation vector; the representation constraint is determined by the first representation vector and the second representation vector; and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model.
[0021] Compared with existing technologies, the technical effects and advantages of the tuberculosis-based chest X-ray lesion detection method and system of the present invention are as follows:
[0022] This invention first acquires chest images with tuberculosis annotations from the source center to form a source center chest image set, and acquires chest images without tuberculosis annotations from the target center to form a target center chest image set. The source center chest image set is segmented image by image to obtain an anatomical partition table. The grayscale and noise of each partition are statistically analyzed and written into the source center style codebook according to the partition index. The target center chest image set is smoothed to obtain a target tone map. The tone map is subtracted to obtain a target detail map. Grayscale and energy parameters are extracted from the detail map to form a diagnostic fingerprint. Under the constraint of the anatomical partition table, the grayscale and noise of the target tone map are statistically analyzed and compared with the source center style codebook to determine a matching identifier. Based on the matching identifier, a segmented monotonic tone mapping is performed to obtain a transformed tone map. The mapping amplitude is constrained by the diagnostic fingerprint map. After replacing the target tone map, the detail map is superimposed to generate a transformed chest image set. A screening model is trained using the source center chest image set. The transformed chest image set and the target center chest image set are input into the screening model to obtain the first and second representation vectors. The representation constraint is determined and the model is updated to obtain a cross-center tuberculosis screening model.
[0023] This invention addresses the problems in existing cross-center adaptation methods, such as image distribution shifts due to differences in equipment models and scanning protocols, and the potential for generative adversarial network-based translation frameworks to rewrite fine-grained features related to tuberculosis diagnosis, leading to model performance degradation, artifacts, or the erasure of subtle lesion features. Its advantages lie in maintaining the relative grayscale contrast, local grayscale ranking, and texture energy features between tuberculous lesions and adjacent normal tissues through anatomical partition constraints and tone mapping guided by diagnostic fingerprints. This reduces unintended rewriting of key diagnostic information during cross-center adaptation. Furthermore, updating the model by representing constraints enhances its adaptability to differences in cross-center image distribution, reducing the risk of artifacts and missed detections of subtle tuberculous lesions. This allows cross-center tuberculosis screening models to better meet the needs of public health and disease control for cross-regional tuberculosis epidemic monitoring and large-scale screening, improving the consistency between screening results and the actual tuberculosis infection status in images. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of a chest X-ray lesion detection system based on tuberculosis according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of a chest X-ray lesion detection method based on tuberculosis according to an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a chest X-ray lesion detection system based on tuberculosis according to an embodiment of the present invention;
[0027] Figure 4 This is a flowchart of a method for obtaining a diagnostic fingerprint according to an embodiment of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be described in detail, clearly, and completely below with reference to the accompanying drawings. It should be particularly noted that the specific embodiments described below are only for better illustrating and explaining the technical solutions of the present invention, and are intended to enable those skilled in the art to better understand and implement the present invention, and should not be construed as limiting the scope of protection of the present invention. Without departing from the spirit and substance of the present invention, those skilled in the art can modify, adjust, or make equivalent substitutions based on the content disclosed in the present invention, and these should all be considered within the scope of protection of the present invention.
[0029] Example 1:
[0030] Please see Figure 1 and Figure 3 As shown, this embodiment discloses a tuberculosis-based chest X-ray lesion detection system, including a data acquisition module, a style writing module, a fingerprint diagnosis module, a style matching module, a tone mapping module, and a model training module. Each module is connected via wired or wireless means to achieve data transmission.
[0031] The data acquisition module is used to acquire chest images with tuberculosis annotations from the source center to obtain the source center chest image set; and to acquire chest images without tuberculosis annotations from the target center to obtain the target center chest image set.
[0032] The following describes a specific implementation method for obtaining a source center chest image set by acquiring chest images with tuberculosis annotations from the source center, and obtaining a target center chest image set by acquiring chest images without tuberculosis annotations from the target center:
[0033] The image archiving platform's retrieval and export functions are invoked at both the source and target centers to obtain the device model directory and scanning protocol directory corresponding to the chest images to be acquired, forming a device directory and a protocol directory. Device layering rules are set according to the device directory, preferably by device model. Protocol layering rules are set according to the protocol directory, preferably by scanning protocol. Source center acquisition lists and target center acquisition lists are generated for the chest images according to the device and protocol layering rules. The source center acquisition list contains chest image entries with tuberculosis annotations, and the target center acquisition list contains chest image entries without tuberculosis annotations. This sub-step constrains the acquisition coverage area through layering rules, limiting the main source of distribution offset to differences in device model and scanning protocol, and reducing the uncertainty of cross-center differences.
[0034] Based on the source center's acquisition list, the image archiving platform's export function is called item by item to export the image file corresponding to each chest image, and to export the tuberculosis annotation corresponding to the same image identifier. The tuberculosis annotation is existing annotation data from the source center, and includes both the image identifier and the tuberculosis annotation content. When the tuberculosis annotation content includes lesion location annotations, the lesion location annotation is recorded as lesion location annotation content. When the tuberculosis annotation content does not include lesion location annotations but includes image-level annotations, the image-level annotation is recorded as image-level annotation content, and an annotation type flag is recorded. The annotation type flag indicates whether the tuberculosis annotation content includes lesion location annotation content. For each exported image file, the image identifier, device model, and scanning protocol are extracted. The device model and scanning protocol are based on the registration information on the image archiving platform. The image identifier, device model, scanning protocol, image file path, lesion location annotation content, image-level annotation content, and annotation type flag are recorded in the source center's original image table. If an image identifier lacks a corresponding tuberculosis annotation, that image identifier is not included in the source center's original image table. By explicitly expressing the type of tuberculosis annotation content using annotation type tags, subsequent statistical processes can employ different exclusion strategies for lesion location annotation content and image-level annotation content, reducing the probability of lesion information entering imaging tone statistics and lowering the probability of cross-center adaptation treating diagnostic information as style information.
[0035] Based on the target center acquisition list, the image archive platform's export function is called item by item to export the image file corresponding to each chest image. For each exported image file, the image identifier, device model, and scanning protocol are extracted. The device model and scanning protocol are based on the registration information on the image archive platform. The image identifier, device model, scanning protocol, and image file path are recorded as the target center's original image table. The target center's original image table does not contain tuberculosis annotations; it only maintains the correspondence between image identifiers and imaging conditions. This sub-step, by retaining the device model and scanning protocol information of the target center images, forms an explicit descriptive basis for the target center distribution offset, reducing the uninterpretable problems of imaging differences caused by relying solely on image pixels.
[0036] Consistent export expression rules are applied to the image files in the source center original image table and the target center original image table. Gray-level preservation rules are set, preferably preserving the original gray-level sample values in the image files and not using the gray-level remapping results for display. Spatial preservation rules are set, preferably preserving the pixel spacing and imaging direction information recorded in the image files and not performing secondary scaling. Cropping rules are set, including a first cropping method and a second cropping method. The first cropping method maintains the original image range unchanged, and the second cropping method crops to the outer contour bounding box of the thoracic circumference. When the difference in field of view is greater due to differences in equipment model, the second cropping method is used; when the difference in field of view is smaller due to differences in equipment model, the first cropping method is used. The gray-level preservation rules, spatial preservation rules, and cropping rules are associated with image identifiers to form a unified acquisition parameter table. This sub-step constrains data expression differences through unified export expression rules, reduces the additional offset introduced by the export method due to cross-center differences, and reduces the sensitivity of subsequent adaptation tasks to external imaging factors.
[0037] Based on a unified acquisition parameter table, consistent export representations are performed on the image files of the source center's original image table and the target center's original image table. Data entries are generated for each image identifier. Data entries for the source center chest image set include the image identifier, equipment model, scanning protocol, image file, and tuberculosis annotation. Data entries for the target center chest image set include the image identifier, equipment model, scanning protocol, and image file. The source center and target center chest image sets are saved as sequentially accessible dataset file structures, preferably organized by image identifier directory. This sub-step, by forming the source center and target center chest image sets under the same export representation constraints, ensures that cross-center differences mainly reflect imaging differences corresponding to equipment models and scanning protocols, reducing non-operational differences introduced during dataset construction and mitigating the risk of cross-center screening performance degradation from the source.
[0038] The style writing module is used to extract and segment the source center chest image set one by one to obtain the anatomical partition table; perform grayscale and noise statistics on each partition of the anatomical partition table, and write it into the source center style codebook according to the partition index.
[0039] The specific implementation method for extracting and segmenting anatomical partition tables from each image in the source center chest image set, and then writing them into the source center style codebook according to the partition index is as follows:
[0040] For each chest image in the source center's chest image set, the corresponding image file is located based on the image identifier, and the device model and scanning protocol are extracted to form an image processing record. The image processing record includes the image identifier, device model, scanning protocol, image grayscale matrix, and tuberculosis annotation. The image grayscale matrix comes from the original grayscale sample values of the image file, and the tuberculosis annotation comes from the tuberculosis annotations in the source center's chest image set. This image processing record is used subsequently to ensure consistency between the partition boundaries and statistical ranges for the same image identifier, thereby reducing the impact of inconsistencies in grayscale representation introduced by differences in device model and scanning protocol on the partition statistical results.
[0041] Based on the image grayscale matrix recorded in the image processing, the outer contour of the thoracic cage is extracted from each chest image. First, a surface threshold is determined on the image grayscale matrix. The surface threshold is preferably determined using a quantile threshold method. Grayscale quantiles are calculated for the pixel grayscale values in the image grayscale matrix. The surface threshold is set between the 60th and 85th quantiles. When the grayscale distribution of the image grayscale matrix is more dispersed, the surface threshold is set between the 70th and 85th quantiles; when the grayscale distribution of the image grayscale matrix is more concentrated, the surface threshold is set between the 60th and 70th quantiles. Pixels with a grayscale value not less than the surface threshold are marked as surface candidate pixels. Connected component filtering is performed on the surface candidate pixels, selecting the connected component with the largest area covering the central region of the chest image as the thoracic cage candidate region. Then, the outer boundary is extracted from the boundary of the thoracic cage candidate region to obtain the outer contour of the thoracic cage. When holes appear in the candidate thoracic region, a first closing operation is performed on the candidate thoracic region to obtain the closed thoracic region. The first closing operation uses a square structuring element, with the preferred side length of the square structuring element ranging from 3 to 21 pixels. When there are more holes in the candidate thoracic region, the side length is set to 11 to 21 pixels; when there are fewer holes, the side length is set to 3 to 11 pixels. Then, the outer contour of the thoracic region is extracted using the boundary of the closed thoracic region. By using the surface threshold and the first closing operation, a continuous outer contour of the thoracic region can still be formed even when there are exposure differences and local occlusions, reducing the probability of the outer thoracic contour being broken and causing the background outside the chest to be included in the subsequent statistical range.
[0042] After obtaining the outer contour of the thoracic cage, candidate lung field regions are defined based on this contour. The candidate lung field region is the pixel range within the bounding box of the outer contour. A lung field threshold is determined within the candidate lung field region, preferably using a quantile thresholding method. Gray-level quantiles are calculated for the pixel gray-level values of the candidate lung field region. The lung field threshold is set between the 10th and 35th quantiles. When the gray-level distribution of the candidate lung field region is more dispersed, the threshold is set between the 10th and 25th quantiles; when the gray-level distribution is more concentrated, the threshold is set between the 25th and 35th quantiles. Pixels with gray-level values not exceeding the lung field threshold are marked as candidate lung field pixels. Connected component filtering is performed on these candidate lung field pixels, selecting the two largest connected components (left and right) as the left and right candidate lung field regions. When boundary gaps appear in the candidate regions of the left and right lung fields, a second closing operation is performed on each candidate region to obtain the closed lung field region. The second closing operation uses a square structuring element, with a preferred side length of 3 to 15 pixels. When the boundary gaps in the candidate regions of the left and right lung fields are longer, 9 to 15 pixels are used; when the gaps are shorter, 3 to 9 pixels are used. The closed lung field region is then confined to the interior of the outer contour of the thoracic cavity, resulting in the effective lung field area. By using the lung field threshold and the second closing operation, the effective lung fields of the left and right lung fields can still be extracted even when exposure differences exist, reducing the probability of misclassifying high-grayscale areas of the mediastinum and low-grayscale backgrounds outside the chest as effective lung fields.
[0043] After obtaining the effective lung field area, the mediastinal centerline is determined based on its left-right distribution characteristics. First, the left and right boundaries of the effective lung field area are determined. The left boundary is taken as the minimum column index of the effective lung field area in each row of pixels, and the right boundary is taken as the maximum column index of the effective lung field area in each row of pixels. Next, the left and right boundaries of the thoracic contour are determined. The left boundary of the thoracic contour is taken as the minimum column index of the thoracic contour in each row of pixels, and the right boundary is taken as the maximum column index of the thoracic contour in each row of pixels. For each row of pixels, the middle column index of the left and right boundaries of the effective lung field area is taken as the lung field midline column index, and the middle column index of the left and right boundaries of the thoracic contour is taken as the thoracic midline column index. The average of the lung field midline column index and the thoracic midline column index is taken to obtain the mediastinal centerline column index. The mediastinal centerline is formed by connecting the mediastinal centerline column indices in each row of pixels. When some rows of pixels in the effective lung field area are missing, the mediastinal centerline column index is filled by the average of the mediastinal centerline column indices of adjacent rows of pixels. The outer contour of the thoracic cavity, the effective area of the lung field, and the mediastinal center line serve as a unified geometric reference for subsequent segmentation boundaries, thus limiting grayscale and noise statistics to a comparable anatomical range and reducing the probability of statistically classifying the extrathoracic background and bed board artifacts as imaging styles.
[0044] In each chest image, the lung field is effectively divided into left and right regions based on the mediastinal central line. The height range of the effective lung field is calculated, and the number of height quantiles is set according to the height direction of the effective lung field. The preferred range for the number of height quantiles is 4 to 10. When the difference in the field of view covered by different equipment models is greater, 6 to 10 is used; when the difference in the field of view covered by different equipment models is smaller, 4 to 6 is used. The left and right regions are divided into multiple partitions along the height direction according to the number of height quantiles, resulting in a set of partition boundaries. The image identifier, partition index, partition boundary set, external chest contour, effective lung field, and mediastinal central line are recorded as an anatomical partition table. The anatomical partition table binds the partition index to the anatomical location, thereby transferring the description of the source center imaging tone distribution from the whole image level to the partition level, reducing style statistical drift caused by differences in image placement and framing.
[0045] For each partition index in the anatomical partition table, a partition pixel set is extracted from the image grayscale matrix based on the partition boundary set, and the partition pixel set is limited to the effective area of the lung field. The annotation type marker corresponding to the image identifier is read. If the annotation type marker indicates that the tuberculosis annotation includes lesion location annotations, the pixel range corresponding to the lesion location annotations is removed from the partition pixel set, resulting in a statistical pixel set. If the annotation type marker indicates that the tuberculosis annotation only includes image-level annotations, a suspected lesion pixel range is generated within the partition pixel set, and then this suspected lesion pixel range is removed from the partition pixel set, resulting in a statistical pixel set. The statistical pixel set is used for the statistical range of the subsequent grayscale quantile table and noise coarseness table, avoiding the inclusion of grayscale and texture features related to tuberculosis lesions in the imaging tone statistics.
[0046] The generation process of the suspected lesion pixel range is based on the image grayscale matrix and a first noise smoothing scale. The corresponding regions of the partitioned pixel set are smoothed according to the first noise smoothing scale to obtain a partitioned smooth map. The partitioned residual map is obtained by subtracting the partitioned smooth map from the partitioned pixel set. An anomaly threshold is set, preferably ranging from the 90th to the 99th percentile of the absolute value of the partitioned residual map. When the absolute values of the partitioned residual map are more dispersed, the anomaly threshold is set to the 95th to 99th percentile; when the absolute values of the partitioned residual map are more concentrated, the anomaly threshold is set to the 90th to 95th percentile. Pixels with an absolute value of the partitioned residual map not less than the anomaly threshold are marked as abnormal pixels. Abnormal pixels whose connected segment area within the effective lung field is less than the lower area limit are not included in the suspected lesion pixel range. The preferred range of the lower area limit is 20 to 200 pixels; for smaller pixel spacing, it is 80 to 200 pixels; for larger pixel spacing, it is 20 to 80 pixels. The pixel range corresponding to the connected segments of abnormal pixels that meet the lower area limit is recorded as the suspected lesion pixel range. Even when lesion location annotations are lacking, the exclusion range can still be formed by abnormal pixels in the partition residual map, so that the imaging tone statistics are less affected by the grayscale and texture of the lesion area in the image-annotated cases, thereby reducing the probability that the source center style codebook will solidify the lesion texture into style features.
[0047] After obtaining the statistical pixel set, a grayscale quantile table is calculated for the statistical pixel set. The grayscale quantile table contains 5 quantile points: 5, 25, 50, 75, and 95. A noise coarseness table is calculated for the statistical pixel set. The noise coarseness table is processed by a first noise smoothing scale to obtain a partition smoothing map. Then, the partition smoothing map is subtracted from the statistical pixel set to obtain a partition residual map. The values of the statistical partition residual map at the 5 quantile points are used as the noise coarseness table. The preferred range of the first noise smoothing scale is 1 to 5 pixel spacing. When the pixel spacing is larger, a range of 1 to 3 pixel spacing is used; when the pixel spacing is smaller, a range of 3 to 5 pixel spacing is used. Grayscale and noise statistics are completed within the anatomical locations defined by the anatomical partition table. Even when the lesion location annotation is missing, the influence of the lesion is still excluded by the range of suspected lesion pixels, reducing the probability that tuberculosis diagnostic information is included in the imaging tone statistics, thereby reducing the probability of rewriting the fine-grained features of tuberculosis lesions during cross-center adaptation.
[0048] For each image identifier in the source center's chest image set, the corresponding device model and scanning protocol are read. A style entry index is generated based on the device model and scanning protocol. This style entry index distinguishes the tonal distribution of images under different imaging conditions within the source center's chest image set. The generation rule for the style entry index is to combine device models and scanning protocols in a one-to-one correspondence. Image identifiers with the same device model and scanning protocol combination are placed in the same style entry index, while image identifiers with different device model and scanning protocol combinations are placed in different style entry indices. An upper limit is set for the number of entries, preferably ranging from 8 to 64. When the number of device model and scanning protocol combinations in the source center's chest image set is less, 8 to 16 is used; when the number of combinations is greater, 16 to 64 is used. When the number of device model and scanning protocol combinations exceeds the upper limit, a merging process is performed on the style entry indexes, prioritizing those with fewer image identifiers.
[0049] The merging process determines the merging direction based on the imaging tone differences between style entry indices. For each style entry index, the grayscale quantile table and noise coarseness table are first categorized according to the partition index of the anatomy partition table. Then, for each quantile in the grayscale quantile table and noise coarseness table of the same partition index, the median is calculated for each quantile, resulting in the partition grayscale representative table and partition noise representative table for that style entry index under that partition index. For any two style entry indices, the partition grayscale representative table and partition noise representative table are compared quantile by quantile based on the same partition index to obtain the merging difference. A merging threshold is set, preferably ranging from 0.5 to 5 grayscale units. When the range of merging difference is larger, the merging threshold is set to 1 to 5 grayscale units; when the range of merging difference is smaller, the merging threshold is set to 0.5 to 1 grayscale unit. For style entry indices with fewer image identifiers, the target style entry index with the smallest merging difference that does not exceed the merging threshold is selected for merging. The image identifier sets of the two are merged, and the partition grayscale representative table and partition noise representative table are recalculated until the number of style entry indices does not exceed the upper limit of the number of entries. If the number of differences exceeds the merge threshold, the merge is not performed, and the original style entry index is retained.
[0050] A second minimum sampling number is set, preferably ranging from 50 to 500. When the number of image identifiers corresponding to the same style entry index is less, the range is 50 to 150; when the number of image identifiers corresponding to the same style entry index is more, the range is 150 to 500. When the number of image identifiers under a certain partition index for a style entry index is lower than the second minimum sampling number, the statistical range is first expanded to the set of image identifiers with the same scanning protocol, and the median is recalculated. If it is still lower than the second minimum sampling number, the statistical range is then expanded to the set of image identifiers with the same equipment model, and the median is recalculated. If it is still lower than the second minimum sampling number, the same-side partition index with adjacent height quantiles is used in the statistics, and the median is recalculated. The style entry index, partition index, partition grayscale representative table, and partition noise representative table are recorded in the source center style codebook. By clearly defining the entry key, the upper limit of the number of entries, and the entry merging rules of the style entry index, the source center style codebook can form a traceable description of the partitioned imaging tone distribution when the number of entries changes under different imaging conditions. This reduces the mapping offset caused by the compression or excessive splitting of the source center imaging condition differences, thereby reducing the probability of unexpected rewriting of the local gray-level sorting relationship and texture energy distribution by cross-center adaptation.
[0051] The fingerprint diagnostic module is used to perform smoothing processing on the target central chest image set to obtain the target tone map, and to subtract the target tone map from each image in the target central chest image set to obtain the target detail map; grayscale and energy parameters are extracted from the target detail map to obtain the diagnostic fingerprint map.
[0052] Please see Figure 4 As shown, the following describes a specific implementation method for obtaining a target tone map by performing smoothing processing on a set of chest images centered on the target center, and obtaining a target detail map by subtracting the target tone map from the set of chest images centered on the target center; then, grayscale and energy parameters are extracted from the target detail map to obtain a diagnostic fingerprint map:
[0053] For each chest image in the target center's chest image set, the corresponding image file is located based on the image identifier, and the device model and scanning protocol are extracted to obtain the image grayscale matrix. The image grayscale matrix is taken from the original grayscale sampling values of the image file, without using the grayscale remapping results for display. The image identifier, device model, scanning protocol, and image grayscale matrix are recorded as the target image processing record. The target image processing record is used to ensure the consistency of grayscale expression within the same image identifier in subsequent smoothing processing, avoiding the misinterpretation of expression differences introduced by differences in device model and scanning protocol as lesion texture changes, thereby reducing the risk of unintended rewriting of fine-grained tuberculosis diagnostic information from the source.
[0054] Based on the image grayscale matrix recorded in the target image processing, the tone smoothing scale is determined. The preferred range for the tone smoothing scale is 1 to 7 pixel intervals. The value of the tone smoothing scale is determined based on the pixel interval and the representative value of the fluctuation in the image grayscale matrix within the bounding box of the thoracic contour. The representative value of fluctuation is determined by sliding a fixed window point by point within the bounding box of the thoracic contour. The side length of the fixed window is 21 to 41 pixels; for smaller pixel intervals, it is 31 to 41 pixels; for larger pixel intervals, it is 21 to 31 pixels. The absolute mean of the grayscale difference between adjacent pixels within each window is calculated to obtain the window fluctuation value. The median of all window fluctuation values is taken as the representative fluctuation value. A first tone threshold and a second tone threshold are set. The first tone threshold is 0.8 to 1.2 times the representative fluctuation value, and the second tone threshold is 1.8 to 2.2 times the representative fluctuation value. When the representative fluctuation value is not greater than the first tone threshold, the tone smoothing scale is 1 to 3 pixel intervals. When the representative value of fluctuation is not less than the second tone threshold, the tone smoothing scale is taken as 3 to 7 pixel intervals. When the representative value of fluctuation is between the first tone threshold and the second tone threshold, the tone smoothing scale is taken as 2 to 5 pixel intervals.
[0055] The first and second tone thresholds are not directly generated from the representative values of the fluctuations in the current image to be processed, but are obtained statistically from the distribution of historical representative values of fluctuations in the source center chest image set or a preset validation set. The first tone threshold is used to characterize the range of low-fluctuation images, and the second tone threshold is used to characterize the range of high-fluctuation images. The representative value of the fluctuations in the current image to be processed is compared with the first and second tone thresholds to determine the interval to which the tone smoothing scale belongs. The first and second fluctuation thresholds in the neighborhood radius selection, as well as the third and fourth fluctuation thresholds in the bandwidth range selection, are all generated in the same way, making the threshold source independent of the current statistical quantity to be compared.
[0056] A tone smoothing range is determined, encompassing the area within the bounding box of the thoracic outer contour. The thoracic outer contour is extracted using the same method as the source center chest image set; the area outside the bounding box is excluded from the tone smoothing range. The image grayscale matrix is smoothed within this range according to the tone smoothing scale to obtain the target tone map. The tone smoothing scale is selected based on the quantization results of the undulation representative values, ensuring that the smoothing intensity of the target tone map matches the local undulation level of the image grayscale matrix within the thoracic region. This separates the imaging tone from local texture components, reducing the probability of treating local grayscale contrast and texture energy carrying tuberculosis diagnostic information as imaging tone components in subsequent processing, thereby minimizing the weakening of fine-grained information in tuberculosis diagnosis.
[0057] For the same image identifier, the target tone map is subtracted from the image grayscale matrix in the target image processing record using pixel correspondence to obtain the target detail map. The pixel correspondence is based on the original pixel grid of the image grayscale matrix without secondary scaling. If the smoothing range uses the outer contour bounding box of the thoracic cage, the area outside the outer contour bounding box remains unchanged in the target detail map according to the pixel values of the original image grayscale matrix, avoiding the generation of additional grayscale tortuosity at the boundary of the outer contour of the thoracic cage. The target detail map preserves the relative grayscale contrast and local texture differences between tuberculous lesions and adjacent normal lung tissue, while eliminating global imaging tone shifts caused by equipment model and scanning protocol, thereby reducing the space for unintended changes to fine-grained features of tuberculosis diagnosis during cross-central adaptation.
[0058] A neighborhood radius is set on the target detail image, preferably ranging from 1 to 6 pixel spacing. The value of the neighborhood radius is determined based on the pixel spacing and the distribution of window fluctuation values of the target detail image within the effective lung field area. Within the effective lung field area, a fixed window is slid point by point, with a side length of 15 to 31 pixels. For smaller pixel spacing, a side length of 23 to 31 pixels is used; for larger pixel spacing, a side length of 15 to 23 pixels is used. The absolute mean of the grayscale difference between adjacent pixels within each window is calculated to obtain the window fluctuation value. All window fluctuation values are arranged according to their magnitude, and a first fluctuation threshold and a second fluctuation threshold are determined. The first fluctuation threshold is taken as the 40th to 50th percentile of all window fluctuation values, and the second fluctuation threshold is taken as the 75th to 85th percentile of all window fluctuation values. When the median of the window fluctuation values is not greater than the first fluctuation threshold, the neighborhood radius is set to 1 to 3 pixels; when the median of the window fluctuation values is not less than the second fluctuation threshold, the neighborhood radius is set to 3 to 6 pixels; when the median of the window fluctuation values is between the first and second fluctuation thresholds, the neighborhood radius is set to 2 to 4 pixels. The neighborhood radius defines the set of neighboring pixels for each pixel. The grayscale relationships within the neighborhood pixel set are compared, and the relative order of the pixel within the set is recorded to obtain a grayscale sorting map. The grayscale sorting map is stored using the pixel index as the primary key, without changing the grayscale values of the target detail image. The neighborhood radius is selected based on the distribution of the window fluctuation values, ensuring that the grayscale sorting map's depiction of the local grayscale sorting relationship covers a neighborhood range that matches the fluctuation scale of the target detail image. This reduces the probability of local grayscale remapping altering the grayscale sorting relationship in the tuberculous lesion area and decreases the probability of the screening model deviating from the interpretation of lesion boundaries and internal textures.
[0059] A bandwidth range is set on the target detail image, determined based on the neighborhood radius. The bandwidth range includes a lower and an upper bound. The lower bound is preferably 1 to 3 pixel spacing, and the upper bound is preferably 3 to 9 pixel spacing, with the upper bound not less than twice the lower bound. The bandwidth range value is determined based on the representative fluctuation value and pixel spacing of the target detail image. A third and fourth fluctuation threshold are set. The third fluctuation threshold is 0.7 to 1.1 times the representative fluctuation value, and the fourth fluctuation threshold is 1.6 to 2.0 times the representative fluctuation value. When the window fluctuation value corresponding to the representative fluctuation value is not greater than the third fluctuation threshold, the lower bandwidth is 2 to 3 pixel spacing, and the upper bandwidth is 6 to 9 pixel spacing. When the window fluctuation value corresponding to the representative fluctuation value is not less than the fourth fluctuation threshold, the lower bandwidth is 1 to 2 pixel spacing, and the upper bandwidth is 3 to 6 pixel spacing. When the window fluctuation value corresponding to the fluctuation representative value is between the third and fourth fluctuation thresholds, the lower bound of the bandwidth is set to 1 to 3 pixel intervals, and the upper bound of the bandwidth is set to 4 to 7 pixel intervals. The lower and upper bounds of the bandwidth are selected based on the quantization result of the fluctuation representative value, so that the bandwidth range covers the spatial scale range that matches the texture fluctuation scale of the target detail map. This reduces the probability that bandwidth processing will rewrite the differences in noise texture morphology into differences in lesion texture, and reduces the probability that the fine-grained texture information of diagnosis will be rewritten during cross-center adaptation.
[0060] When performing bandwidth processing on the target detail map within the bandwidth range, the bandwidth processing employs two smoothing differences to obtain the bandwidth-processed map. First, a first smoothing process is performed on the target detail map using the lower bound of the bandwidth as the first smoothing radius to obtain a first smoothed detail map. Then, a second smoothing process is performed on the target detail map using the upper bound of the bandwidth as the second smoothing radius to obtain a second smoothed detail map. The bandwidth-processed map is obtained by subtracting the second smoothed detail map from the first smoothed detail map. Both the first and second smoothing processes use a neighborhood-weighted averaging method, with the neighborhood range defined by the first and second smoothing radii, respectively, measured in pixels. By limiting the spatial scale of texture variations through two smoothing differences, the bandwidth-processed map primarily expresses the detail undulations between the lower and upper bounds of the bandwidth, reducing the impact of extremely low-frequency imaging tone and extremely high-frequency quantization noise on texture energy expression.
[0061] When statistically analyzing local grayscale changes on a bandwidth processing map using a fixed window, the window side length is set, preferably ranging from 3 to 15 pixels. When the upper bandwidth bound is larger, the window side length is set to 9 to 15 pixels; when the upper bandwidth bound is smaller, the window side length is set to 3 to 9 pixels. For each pixel index, the set of pixels covering that index is determined by the window side length. The absolute values of the grayscale values in the bandwidth processing map within the set of pixels are calculated, summed, and then divided by the number of pixels in the set to obtain the local energy parameter corresponding to that pixel index. The pixel index and the local energy parameter are associated and recorded to obtain an energy distribution map, which records the local energy parameter using the pixel index. The local fluctuations of the bandwidth processing map are quantified by averaging the absolute values within the window, ensuring that the local energy parameter reflects the intensity of texture fluctuations while avoiding the cancellation of positive and negative values that could lead to an underestimation of the local energy parameter, thus reducing the probability of underestimating the texture energy in the vicinity of tuberculous lesions.
[0062] After obtaining the energy distribution map, the grayscale sorting map and the energy distribution map are combined by pixel index to obtain the diagnostic fingerprint map. The diagnostic fingerprint map is then associated with the image identifier and recorded. Simultaneously, local grayscale sorting relationships and local energy distribution patterns are preserved, ensuring that the fine-grained grayscale contrast and texture energy information related to tuberculosis diagnosis is fixed as a referable data representation in the form of a diagnostic fingerprint map. This reduces the probability of this information being rewritten as domain-related style features during cross-center adaptation, and decreases the probability of artifacts or the erasure of subtle lesion features in the transformed image.
[0063] The style matching module is used to perform grayscale and noise statistics on the target tone map under the constraints of the anatomical partition table, and compare it with the source center style codebook to determine the matching identifier.
[0064] Under the constraints of the anatomical partitioning table, the specific implementation method for performing grayscale and noise statistics on the target tone map and comparing it with the source center style codebook to determine the matching identifier is as follows:
[0065] For each chest image in the target center chest image set, the image file is located based on the image identifier, the device model and scanning protocol are extracted, and an image grayscale matrix is obtained to form a target image processing record. Based on the image grayscale matrix in the target image processing record, the external thoracic contour is extracted using the same processing method as the source center chest image set, the effective lung field area is extracted, and the mediastinal central line is determined. The effective lung field area is divided into left and right regions by the mediastinal central line. The number of height quantiles is set according to the height direction of the effective lung field area. The preferred range for the number of height quantiles is 4 to 10. When the number of device models in the target image processing record is larger, 6 to 10 is used, and when the number of device models is smaller, 4 to 6 is used. The left and right regions are segmented according to the number of height quantiles to obtain the set of partition boundaries. The image identifier, partition index, partition boundary set, external thoracic contour, effective lung field area, and mediastinal central line are recorded as an anatomical partition table. This sub-step limits the statistical region of the target tone map to the anatomical location associated with the effective lung field, reducing the probability of including the extrathoracic background and fixed accessory structures in the grayscale and noise statistics, thereby reducing non-imaging factors that cause cross-center distribution shift.
[0066] For the target tone map in the target image processing record, a set of pixels for each zone is extracted based on the zone boundary set in the anatomical zone table. This set of pixels is confined to the effective lung field area. A quantile group is set for each zone index, preferably containing 5 quantiles, with the quantiles being 5, 25, 50, 75, and 95. A target grayscale quantile table is calculated for each pixel set based on the quantile group, and this table is linked to the image identifier record using the zone index. When a portion of the zone boundary set corresponding to a certain zone index extends beyond the effective lung field area, the pixel set for that zone only includes valid pixels within the effective lung field area, without introducing extrapolated pixels.
[0067] After completing the target grayscale quantile table, for the same partition index and the same set of partition pixels, calculate the target noise coarse and fine tables for the target tone map. Set a second noise smoothing scale, preferably ranging from 1 to 5 pixel intervals. When the quantile range of the target grayscale quantile table is larger, use 1 to 3 pixel intervals; when the quantile range of the target grayscale quantile table is smaller, use 3 to 5 pixel intervals. Perform smoothing processing on the target tone map region corresponding to the partition pixel set according to the second noise smoothing scale to obtain the partition smooth tone map. Subtract the partition smooth tone map from the target tone map to obtain the partition tone residual map. Calculate the residual quantile table for the partition tone residual map using 5 quantiles, and record the residual quantile table as the target noise coarse and fine tables. Within the anatomical location defined by the anatomical partitioning table, the partition scale fluctuations of the target tone map are depicted, so that the noise morphology differences can be expressed by the target noise coarseness table, reducing the probability that noise morphology changes are treated as tuberculous texture changes, thereby reducing the probability that cross-center fitting will transform noise differences into lesion texture differences.
[0068] For each image identifier, based on the partition index of the anatomical partition table, the target gray-level quantile table and the target noise coarse / fine table are compared with the source center style codebook. The source center style codebook contains the partition gray-level representative table and the partition noise representative table corresponding to the partition index. For the same partition index, the quantile differences between the target gray-level quantile table and the partition gray-level representative table are compared at each quantile point, and the absolute values of the quantile differences are accumulated to obtain the first difference. For the same partition index, the quantile differences between the target noise coarse / fine table and the partition noise representative table are compared at each quantile point, and the absolute values of the quantile differences are accumulated to obtain the second difference. Gray-level weights and noise weights are set, with the preferred range for gray-level weights being 0.4 to 0.8 and the preferred range for noise weights being 0.2 to 0.6. The sum of the gray-level weights and noise weights is 1. When the difference between the upper and lower quantiles of the target noise coarse / fine table exceeds the difference threshold, the noise weight is set to 0.4 to 0.6, and the grayscale weight is set to 0.4 to 0.6. When the difference between the upper and lower quantiles of the target noise coarse / fine table does not exceed the difference threshold, the noise weight is set to 0.2 to 0.4, and the grayscale weight is set to 0.6 to 0.8. The first difference is scaled according to the grayscale weight, and the second difference is scaled according to the noise weight. The two scaling results are added together to obtain the weighted difference. This sub-step measures the grayscale tone difference and the noise morphology difference separately, and then uses weights to control the influence of the two types of differences on the comparison results, reducing the style matching shift caused by a single difference dominating, thereby reducing the probability of cross-center distribution shift being amplified.
[0069] For the same image identifier, the target grayscale quantile table and target noise coarseness table, obtained based on the anatomical partitioning table constraints, are compared with the partition grayscale representative table and partition noise representative table corresponding to each style entry index in the source center style codebook, respectively. The first and second differences for each style entry index are calculated, and then the weighted difference for that style entry index is obtained based on grayscale and noise weights. The style entry indexes in the source center style codebook are generated by combining the device model and scanning protocol, and are merged according to a merging threshold when the number of entries exceeds the upper limit. Therefore, the candidate set for weighted difference is all existing style entry indices in the source center style codebook.
[0070] After obtaining the weighted difference for each style entry index in the source center style codebook, the style entry index with the smallest weighted difference is selected as the matching identifier corresponding to the image identifier. The matching identifier is used to indicate the source center style codebook entry used for subsequent tone mapping. A parallel threshold is set, preferably ranging from 0.5 to 5. When the value range of the first difference is larger, it is set to 1 to 5; when the value range of the first difference is smaller, it is set to 0.5 to 1. When there are two or more style entry indices whose weighted difference difference does not exceed the parallel threshold, the first difference of the corresponding style entry indices is compared, and the style entry index with the smaller first difference is selected as the matching identifier. The image identifier and the matching identifier are associated and recorded. Determining the matching identifier under the premise that the style entry index generation rules and merging rules are clear reduces the uncertainty in the selection of the source center style codebook for the target center chest image set, thereby reducing the probability of unnecessary tone shift and noise morphology shift during cross-center adaptation.
[0071] The tone mapping module is used to perform segmented monotonic tone mapping on the target tone map based on the matching identifier to obtain the transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The transformed tone map is used to replace the target tone map and the target detail map is superimposed to obtain the transformed chest image set.
[0072] Based on the matching identifier, a segmented monotonic tone mapping is performed on the target tone map to obtain a transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The specific implementation method for replacing the target tone map with the transformed tone map and superimposing the target detail map to obtain the transformed chest image set is as follows:
[0073] For each chest image in the target center chest image set, keeping the image identifier unchanged, the matching identifier corresponding to that image identifier is read. Based on the matching identifier, the corresponding style entry is located in the source center style codebook, and the partition grayscale representation table and partition noise representation table for that style entry under each partition index are obtained. For the same image identifier, the anatomical partition table corresponding to that image identifier is read, and the partition boundary set of the target tone map is determined based on the partition index of the anatomical partition table. For each partition index, the target grayscale quantile table obtained from the aforementioned grayscale and noise statistics for that image identifier is read. Using the quantiles of the target grayscale quantile table as input and the corresponding quantiles of the partition grayscale representation table as output, a partition mapping anchor table is recorded according to the partition index. The partition mapping anchor table contains at least the partition index, quantile number, target grayscale quantile, and partition grayscale representation. This sub-step establishes a one-to-one correspondence between the grayscale quantiles of the target tone map and the grayscale representations of the source center style codebook. The partition mapping anchor table limits the mapping relationship to the range of anatomical locations determined by the anatomical partition table, reducing the probability that the full-map mapping will bring the differences between the extrathoracic background and extrapulmonary structures into the tone mapping.
[0074] For the same image identifier, the corresponding diagnostic fingerprint is read. The diagnostic fingerprint includes a grayscale sorting map and an energy distribution map. Based on the partition index and partition boundary set of the anatomical partition table, the fingerprint pixel set corresponding to the partition pixel set is extracted from the grayscale sorting map and the energy distribution map, respectively. A lower limit and an upper limit of the mapping amplitude are set. The preferred range for the lower limit of the mapping amplitude is 2 to 10 grayscale units, and the preferred range for the upper limit of the mapping amplitude is 15 to 80 grayscale units.
[0075] For the energy distribution map, a first energy threshold and a second energy threshold are set. The preferred range of the first energy threshold is the 40th to 60th percentile of the energy distribution map value, and the preferred range of the second energy threshold is the 80th to 95th percentile of the energy distribution map value. When the energy distribution map value is more dispersed, the first energy threshold is set to the 50th to 60th percentile, and the second energy threshold is set to the 90th to 95th percentile. When the energy distribution map value is more concentrated, the first energy threshold is set to the 40th to 50th percentile, and the second energy threshold is set to the 80th to 90th percentile. For each pixel index, if the local energy parameter corresponding to the energy distribution map is not less than the second energy threshold, a first energy upper limit is assigned to the pixel index, which is 15 to 30 gray units; if the local energy parameter corresponding to the energy distribution map is not greater than the first energy threshold, a second energy upper limit is assigned to the pixel index, which is 30 to 80 gray units; for pixel indices corresponding to local energy parameters between the first and second energy thresholds, a third energy upper limit is assigned to the pixel index, which is 25 to 60 gray units.
[0076] For a grayscale sorted image, a first sorting density threshold and a second sorting density threshold are set. The relative order change density of the grayscale sorted image is defined as the proportion of pixels with the same relative order as the center pixel within a neighborhood pixel set defined by the neighborhood radius, relative to the total number of pixels in the neighborhood pixel set. The preferred range for the first sorting density threshold is 0.35 to 0.55, and the preferred range for the second sorting density threshold is 0.65 to 0.85. When the number of pixels in the neighborhood pixel set is larger, the first sorting density threshold is set to 0.45 to 0.55 and the second sorting density threshold to 0.75 to 0.85. When the number of pixels in the neighborhood pixel set is smaller, the first sorting density threshold is set to 0.35 to 0.45 and the second sorting density threshold to 0.65 to 0.75. For each pixel index, if the relative order change density is not greater than the first sorting density threshold, a first sorting upper limit is assigned to the pixel index, which is between 15 and 25 gray units; if the relative order change density is not less than the second sorting density threshold, a second sorting upper limit is assigned to the pixel index, which is between 25 and 80 gray units; for the pixel index corresponding to the relative order change density between the first and second sorting density thresholds, a third sorting upper limit is assigned to the pixel index, which is between 20 and 60 gray units.
[0077] For each partition index, for each pixel index in the fingerprint pixel set, a third energy upper limit is determined based on the energy distribution map, and a third sorting upper limit is determined based on the grayscale sorting map. A compositing rule is set, which takes the smaller of the third energy upper limit and the third sorting upper limit as the upper limit of the mapping amplitude for the same pixel index. This compositing rule tightens the upper limit of the mapping amplitude when local energy parameters are high or the relative order change density is low, reducing the probability of the mapping rewriting the texture energy and grayscale sorting relationship. For each partition index, a lower limit of the mapping amplitude is assigned to each pixel index within the partition pixel set based on the lower limit of the mapping amplitude. This lower limit limits the minimum adjustable amplitude of each pixel index, preventing inconsistent truncation of the mapping result in different grayscale ranges due to the mapping adjustment amount being lower than the quantization noise level. A mapping amplitude upper limit table is formed, which includes image identifier, partition index, pixel index, upper limit of mapping amplitude, and lower limit of mapping amplitude. This processing transforms the information reflecting gray-level ranking and energy distribution patterns in the diagnostic fingerprint image into pixel-level amplitude constraints. It also clarifies the combination method of the first energy distribution map and the first gray-level ranking map through synthesis rules, reducing the probability of inconsistent rewriting introduced by segmented monotonic tone mapping in the lesion neighborhood.
[0078] For the same image identifier, the target tone map, the anatomy quantile table, the quantile mapping anchor point table, and the upper limit of the mapping amplitude table are read. For each quantile index, the set of pixels of the target tone map is extracted based on the quantile boundary set. The segment boundaries are determined by the quantile index in the quantile mapping anchor point table, and the number of segments is determined by the number of quantile indexes. When the number of quantile indexes is 5, the number of segments is 4. When the number of quantile indexes is 7, the number of segments is 6. The number of quantile indexes is either 5 or 7; 7 is used when the quantile spacing in the target grayscale quantile table is larger, and 5 is used when the quantile spacing in the target grayscale quantile table is smaller.
[0079] For each pixel within the partitioned pixel set, the mapping result is determined based on the segment boundary interval into which the pixel's gray value falls, according to the target gray quantiles at both ends of the segment boundary interval and the partition gray value representative. The mapping result is determined using piecewise linear interpolation. Piecewise linear interpolation means that within the same segment boundary interval, when the pixel gray value is closer to the target gray quantile at the lower end of the interval, the mapping result is closer to the corresponding partition gray value representative at the lower end of the interval; when the pixel gray value is closer to the target gray quantile at the upper end of the interval, the mapping result is closer to the corresponding partition gray value representative at the upper end of the interval. The mapping result monotonically changes with the pixel gray value within the segment boundary interval, maintains the consistent order of the quantile indices, and satisfies the condition that the gray value order within the segment is not reversed.
[0080] When a pixel's grayscale value is less than the target grayscale quantile corresponding to the minimum quantile in the partition mapping anchor table, the mapping result is extrapolated using the grayscale representation of the partition corresponding to the minimum quantile. When a pixel's grayscale value is greater than the target grayscale quantile corresponding to the maximum quantile in the partition mapping anchor table, the mapping result is extrapolated using the grayscale representation of the partition corresponding to the maximum quantile. The extrapolation result is used to avoid uncertain mappings caused by extremely low or extremely high grayscale pixels in the partition pixel set due to the lack of segment boundary intervals.
[0081] For each pixel, read the upper and lower limits of the mapping amplitude from the upper and lower limits table, and calculate the difference between the mapped result and the original grayscale value. If the absolute value of the difference exceeds the upper limit of the mapping amplitude, adjust the mapping result to a range centered on the original grayscale value with an amplitude equal to the upper limit of the mapping amplitude. If the absolute value of the difference does not exceed the lower limit of the mapping amplitude and the difference is not 0, adjust the mapping result to a range centered on the original grayscale value with an amplitude equal to the lower limit of the mapping amplitude, with the adjustment direction consistent with the direction of the difference. If the difference is 0, keep the mapping result unchanged. Write the mapping results of each partition index back to the position of the same pixel index as the target tone image to obtain the converted tone image. Within the anatomical locations defined by the anatomical partition table, segmented monotonic tone mapping is performed. A segmented linear interpolation method is explicitly used to determine the mapping result. For pixel gray values outside the quantile points, the results are extrapolated from both ends. At the same time, the maximum change of each pixel is limited by the upper limit table of the mapping amplitude, and the minimum adjustable amplitude of each pixel is limited by the upper limit table of the mapping amplitude. This reduces the probability of gray-level remapping causing inconsistent rewriting of local gray-level ordering relationships and energy distribution patterns, and reduces the probability of artifacts or the erasure of subtle tuberculous lesion features in the converted image.
[0082] For the same image identifier, read the transformed tone map, the anatomical partition table, the partition noise representation table corresponding to the matching identifier in the source center style codebook, and the upper limit table of the mapping amplitude. For each partition index, extract the partition pixel set of the transformed tone map based on the partition boundary set. Set a third noise smoothing scale, preferably ranging from 1 to 5 pixel intervals. When the difference between the upper and lower quantiles in the partition noise representation table is larger, use a range of 1 to 3 pixel intervals; when the difference is smaller, use a range of 3 to 5 pixel intervals. Perform smoothing processing on the corresponding region of the partition pixel set according to the third noise smoothing scale to obtain the partition smoothed tone map. Subtract the partition smoothed tone map from the transformed tone map to obtain the partition tone residual map. Calculate the residual quantile table for the partition tone residual map at quantiles of 5, 25, 50, 75, and 95.
[0083] After obtaining the residual quantile table, it is compared quantile by quantile with the zonal noise representative table to obtain the zonal noise difference table. The scaling factor is determined based on the zonal noise difference table. The scaling factor is determined according to the zonal index and is used to adjust the amplitude of the zonal tone residual map. The determination process of the scaling factor includes a first span ratio and a second span ratio. The first span ratio is obtained by dividing the difference between the 95th and 5th quantiles of the zonal noise representative table by the difference between the 95th and 5th quantiles of the residual quantile table. When the difference between the 95th and 5th quantiles of the residual quantile table is 0, the first span ratio is 1. The second span ratio is obtained by dividing the difference between the 75th and 25th quantiles of the zonal noise representative table by the difference between the 75th and 25th quantiles of the residual quantile table. When the difference between the 75th and 25th quantiles of the residual quantile table is 0, the second span ratio is 1. Set a lower and upper limit for the scaling factor. The preferred range for the lower limit is 0.5 to 1, and the preferred range for the upper limit is 1 to 2. When the difference between the 95th and 5th quantiles in the residual quantile table is larger, the upper limit should be 1 to 1.5; when the difference is smaller, the upper limit should be 1.5 to 2. The scaling factor is the smaller of the first span ratio and the second span ratio. If the scaling factor is less than the lower limit, the lower limit is used; if the scaling factor is not less than the upper limit, the upper limit is used. Set a bias, which is the difference between the 50th quantile of the residual quantile table and the 50th quantile of the partition noise representation table. For each pixel in the partition tone residual map, first subtract the bias from the pixel's residual value, then adjust the result using the scaling factor to obtain the adjusted residual value. The upper limit of the mapping amplitude is read from the upper limit of the mapping amplitude table. When the absolute value of the difference between the adjusted residual value and the original residual value exceeds the upper limit of the mapping amplitude, the adjusted residual value is adjusted to a range centered on the original residual value and with an amplitude equal to the upper limit of the mapping amplitude. The adjusted residual value is superimposed on the corresponding position of the partition smoothing tone map to obtain the partition transformation tone map of that partition index. The partition transformation tone map of each partition index is written back to the original pixel index position to obtain the transformation tone map. This processing section provides a calculable definition of the scaling factor, which is determined by the span of the quantile points in the residual quantile table and the partition noise representation table. At the same time, a bias is introduced to constrain the center position of the residual distribution, and the pixel-level adjustment is limited by the upper limit of the mapping amplitude. This can reduce the deviation of the expression of noise coarseness difference at the partition scale and reduce the probability that noise morphological differences are written as lesion texture differences.
[0084] For the same image identifier, the target detail image, the transformed tone image, and the image grayscale matrix of the target center chest image set are read. Maintaining consistent pixel indices, the pixel value representation of the target tone image is replaced with the transformed tone image. The target detail image is then overlaid pixel-by-pixel on the replaced tone representation to obtain the transformed chest image. During the overlay process, the sign and amplitude relationship of the target detail image remains unchanged, and no additional grayscale remapping is performed on the target detail image. If the aforementioned smoothing range uses the outer contour bounding box of the thoracic cavity, the transformed chest image of the area outside the outer contour bounding box is taken from the corresponding pixel values of the image grayscale matrix, avoiding additional grayscale breaks at the boundary of the outer contour of the thoracic cavity. The image identifier, device model, scanning protocol, and transformed chest image are recorded as data entries for the transformed chest image set. This sub-step replaces only the representation of the target tone map while keeping the target detail map unchanged. It transforms the chest image set to preserve the relative grayscale contrast and texture energy information between tuberculous lesions and adjacent normal lung tissue. At the same time, it reduces the difference between the target center imaging tone distribution and the source center imaging tone distribution, thereby reducing the probability that the screening model is insufficient in extracting fine-grained diagnostic features when applied across centers.
[0085] The model training module is used to train the screening model using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain the first representation vector and the second representation vector; the representation constraint is determined by the first representation vector and the second representation vector; and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model.
[0086] The screening model is trained using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain a first representation vector and a second representation vector. The representation constraint is determined by the first representation vector and the second representation vector, and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model. The specific implementation method is as follows:
[0087] For each image identifier in the source center's chest image set, the device model, scanning protocol, and tuberculosis annotation are read to form a source center training entry table. The source center training entry table is grouped by device model, and then by scanning protocol. Within each group, the correspondence between image identifiers and tuberculosis annotations is retained. The batch size is set, with an optimal range of 8 to 64. For fewer device model groups, a range of 32 to 64 is used; for more device model groups, a range of 8 to 32 is used. The first training round is set, with an optimal range of 10 to 80. For fewer image identifiers in the source center's chest image set, a range of 30 to 80 is used; for more image identifiers in the source center's chest image set, a range of 10 to 30 is used.
[0088] When generating the batch entry order based on the source center training entry table, first count the number of scanning protocol types in the source center training entry table to obtain the protocol type count. When the number of protocol types is not less than 2, arrange the image identifier entry order of each batch according to the grouping order of the source center training entry table, so that each batch contains image identifiers of at least 2 different scanning protocols. When the number of protocol types is equal to 1, arrange the image identifier entry order of each batch according to the grouping order of the source center training entry table, so that the image identifiers in each batch come from that unique scanning protocol. At the same time, a cross-batch protocol window is set. The preferred range for the cross-batch protocol window is 2 to 10 batches. When the number of image identifiers in the source center chest image set is less, take 2 to 4 batches. When the number of image identifiers in the source center chest image set is more, take 4 to 10 batches. Within the cross-batch protocol window, ensure that the appearance order of the equipment model group covers all equipment model groups to avoid the screening model only contacting image identifiers of a single equipment model group in consecutive batches.
[0089] When the number of protocol types is not less than 2 and the number of image identifiers for a certain scanning protocol group within a certain device model group is less than the batch size, a resampling upper limit is set. The preferred range for the resampling upper limit is 1 to 5 times, with 1 to 2 times when the number of image identifiers is less and 2 to 5 times when the number of image identifiers is more. Under the premise of not exceeding the resampling upper limit, image identifiers are supplemented from other scanning protocol groups within the same device model group to ensure that each batch contains image identifiers for at least 2 different scanning protocols. When other scanning protocol groups within the same device model group cannot be supplemented, image identifiers are supplemented from other device model groups to ensure that each batch contains image identifiers for at least 2 different scanning protocols. A batch entry order degradation method is given when the number of protocol types is equal to 1 and the group sample is insufficient, so that the training batch constraints can still be executed under different data distribution conditions, thereby reducing the probability of the screening model becoming biased to a single imaging condition during the training phase and reducing the probability of performance degradation caused by changes in imaging conditions when applied across centers.
[0090] After completing the source center training entry list, the adjustable parameters of the screening model are initialized. The screening model takes chest images as input and outputs tuberculosis screening results, including an image-level tuberculosis scoring map and a lesion location scoring map. The image-level tuberculosis scoring map characterizes the degree of presence of tuberculous lesions in the entire chest image, while the lesion location scoring map characterizes the degree of correlation between the location of each pixel in the chest image and the tuberculous lesion. The lesion location scoring map and the chest image have the same pixel index. The screening model structure consists of a shared feature extraction part, an image-level output part, and a location output part. The shared feature extraction part uses a residual convolution structure, with a single-channel chest image as input, preferably 1024×1024 pixels. The shared feature extraction part outputs a shared feature map. The image-level output part uses a global compression layer, a first feature transformation layer, and an image-level scoring layer. The global compression layer performs spatial averaging on the shared feature map to obtain an image-level feature vector. The first feature transformation layer performs channel compression and nonlinear transformation on the image-level feature vector. The image-level scoring layer outputs the image-level tuberculosis scoring map based on the transformed image-level feature vector. The location output section employs a location refinement layer, a progressive upsampling layer, and a location scoring layer. The location refinement layer performs channel integration on the shared feature map, the progressive upsampling layer restores the channel-integrated feature map to a pixel index scale consistent with the input chest image, and the location scoring layer outputs a lesion location scoring map based on the restored feature map. The image-level output section and the location output section share the same feature map, ensuring that the image-level tuberculosis scoring map and the lesion location scoring map originate from the same diagnostic feature base. This output format enables the screening model to possess both image-level screening capabilities and lesion location indication capabilities, allowing the cross-center tuberculosis screening model to meet the requirements of sensitivity and localization consistency at the output level.
[0091] A batch of image identifiers is retrieved from the source center training entry table according to batch size, and the corresponding chest images are read based on the image identifiers. Uniform preprocessing is performed on the chest images, including grayscale normalization and size normalization. Grayscale normalization is based on the grayscale quantiles of the chest images, preferably using the 5th and 95th quantiles to form the grayscale normalization range. Size normalization resamples the chest images to 1024×1024 pixels. Training targets are generated based on tuberculosis annotations, with a one-to-one correspondence between the training targets and chest images. When the tuberculosis annotations include lesion location annotations, a lesion location training map is generated on the pixel index of the chest image based on the lesion location annotations. The lesion location training map has the same pixel index as the chest image. The lesion location training map serves as the training target for the lesion location scoring map. Image-level tuberculosis labels are generated based on the lesion location annotations, and these image-level tuberculosis labels serve as the training target for the image-level tuberculosis scoring map. When the tuberculosis annotation content only includes image-level annotations, image-level tuberculosis labels are generated based on these annotations. These image-level tuberculosis labels serve as the training target for the image-level tuberculosis scoring map. The lesion location training map is a zero-based image, and it shares the same pixel index as the chest image. This generation method ensures that the training target maintains consistent data representation whether the lesion location annotations are present or missing, avoiding unclear output meaning from the screening model due to differences in annotation formats during the training phase.
[0092] The screening model outputs an image-level tuberculosis scoring map and a lesion location scoring map from chest images. The image-level tuberculosis scoring map is compared with the image-level tuberculosis label to obtain a first bias, and the lesion location scoring map is compared with the lesion location training map to obtain a second bias. The adjustable parameters of the screening model are updated based on the first and second biases. The update method uses stochastic gradient descent with momentum updates. The preferred momentum range is 0.8 to 0.95; for larger batch sizes, the momentum is 0.9 to 0.95, and for smaller batch sizes, the momentum is 0.8 to 0.9. A first update step size is set, with an preferred range of 0.0001 to 0.01; for larger batch sizes, the step size is 0.0001 to 0.001, and for smaller batch sizes, the step size is 0.001 to 0.01. The update process is repeated for the first training epoch. After completing the first training epoch, the screening model is obtained. This section clarifies the correspondence between the tuberculosis screening results output by the screening model and the training target, and provides an achievable structure and update method. It uses the tuberculosis annotation content of the source center chest image set to constrain the output direction of the screening model in image-level scoring and lesion location scoring, reducing the probability that the screening model will use non-tuberculosis information as the basis for tuberculosis diagnosis, thereby reducing the probability of tuberculosis lesion identification deviation in the process of cross-center tuberculosis lesion screening.
[0093] After obtaining the screening model, the adjustable parameters of the screening model remain unchanged. The first and second representation vectors are obtained by spatial averaging the shared feature map output from the shared feature extraction part to form image-level feature vectors. The image-level feature vectors are located before the image-level tuberculosis scoring map is generated in the image-level output part. The length of the image-level feature vectors is determined by the number of channels in the last layer of the shared feature extraction part, and the length remains unchanged during training.
[0094] For each image identifier in the transformed chest image set, the corresponding transformed chest image is read and input into the screening model. Before generating the image-level tuberculosis scoring map in the image-level output section, a first representation vector is obtained. The image identifier, equipment model, scanning protocol, and the first representation vector are recorded in a first representation record table. For each image identifier in the target center chest image set, the corresponding chest image is read and input into the screening model. A second representation vector is obtained at the same location. The image identifier, equipment model, scanning protocol, and the second representation vector are recorded in a second representation record table. This process clarifies the extraction location and length source of the first and second representation vectors, enabling the transformed chest image set and the target center chest image set to form comparable internal expressions under the same screening model. This reduces the probability of misunderstanding fine-grained features in tuberculosis diagnosis when relying solely on pixel differences for cross-center adaptation.
[0095] After obtaining the first and second characterization record tables, the first characterization record table is grouped according to equipment model and scanning protocol, and the second characterization record table is also grouped according to equipment model and scanning protocol. For each group, a first pairing quantity is set, preferably ranging from 50 to 2000. When the number of image identifiers within the group is less, 50 to 300 is used; when the number of image identifiers within the group is more, 300 to 2000 is used. Several first characterization vectors are extracted from the first characterization vectors of the group according to the first pairing quantity, and several second characterization vectors are extracted from the second characterization vectors of the group. The absolute value of the difference is calculated item by item according to the same vector position to form a characterization difference vector. The mean of each item in the characterization difference vector is calculated to obtain the characterization constraint quantity of the group. The characterization constraint quantity is used to characterize the degree of deviation of the transformed chest image from the original target center chest image in the characterization space within the screening model.
[0096] The device model, scanning protocol, and characterization constraints are recorded as a characterization constraint scale. A constraint threshold is set, with an optimal range of 0.05 to 0.5. For larger ranges of the first characterization vector, a value of 0.1 to 0.5 is used; for smaller ranges, a value of 0.05 to 0.1 is used. This sub-step transfers cross-center differences from the pixel space to the internal expression space of the screening model. The characterization constraint scale characterizes the deviation between the transformed chest image set and the target center chest image set in diagnostic expression, reducing the probability that the cross-center adaptation process will rewrite fine-grained grayscale and texture differences related to tuberculosis lesions as imaging style differences, thereby reducing the risk of decreased sensitivity and specificity in tuberculosis screening.
[0097] After obtaining the representation constraint scale, a second training epoch is set, with an optimal range of 5 to 60. This range is 20 to 60 when the number of entries exceeding the constraint threshold in the representation constraint scale is greater, and 5 to 20 when the number is less. A second update step size is set, with an optimal range of 0.00005 to 0.005. This range is 0.00005 to 0.0005 when the number of entries with representation constraints greater than the constraint threshold is greater, and 0.0005 to 0.005 when the number is less. Constraint weights are set, with an optimal range of 0.05 to 1. This range is 0.3 to 1 when the number of entries exceeding the constraint threshold in the representation constraint scale is greater, and 0.05 to 0.3 when the number is less. The constraint weights are used to control the strength of the influence of the representation difference vector on the update of the adjustable parameters.
[0098] The update process is repeated in the second training round, with each round containing two types of input. The first type of input is taken from the source center chest image set. A batch of chest images and tuberculosis annotations are retrieved according to the source center training entry list. The screening model outputs image-level tuberculosis scoring maps and lesion location scoring maps, yielding the first and second biases, respectively. The second type of input is taken from the transformed chest image set and the target center chest image set. Image identifiers corresponding to the equipment model and scanning protocol are selected according to the representation constraint table. The first and second representation vectors are read one-to-one according to the image identifiers. The absolute value of the difference is calculated for each item at the same vector position, and the average value is taken to obtain the third bias. The third bias is used to characterize the representational deviation of the same image identifier under transformed and chest images.
[0099] When updating the adjustable parameters of the screening model, a joint update quantity is used. This joint update quantity is determined by a first deviation, a second deviation, and a third deviation weighted by constraint weights. The first and second deviations constrain the screening model to maintain the diagnostic direction corresponding to the source center tuberculosis annotations. The third deviation constrains the reduction of the difference between the first and second representation vectors. The second update step size controls the update magnitude of the joint update quantity. When the representation constraint exceeds the constraint threshold, the second update step size is taken near the lower limit of the preferred range, and the constraint weight is taken near the upper limit of the preferred range. When the representation constraint does not exceed the constraint threshold, the second update step size is taken near the upper limit of the preferred range, and the constraint weight is taken near the lower limit of the preferred range. After completing the second training round, a cross-center tuberculosis screening model is obtained. This section provides a calculable definition of the third deviation and gives the value range and rules for the constraint weights, allowing the representation constraint to participate in the screening model update process in a clear manner. This reduces the probability of deviation between the diagnostic expression formed by the transformed chest image set and the diagnostic expression of the target center chest image set in cross-center scenarios, thereby reducing the probability of deviation between the cross-regional tuberculosis screening output and the actual tuberculosis infection status in the images.
[0100] Example 2:
[0101] Please see Figure 2 As shown, this embodiment provides a method for detecting tuberculosis lesions on chest X-ray, including:
[0102] Chest images with tuberculosis annotations are collected from the source center to obtain the source center chest image set; chest images without tuberculosis annotations are collected from the target center to obtain the target center chest image set.
[0103] The anatomical partition table is obtained by extracting and segmenting each image from the source center chest image set; grayscale and noise statistics are performed on each partition of the anatomical partition table, and the partition index is written into the source center style codebook.
[0104] Smoothing is performed on the target center chest image set to obtain the target tone map. The target detail map is obtained by subtracting the target tone map from each image in the target center chest image set. Gray level and energy parameters are extracted from the target detail map to obtain the diagnostic fingerprint map.
[0105] Under the constraints of the anatomical partition table, grayscale and noise statistics are performed on the target tone map, and the matching identifier is determined by comparing it with the source center style codebook.
[0106] Based on the matching identifier, a segmented monotonic tone mapping is performed on the target tone map to obtain a transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The transformed tone map is used to replace the target tone map and the target detail map is superimposed to obtain a transformed chest image set.
[0107] A screening model is trained using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain the first representation vector and the second representation vector; the representation constraint is determined by the first representation vector and the second representation vector; and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model.
[0108] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting lesions on chest radiographs based on tuberculosis, characterized in that, include: Chest images with tuberculosis annotations are collected from the source center to obtain the source center chest image set; chest images without tuberculosis annotations are collected from the target center to obtain the target center chest image set. The anatomical partition table is obtained by extracting and segmenting each image from the source center chest image set; grayscale and noise statistics are performed on each partition of the anatomical partition table, and the partition index is written into the source center style codebook. Smoothing is performed on the target center chest image set to obtain the target tone map. The target detail map is obtained by subtracting the target tone map from each image in the target center chest image set. Gray level and energy parameters are extracted from the target detail map to obtain the diagnostic fingerprint map. Under the constraints of the anatomical partition table, grayscale and noise statistics are performed on the target tone map, and the matching identifier is determined by comparing it with the source center style codebook. Based on the matching identifier, a segmented monotonic tone mapping is performed on the target tone map to obtain a transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The transformed tone map is used to replace the target tone map and the target detail map is superimposed to obtain a transformed chest image set. A screening model is trained using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain the first representation vector and the second representation vector; the representation constraint is determined by the first representation vector and the second representation vector; and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model.
2. The nodule-based chest radiograph lesion detection method of claim 1, wherein, For each chest image in the target center chest image set, locate the corresponding image file based on the image identifier, extract the device model and scanning protocol, and obtain the image grayscale matrix; Image identifiers, device models, scanning protocols, and image grayscale matrices are recorded as target image processing records.
3. The nodule-based chest radiograph lesion detection method of claim 2, wherein, The tone smoothing scale is determined based on the image grayscale matrix recorded in the target image processing record. The value of the tone smoothing scale is determined based on the pixel spacing and the undulation representative value of the image grayscale matrix within the bounding box of the outer contour of the thorax. Determine the tone smoothing range, which is the area within the bounding box of the outer thoracic contour. The outer thoracic contour is obtained using the same extraction method as the source center chest image set. The area outside the bounding box of the outer thoracic contour is not included in the tone smoothing range. The image grayscale matrix is smoothed within the tone smoothing range according to the tone smoothing scale to obtain the target tone map.
4. The nodule-based chest radiograph lesion detection method of claim 3, wherein, The method for determining the representative value of the fluctuation is to slide a fixed window point by point within the bounding box of the outer contour of the thorax, calculate the absolute mean of the gray value difference between adjacent pixels in each window to obtain the window fluctuation value, and take the median of all window fluctuation values as the representative value of the fluctuation.
5. The nodule-based chest radiograph lesion detection method of claim 1, wherein, A neighborhood radius is set on the target detail map. The value of the neighborhood radius is determined based on the pixel spacing and the distribution of the window fluctuation values of the target detail map within the effective area of the lung field. Each pixel is confined to a set of neighboring pixels by a neighborhood radius. The grayscale values are compared within the set of neighboring pixels, and the relative order of the corresponding pixels in the set of neighboring pixels is recorded to obtain a grayscale sorting image. The grayscale sorted image is saved using the pixel index as the primary key, without changing the grayscale value of the target detail image.
6. The nodule-based chest radiograph lesion detection method of claim 5, wherein, Set the bandwidth range on the target detail map. The bandwidth range is determined based on the neighborhood radius and includes the lower and upper bounds of the bandwidth. When performing bandwidth processing on the target detail map within the bandwidth range, the bandwidth processing uses two smoothing differences to obtain the bandwidth processed map; When using a fixed window to count the local grayscale changes on the bandwidth processing map, the window side length is set. For each pixel index, the set of pixels in the window that covers the corresponding pixel index is determined by the window side length. The absolute values of the grayscale values in the bandwidth processing map within the set of pixels in the window are calculated and summed. Then, the sum is divided by the number of pixels in the set of pixels in the window to obtain the local energy parameter corresponding to the pixel index. The pixel index is associated with the local energy parameter and recorded to obtain the energy distribution map; After obtaining the energy distribution map, the grayscale sorting map and the energy distribution map are combined by pixel index to obtain the diagnostic fingerprint map.
7. The nodule-based chest radiograph lesion detection method of claim 1, wherein, For each image identifier in the source center chest image set, read the corresponding device model and scanning protocol, and generate a style entry index based on the device model and scanning protocol; The generation rule for the style entry index is to combine the device model and the scanning protocol in a one-to-one correspondence. Image identifiers with the same combination of device model and scanning protocol are entered into the same style entry index, and image identifiers with different combinations of device model and scanning protocol are entered into different style entry indexes. For each style entry index, the grayscale quantile table is first classified according to the partition index of the dissecting partition table. Then, the median of each quantile point in the grayscale quantile table with the same partition index is calculated to obtain the partition grayscale representative table of the corresponding style entry index under the corresponding partition index.
8. The nodule-based chest radiograph lesion detection method of claim 2, wherein, Based on the image grayscale matrix recorded in the target image processing, the outer contour of the thoracic cage is extracted for each chest image, and the effective area of the lung field is selected. In each chest image, the lung fields are effectively divided into left and right regions based on the mediastinal central line; Calculate the height range of the effective lung field area, set the number of height quantiles according to the height direction of the effective lung field area, and divide the left and right regions into multiple partitions along the height direction according to the number of height quantiles to obtain the partition boundary set; For each partition index in the anatomical partition table, the partition pixel set is extracted from the image grayscale matrix based on the partition boundary set. The target grayscale quantile table is calculated for the pixel set of the partition by quantile group, and the target grayscale quantile table is recorded with the partition index associated with the image identifier. For each pixel in the partitioned pixel set, the mapping result is determined according to the segmented boundary interval into which the corresponding pixel gray value falls, based on the target gray quantile table at both ends of the corresponding segmented boundary interval and the partitioned gray value representative table. The mapping result is determined by piecewise linear interpolation. The mapping results of each partition index are written back to the same pixel index as the target tone map to obtain the transformed tone map.
9. The nodule-based chest radiograph lesion detection method of claim 8, wherein, Based on the partition index and partition boundary set of the dissecting partition table, the fingerprint pixel set corresponding to the partition pixel set is extracted from the grayscale sorting image and the energy distribution image, respectively. For each partition index, for each pixel index in the fingerprint pixel set, the third energy upper limit is determined based on the energy distribution map, and the third sorting upper limit is determined based on the grayscale sorting map. Set the compositing rule, which is to take the smaller value between the third energy upper limit and the third sorting upper limit as the upper limit of the mapping amplitude for the same pixel index.
10. A tuberculosis-based chest radiograph lesion detection system for implementing the tuberculosis-based chest radiograph lesion detection method of any one of claims 1 to 9, characterized by, include: The data acquisition module is used to acquire chest images with tuberculosis annotations from the source center to obtain the source center chest image set; and to acquire chest images without tuberculosis annotations from the target center to obtain the target center chest image set. The style writing module is used to extract and segment the source center chest image set one by one to obtain the anatomical partition table; perform grayscale and noise statistics on each partition of the anatomical partition table, and write it into the source center style codebook according to the partition index; The fingerprint diagnostic module is used to perform smoothing processing on the target central chest image set to obtain the target tone map, and to subtract the target tone map from each image in the target central chest image set to obtain the target detail map; grayscale and energy parameters are extracted from the target detail map to obtain the diagnostic fingerprint map; The style matching module is used to perform grayscale and noise statistics on the target tone map under the constraints of the anatomical partition table, and compare it with the source center style codebook to determine the matching identifier; The tone mapping module is used to perform segmented monotonic tone mapping on the target tone map based on the matching identifier to obtain the transformed tone map. The upper limit of the mapping amplitude is constrained by the diagnostic fingerprint map. The transformed tone map is used to replace the target tone map and the target detail map is superimposed to obtain the transformed chest image set. The model training module is used to train the screening model using the source center chest image set; the transformed chest image set and the target center chest image set are input into the screening model to obtain the first representation vector and the second representation vector; the representation constraint is determined by the first representation vector and the second representation vector; and the screening model is updated according to the representation constraint to obtain the cross-center tuberculosis screening model.
Citation Information
Patent Citations
Intelligent detection method and device for fusing medical image learning image
CN121033490A
Advertisement creativity matching method based on multi-modal content generation
CN121808075A