Method and apparatus for calibrating focal spot size of an x-ray source

By using a line pair recognition model based on deep learning and closed-loop control, the focal voltage of the X-ray source is automatically adjusted, solving the problems of low efficiency and inconsistent standards in traditional manual calibration, and achieving efficient and automatic focal size calibration.

CN122307629APending Publication Date: 2026-06-30EAST CHINA UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
EAST CHINA UNIV OF SCI & TECH
Filing Date
2026-03-09
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, the calibration of the focal size of X-ray sources relies on manual inspection, which has the problems of strong subjectivity, low efficiency and inability to be automatically optimized. In particular, it is difficult to maintain the equipment in optimal condition when the X-ray tube is aging.

Method used

By employing the visual perception capabilities and closed-loop control algorithm of deep learning, the focal voltage of the X-ray source is automatically adjusted using a pre-trained line pair recognition model. By acquiring the resolvable line pair information of the X-ray projection image, the focal size is adaptively adjusted.

Benefits of technology

It achieves automatic focus calibration without manual intervention, improving calibration efficiency and consistency, ensuring that the X-ray source is always in optimal condition, and is suitable for different models of X-ray equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122307629A_ABST
    Figure CN122307629A_ABST
Patent Text Reader

Abstract

This invention relates to a method and apparatus for calibrating the focal size of an X-ray source. The method includes: acquiring the current focusing voltage of the X-ray source and an X-ray projection image of a JIMA resolution test chart under the current focusing voltage; using a pre-trained line pair recognition model to identify the X-ray projection image of the JIMA resolution test chart under the current focusing voltage to obtain resolvable line pair information of the X-ray projection image of the JIMA resolution test chart under the current focusing voltage; determining the focal size of the X-ray source under the current focusing voltage based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test chart under the current focusing voltage; and adjusting the focusing voltage of the X-ray source based on the focal size of the X-ray source under the current focusing voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of X-ray nondestructive testing technology, and more specifically to a method and apparatus for calibrating the focal size of an X-ray source. Background Technology

[0002] In the field of micro-focus X-ray nondestructive testing, the focal spot size of the X-ray source is a core indicator that determines image clarity, resolution, and testing accuracy. With the increasing demands for testing from the semiconductor, lithium battery, and precision electronics manufacturing industries, the regular calibration and condition monitoring of the X-ray source's focal spot size have become particularly important.

[0003] Currently, industry-standard testing practices (such as EN 12543 or the JIMA resolution test chart usage guidelines) primarily rely on manual testing methods. Testing personnel need to place the JIMA resolution test chart between the X-ray source and the detector, adjust the magnification to capture images, and then observe them with their eyes on a microscope or high-resolution monitor to determine which micrometer-level line pairs can be clearly distinguished, thereby calculating the focal size.

[0004] However, this manual inspection method has significant drawbacks: First, it is highly subjective. For the smallest resolvable line pair region at the current focusing voltage, the image is blurry and has low contrast within this region. Therefore, different inspectors may have different definitions of "clear resolution," leading to inconsistent calibration results. Second, existing technologies are mostly "open-loop inspections," meaning they can only inform the user of the current focus size and cannot automatically control the equipment for optimization. When X-ray tube aging causes voltage drift, manually adjusting the voltage repeatedly is time-consuming and laborious, making it difficult to maintain the equipment in optimal condition. Summary of the Invention

[0005] The purpose of this invention is to provide a method and apparatus for calibrating the focal size of an X-ray source, so as to solve the problems of low efficiency, large subjective error, and inability to automatically optimize the focal voltage by manual interpretation.

[0006] To achieve the above objectives, the present invention provides a method for calibrating the focal size of an X-ray source, comprising:

[0007] With the tube voltage and tube current determined and kept constant, acquire the current focusing voltage of the X-ray source and the X-ray projection image of the JIMA resolution test card at the current focusing voltage;

[0008] The X-ray projection image of the JIMA resolution test card under the current focusing voltage is identified using a pre-trained line pair recognition model to obtain the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0009] The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card at the current focusing voltage.

[0010] The focusing voltage of the X-ray source is adjusted based on the focal size of the X-ray source at the current focusing voltage.

[0011] Optionally, the line pair recognition model is an improved YOLOV10 model, which includes a backbone network, a neck network, and a head network. The line pair recognition model introduces an RCSOSA module in the backbone network and a RepGFPN module in the neck network.

[0012] Optionally, the distinguishable wire pair information includes the specifications of the distinguishable wire pairs;

[0013] The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image from the JIMA resolution test chart at the current focusing voltage, specifically including:

[0014] The minimum specification of the resolvable line pairs under the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0015] Based on the pre-obtained line pair specification-focal size mapping relationship, the focal size corresponding to the smallest specification of the resolvable line pair under the current focusing voltage is determined, which is used as the focal size of the X-ray source under the current focusing voltage.

[0016] Optionally, the focusing voltage of the X-ray source is adjusted based on the focal size of the X-ray source at the current focusing voltage, specifically including:

[0017] The difference between the focal size of the X-ray source at the current focusing voltage and the preset desired focal size is obtained as the focal size deviation at the current focusing voltage;

[0018] The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage;

[0019] The adjusted focusing voltage is used as the current focusing voltage, and the current focusing voltage of the X-ray source is readjusted based on the X-ray projection image of the JIMA resolution test card under the current focusing voltage. After the preset conditions are met, the calibration focusing voltage of the X-ray source is determined, and the current focusing voltage is adjusted to the calibration focusing voltage.

[0020] Optionally, the current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain an adjusted focusing voltage, specifically including:

[0021] The adjustment direction and magnitude are determined based on the focal size deviation under the current focusing voltage.

[0022] The current focusing voltage is adjusted based on the adjustment direction and adjustment magnitude to obtain the adjusted focusing voltage.

[0023] Another aspect of the present invention provides a focal size calibration device for an X-ray source, comprising:

[0024] The acquisition module is used to acquire the current focusing voltage of the X-ray source and the X-ray projection image of the JIMA resolution test card under the current focusing voltage, provided that the tube voltage and tube current are determined and remain constant.

[0025] The recognition module is used to recognize the X-ray projection image of the JIMA resolution test card under the current focusing voltage using a pre-trained line pair recognition model, so as to obtain the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0026] The determination module is used to determine the focal size of the X-ray source at the current focusing voltage based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card at the current focusing voltage.

[0027] The adjustment module is used to adjust the focusing voltage of the X-ray source based on the focal size of the X-ray source at the current focusing voltage.

[0028] Optionally, the line pair recognition model is an improved YOLOV10 model, which includes a backbone network, a neck network, and a head network. The line pair recognition model introduces an RCSOSA module in the backbone network and a RepGFPN module in the neck network.

[0029] Optionally, the distinguishable wire pair information includes the specifications of the distinguishable wire pairs;

[0030] The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image from the JIMA resolution test chart at the current focusing voltage, specifically including:

[0031] The minimum specification of the resolvable line pairs under the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0032] Based on the pre-obtained line pair specification-focal size mapping relationship, the focal size corresponding to the smallest specification of the resolvable line pair under the current focusing voltage is determined, which is used as the focal size of the X-ray source under the current focusing voltage.

[0033] Optionally, the focusing voltage of the X-ray source is adjusted based on the focal size of the X-ray source at the current focusing voltage, specifically including:

[0034] The difference between the focal size of the X-ray source at the current focusing voltage and the preset desired focal size is obtained as the focal size deviation at the current focusing voltage;

[0035] The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage;

[0036] The adjusted focusing voltage is used as the current focusing voltage, and the current focusing voltage of the X-ray source is readjusted based on the X-ray projection image of the JIMA resolution test card under the current focusing voltage. After the preset conditions are met, the calibration focusing voltage of the X-ray source is determined, and the current focusing voltage is adjusted to the calibration focusing voltage.

[0037] Optionally, the current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain an adjusted focusing voltage, specifically including:

[0038] The adjustment direction and magnitude are determined based on the focal size deviation under the current focusing voltage.

[0039] The current focusing voltage is adjusted based on the adjustment direction and adjustment magnitude to obtain the adjusted focusing voltage.

[0040] The X-ray source focal size calibration method and apparatus of the present invention can automatically adjust the focal state of the X-ray source to the optimal state without any human intervention, by utilizing the visual perception capability of deep learning and closed-loop control algorithm, effectively solving the problems of low efficiency and inconsistent standards of traditional manual calibration. Attached Figure Description

[0041] Figure 1 This is a flowchart of a focal size calibration method for an X-ray source according to an embodiment of the present invention;

[0042] Figure 2 This is a structural block diagram of an X-ray source focal size calibration device according to an embodiment of the present invention. Detailed Implementation

[0043] The preferred embodiments of the present invention are given below with reference to the accompanying drawings and described in detail.

[0044] like Figure 1 As shown, this embodiment of the invention provides a method for calibrating the focal size of an X-ray source, which includes the following steps:

[0045] S100: With the tube voltage and tube current determined and kept constant, acquire the current focusing voltage of the X-ray source and the X-ray projection image of the JIMA resolution test card at the current focusing voltage.

[0046] The X-ray source focal size calibration method of this invention is applied to, for example... Figure 2 The X-ray detection system shown includes an X-ray source, a JIMA resolution test chart, a detector, and a control device (e.g., a server). The X-ray source emits X-rays, and the X-ray source, JIMA resolution test chart, and detector are arranged sequentially along the X-ray transmission direction. After passing through the JIMA resolution test chart, the X-rays irradiate the detector, which detects the X-ray projection image of the JIMA resolution test chart. The control device is connected to the X-ray source and detector, and the focal size calibration method of the X-ray source is specifically applied in the control device. The method of this embodiment is used to adjust the focusing voltage to the required focusing size under different tube voltages and tube currents. The tube voltage refers to the high voltage potential difference between the cathode and anode, and the tube current is mainly determined by the heating current of the cathode filament. The tube voltage and tube current can be controlled automatically by the instrument.

[0047] The control device can acquire tube current and tube voltage at different times. When the tube current and tube voltage are determined, the control device can sample the X-ray projection image of the JIMA resolution test card detected by the detector according to a preset sampling rate. Therefore, the control device can acquire X-ray projection images of the JIMA resolution test card at different sampling times. Simultaneously, at each sampling time, the control device can also acquire the focusing voltage of the X-ray source at that sampling time. The current focusing voltage refers to the focusing voltage of the X-ray source at the current sampling time, and the X-ray projection image of the JIMA resolution test card at the current focusing voltage refers to the X-ray projection image of the JIMA resolution test card at the current sampling time.

[0048] S200: The X-ray projection image of the JIMA resolution test card under the current focusing voltage is identified using a pre-trained line pair recognition model to obtain the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0049] The line pair recognition model can be an improved YOLOv10 model. The YOLOv10 model includes a backbone network, a neck network, and a head network. The backbone network extracts features from the input image, generating feature maps at three different scales. The neck network fuses these feature maps to obtain a fused multi-scale feature map, enabling cross-scale transfer of feature information. The head network performs regression and classification operations on the fused multi-scale feature map to output prediction results, including target bounding box parameters, class probabilities, and confidence scores. The line pair recognition model used in this invention improves upon the YOLOv10 model as follows:

[0050] 1) An RCSOSA (Reparameterized Convolution based on ChannelShuffle and One-Shot Aggregation) module is introduced into the backbone network. RCSOSA utilizes channel shuffle technology to shuffle and recombine feature channels from different groups, breaking the independence between channels and enabling the model to capture richer contextual information. Simultaneously, this module employs a reparameterized structure, using multi-branch feature extraction during training and merging them into a single-path convolution during inference, ensuring detection speed.

[0051] To facilitate information exchange between different feature channels and enhance the model's ability to discriminate weak texture features, RCSOSA introduces a channel shuffling operation. Assume the input feature map is X, with dimensions (N, C, H, W), where N is the batch size, C is the number of channels, and H and W are the spatial dimensions. Channel C is divided into g groups, with each group containing C' = C / g channels. The channel shuffling operation comprises the following three steps:

[0052] Step 1 (Reshape): Reshape the channel dimension of the input feature map into two dimensions (g, C'):

[0053]

[0054] Step 2 (Transpose): Swap the group dimension g and the intra-group channel dimension C':

[0055]

[0056] Step 3 (Flatten): Flatten the transposed dimension back to the original channel dimension C:

[0057]

[0058] Through the above operations, feature information from different groups is combined in the next convolutional layer, breaking the independence between channels and improving the richness of feature extraction.

[0059] The convolutional units in the RCSOSA module employ a reparameterized structure to achieve "multi-branch training, single-path inference." During the training phase, to enrich the gradient flow and improve training performance, the convolutional layer consists of three parallel branches: a 3x3 convolution, a 1x1 convolution, and an identity mapping (which exists when the input and output dimensions are the same). For the input feature X... in The output Y during training train The calculation is as follows:

[0060]

[0061] Inference Phase: Utilizing the linear superposition principle of convolution operations, the weights and biases of the multiple branches are merged into a standard 3x3 convolution kernel. Assume the merged weights are W. fused The bias is b fused Then the output Y during inference infer for:

[0062]

[0063] This structural design significantly improves the model's ability to extract features from tiny line pairs on the JIMA card without increasing inference time.

[0064] 2) Introduce the RepGFPN (Reparameterized Generalized Feature Pyramid Network) model into the neck network. Through reparameterization mechanism and complex skip connections, RepGFPN greatly enhances the fusion ability of deep semantic features and shallow texture features without increasing inference time, and effectively prevents the loss of small line pair features after multiple downsampling.

[0065] The core of RepGFPN (Reparameterized Generalized Feature Pyramid Network) lies in its "multi-branch training, single-path inference" approach. During training, the feature fusion layer employs a multi-branch structure (including skip connections and 1x1 convolutions) to enrich the gradient flow. During inference, reparameterization techniques are used to merge the weights from the multiple branches. Assuming a layer contains a convolutional layer (weights W, bias b) and a batch normalization layer, the equivalent weights W' and bias b' after merging are calculated using the following formulas:

[0066] The formulas for calculating the combined equivalent weight W' and bias b' are as follows:

[0067]

[0068]

[0069] Through the above transformation, when RepGFPN is used to detect JIMA cards, the network structure is simplified to a single-path convolution, which greatly improves the inference speed (FPS) while maintaining high-precision feature fusion.

[0070] The training method for the line pair recognition model is as follows:

[0071] Multiple X-ray projection images of the JIMA resolution test card at different angles, focusing voltages, and exposure times were acquired, with each image serving as a sample image. Each sample image was labeled, i.e., its resolvable line pair information was marked, to obtain the label of each sample image. The resolvable line pair information included the position, specifications, and confidence level of clearly visible line pairs on the sample image.

[0072] Data augmentation is performed on each sample image and its corresponding label to expand sample diversity and prevent overfitting. Specific operations include: random cropping, multi-angle rotation, mirror flipping, HSV color space transformation (simulating imaging differences under different X-ray energy spectra), and adding Gaussian noise or Poisson noise (simulating imaging noise of the detector at low doses).

[0073] The pre-set line pair recognition model is trained using the data-enhanced sample images and their corresponding labels to obtain the trained line pair recognition model.

[0074] The pre-defined line pair recognition model is trained using data-augmented sample images and their corresponding labels, specifically including:

[0075] Each sample image and its corresponding label are input into a preset line pair recognition model, so that the line pair recognition model outputs the predicted value corresponding to the sample image based on the sample image.

[0076] The loss function is determined based on the predicted value and label corresponding to each sample image. The parameters of the line pair recognition model are updated with the goal of minimizing the loss function.

[0077] To improve the localization accuracy of small targets, CIoU (Complete Intersection over Union) or WIoU (Intelligent Intersection over Union) can be used as the bounding box regression loss function, and their calculation formulas are as follows:

[0078] Assume the predicted bounding box is B and the ground truth bounding box is B.gt First, calculate the intersection-union ratio (IoU):

[0079]

[0080] If the CIoU loss function is sampled, its formula introduces penalty terms for center point distance and aspect ratio:

[0081]

[0082] in, (b, b gt ) represents the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box, c is the diagonal length of the minimum bounding rectangle, α is the weighting coefficient, and v is the aspect ratio consistency parameter, which is calculated using the following formula:

[0083]

[0084] If WIoU is used, a dynamic non-monotonic focusing mechanism is introduced to reduce the weight of simple samples and focus on difficult samples:

[0085]

[0086] This mechanism can effectively improve the model's ability to identify ambiguous critical line pairs.

[0087] During training, mean precision (mAP) can be used as a metric to determine if training is successful. First, define precision (P) and recall (R):

[0088]

[0089] Wherein, TP: the number of positive samples correctly identified by the model.

[0090] FP: The number of negative samples that the model incorrectly identifies as positive samples.

[0091] FN: The number of positive samples that the model incorrectly identifies as negative samples.

[0092] For line pair category i (i.e., line pair specification), its average accuracy is calculated by integration:

[0093]

[0094] The final mAP is the average AP across all N categories:

[0095]

[0096] To avoid the model getting stuck in a local optimum, the learning rate η during training... t With the number of iterations T curIt exhibits cosine decay:

[0097]

[0098] Where, η t Let η be the initial learning rate. min To minimize the learning rate, T max This represents the total iteration period.

[0099] Once the line pair recognition model is trained, it can identify the resolvable line pair information of the X-ray projection image. Specifically, the X-ray projection image of the JIMA resolution test card under the current focusing voltage can be input into the trained line pair recognition model, and then the line pair recognition model will output its resolvable line pair information.

[0100] S300: Determines the focal size of the X-ray source at the current focusing voltage based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card at the current focusing voltage.

[0101] As mentioned earlier, the resolvable line pair information includes the specifications, location, and confidence level of the resolvable line pair. Therefore, the minimum specification (i.e., the highest precision) of the resolvable line pair can be determined based on the resolvable line pair information. Then, based on the pre-acquired line pair specification-focal size mapping relationship, the focal size corresponding to the minimum specification of the resolvable line pair can be determined, which is the focal size of the X-ray source under the current focusing voltage.

[0102] S400: Adjusts the focusing voltage of the X-ray source based on the focal size of the X-ray source at the current focusing voltage.

[0103] In some embodiments, step S400 specifically includes:

[0104] S410: Obtain the difference between the focal size of the X-ray source at the current focusing voltage and the preset desired focal size, and use it as the focal size deviation at the current focusing voltage.

[0105] The focal size deviation at the current focusing voltage is obtained by subtracting the desired focal size from the focal size at the current focusing voltage.

[0106] S420: Adjust the current focusing voltage based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage.

[0107] Step S420 specifically includes:

[0108] The adjustment direction and magnitude are determined based on the focal size deviation under the current focusing voltage.

[0109] The current focusing voltage is adjusted based on the adjustment direction and adjustment magnitude to obtain the adjusted focusing voltage.

[0110] Specifically, when the focal size deviation under the current focusing voltage is greater than 0, the adjustment direction is to decrease the current focusing voltage; when the focal size deviation under the current focusing voltage is less than 0, the adjustment direction is to increase the current focusing voltage. When the absolute value of the focal size deviation under the current focusing voltage is greater than a first threshold, the adjustment size is the first step value; when the absolute value of the focal size deviation under the current focusing voltage is greater than a second threshold and less than or equal to the first threshold, the adjustment size is the second step value; wherein the second threshold is less than the first threshold, and the second step value is less than the first step value; when the absolute value of the focal size deviation under the current focusing voltage is less than or equal to the second threshold, the adjustment size is 0.

[0111] Using the above method, when the focal size deviation is large, the adjustment amount of the current focusing voltage is also large, and when the focal size deviation is small, the adjustment amount of the current focusing voltage is also small. This can achieve adaptive gradient adjustment of the focusing voltage, greatly improve the convergence efficiency of voltage adjustment, and quickly make the voltage tend to the calibrated focusing voltage.

[0112] The specific values ​​of the first threshold, the second threshold, the first step value, and the second step value can be set as needed.

[0113] S430: The adjusted focusing voltage is used as the current focusing voltage again, and the current focusing voltage of the X-ray source is readjusted based on the X-ray projection image of the JIMA resolution test card under the current focusing voltage; until the preset conditions are met, the calibration focusing voltage of the X-ray source is determined, and the current focusing voltage is adjusted to the calibration focusing voltage.

[0114] After each adjustment of the focusing voltage, the adjusted focusing voltage can be obtained. The control device can change the focusing voltage of the X-ray source to the adjusted focusing voltage, and then use the adjusted focusing voltage as the current focusing voltage. Steps S100-S400 are repeated to obtain the X-ray projection image under the adjusted focusing voltage. Then, the adjusted focusing voltage is adjusted again based on the X-ray projection image. This process is repeated to achieve continuous adjustment of the focusing voltage.

[0115] After each adjustment of the current focusing voltage, it can be determined whether the preset conditions are met. The preset conditions can be that the focal size deviation of the three most recent current focusing voltages is less than the second threshold or the focal size reaches the desired focal size. If the preset conditions are not met, the voltage adjustment continues in a loop. If the preset conditions are met, the calibration focusing voltage can be determined based on the three most recent current focusing voltages. For example, the average value of the three most recent current focusing voltages can be taken as the calibration focusing voltage. Then the loop is exited and the focusing voltage of the X-ray source is adjusted to the calibration focusing voltage.

[0116] The X-ray source focal size calibration method of this invention can automatically adjust the focal state of the X-ray source to the optimal state without any manual intervention by utilizing the visual perception capability of deep learning and closed-loop control algorithm. This effectively solves the problems of low efficiency and inconsistent standards in traditional manual calibration. In addition, this method has good adaptability to different models of X-ray equipment and is highly portable and practical.

[0117] like Figure 2 As shown, this embodiment of the invention also provides a focal size calibration device for an X-ray source, which includes: an acquisition module 10, an identification module 20, a determination module 30, and an adjustment module 40.

[0118] The acquisition module 10 is used to acquire the current focusing voltage of the X-ray source and the X-ray projection image of the JIMA resolution test card under the current focusing voltage;

[0119] The recognition module 20 is used to recognize the X-ray projection image of the JIMA resolution test card under the current focusing voltage using a pre-trained line pair recognition model, so as to obtain the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0120] The determination module 30 is used to determine the focal size of the X-ray source at the current focusing voltage based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card at the current focusing voltage;

[0121] The adjustment module 40 is used to adjust the focusing voltage of the X-ray source based on the focal size of the X-ray source at the current focusing voltage.

[0122] In some embodiments, the line pair recognition model is an improved YOLOV10 model, which includes a backbone network, a neck network, and a head network. The line pair recognition model introduces an RCSOSA module in the backbone network and a RepGFPN module in the neck network.

[0123] In some embodiments, the distinguishable wire pair information includes the specifications of the distinguishable wire pairs;

[0124] The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image from the JIMA resolution test chart at the current focusing voltage, specifically including:

[0125] The minimum specification of the resolvable line pairs under the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage.

[0126] Based on the pre-obtained line pair specification-focal size mapping relationship, the focal size corresponding to the smallest specification of the resolvable line pair under the current focusing voltage is determined, which is used as the focal size of the X-ray source under the current focusing voltage.

[0127] In some embodiments, adjusting the focusing voltage of the X-ray source based on the focal size of the X-ray source at the current focusing voltage specifically includes:

[0128] The difference between the focal size of the X-ray source at the current focusing voltage and the preset desired focal size is obtained as the focal size deviation at the current focusing voltage;

[0129] The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage;

[0130] The adjusted focusing voltage is used as the current focusing voltage again, and the current focusing voltage of the X-ray source is readjusted based on the X-ray projection image of the JIMA resolution test card under the current focusing voltage (that is, the acquisition module 10, identification module 20, determination module 30 and adjustment module 40 are re-executed). After the preset conditions are met, the calibration focusing voltage of the X-ray source is determined, and the current focusing voltage is adjusted to the calibration focusing voltage.

[0131] In some embodiments, the current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain an adjusted focusing voltage, specifically including:

[0132] The adjustment direction and magnitude are determined based on the focal size deviation under the current focusing voltage.

[0133] The current focusing voltage is adjusted based on the adjustment direction and adjustment magnitude to obtain the adjusted focusing voltage.

[0134] The X-ray source focal size calibration device of this invention can automatically adjust the focal state of the X-ray source to the optimal state without any manual intervention, by utilizing the visual perception capability of deep learning and closed-loop control algorithm. This effectively solves the problems of low efficiency and inconsistent standards in traditional manual calibration. In addition, this method has good adaptability to different models of X-ray equipment, and is highly portable and practical.

[0135] Another embodiment of the present invention provides a readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, it causes the computer to perform the steps of the X-ray source focal size calibration method in the above embodiments of the present invention.

[0136] Another embodiment of the present invention provides an electronic device, which includes a memory and a processor. The memory stores executable code. When the processor executes the executable code, it performs the steps of the X-ray source focal size calibration method in the above embodiments of the present invention.

[0137] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0138] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing this invention, the functions of each unit can be implemented in one or more software and / or hardware components.

[0139] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.

[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0143] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0144] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0145] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by electronic devices. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0146] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0147] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0148] This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0149] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0150] The foregoing has described specific embodiments of the invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0151] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of the invention. Various variations can be made to the above embodiments of the present invention. That is, all simple and equivalent changes and modifications made based on the claims and description of this invention fall within the protection scope of the claims of this patent. All aspects not described in detail in this invention are conventional technical content.

Claims

1. A method for calibrating the focal size of an X-ray source, characterized in that, include: With the tube voltage and tube current determined and kept constant, acquire the current focusing voltage of the X-ray source and the X-ray projection image of the JIMA resolution test card at the current focusing voltage; The X-ray projection image of the JIMA resolution test card under the current focusing voltage is identified using a pre-trained line pair recognition model to obtain the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage. The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card at the current focusing voltage. The focusing voltage of the X-ray source is adjusted based on the focal size of the X-ray source at the current focusing voltage.

2. The method for calibrating the focal size of an X-ray source according to claim 1, characterized in that, The line pair recognition model is an improved YOLOV10 model, which includes a backbone network, a neck network, and a head network. The line pair recognition model introduces an RCSOSA module in the backbone network and a RepGFPN module in the neck network.

3. The method for calibrating the focal size of an X-ray source according to claim 1, characterized in that, The distinguishable line pair information includes the specifications of the distinguishable line pairs; The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image from the JIMA resolution test chart at the current focusing voltage, specifically including: The minimum specification of the resolvable line pairs under the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage. Based on the pre-obtained line pair specification-focal size mapping relationship, the focal size corresponding to the smallest specification of the resolvable line pair under the current focusing voltage is determined, which is used as the focal size of the X-ray source under the current focusing voltage.

4. The method for calibrating the focal size of an X-ray source according to claim 1, characterized in that, The focusing voltage of the X-ray source is adjusted based on the focal size of the X-ray source at the current focusing voltage, specifically including: The difference between the focal size of the X-ray source at the current focusing voltage and the preset desired focal size is obtained as the focal size deviation at the current focusing voltage; The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage; The adjusted focusing voltage is used as the current focusing voltage, and the current focusing voltage of the X-ray source is readjusted based on the X-ray projection image of the JIMA resolution test card under the current focusing voltage. After the preset conditions are met, the calibration focusing voltage of the X-ray source is determined, and the current focusing voltage is adjusted to the calibration focusing voltage.

5. The method for calibrating the focal size of an X-ray source according to claim 4, characterized in that, The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage, specifically including: The adjustment direction and magnitude are determined based on the focal size deviation under the current focusing voltage. The current focusing voltage is adjusted based on the adjustment direction and adjustment magnitude to obtain the adjusted focusing voltage.

6. A focal spot size calibration device for an X-ray source, characterized in that, include: The acquisition module is used to acquire the current focusing voltage of the X-ray source and the X-ray projection image of the JIMA resolution test card under the current focusing voltage, provided that the tube voltage and tube current are determined and remain constant. The recognition module is used to recognize the X-ray projection image of the JIMA resolution test card under the current focusing voltage using a pre-trained line pair recognition model, so as to obtain the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage. The determination module is used to determine the focal size of the X-ray source at the current focusing voltage based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card at the current focusing voltage. The adjustment module is used to adjust the focusing voltage of the X-ray source based on the focal size of the X-ray source at the current focusing voltage.

7. The focal size calibration device for an X-ray source according to claim 6, characterized in that, The line pair recognition model is an improved YOLOV10 model, which includes a backbone network, a neck network, and a head network. The line pair recognition model introduces an RCSOSA module in the backbone network and a RepGFPN module in the neck network.

8. The focal size calibration device for an X-ray source according to claim 6, characterized in that, The distinguishable line pair information includes the specifications of the distinguishable line pairs; The focal size of the X-ray source at the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image from the JIMA resolution test chart at the current focusing voltage, specifically including: The minimum specification of the resolvable line pairs under the current focusing voltage is determined based on the resolvable line pair information of the X-ray projection image of the JIMA resolution test card under the current focusing voltage. Based on the pre-obtained line pair specification-focal size mapping relationship, the focal size corresponding to the smallest specification of the resolvable line pair under the current focusing voltage is determined, which is used as the focal size of the X-ray source under the current focusing voltage.

9. The focal size calibration device for an X-ray source according to claim 6, characterized in that, The focusing voltage of the X-ray source is adjusted based on the focal size of the X-ray source at the current focusing voltage, specifically including: The difference between the focal size of the X-ray source at the current focusing voltage and the preset desired focal size is obtained as the focal size deviation at the current focusing voltage; The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage; The adjusted focusing voltage is used as the current focusing voltage, and the current focusing voltage of the X-ray source is readjusted based on the X-ray projection image of the JIMA resolution test card under the current focusing voltage. After the preset conditions are met, the calibration focusing voltage of the X-ray source is determined, and the current focusing voltage is adjusted to the calibration focusing voltage.

10. The focal size calibration device for an X-ray source according to claim 9, characterized in that, The current focusing voltage is adjusted based on the focal size deviation under the current focusing voltage to obtain the adjusted focusing voltage, specifically including: The adjustment direction and magnitude are determined based on the focal size deviation under the current focusing voltage. The current focusing voltage is adjusted based on the adjustment direction and adjustment magnitude to obtain the adjusted focusing voltage.