Beam spot position acquisition method and device

By automatically obtaining and detecting fluorescent target images, calculating the average bullseye position, and combining beam current detection, accurately locate the beam spot position, solving the problem of easily disturbed artificial observation and achieving high-precision beam spot positioning.

CN120076148AActive Publication Date: 2025-05-30INST OF MODERN PHYSICS CHINESE ACADEMY OF SCI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510552197.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-05-30
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

In the prior art, positioning the beam spot position depends on manual observation of the fluorescent target, which is susceptible to interference from external factors, resulting in misjudgment of position.

Method used

By periodically obtaining the fluorescent target image, detecting the position of the bull's eye, and calculating the average value. After detecting the beam current, the picture containing the beam spot is obtained, and the final beam spot position is converted.

Benefits of technology

It realizes accurate positioning of the beam spot position and strong anti-environmental interference ability, ensuring accurate positioning of the beam spot position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120076148A_ABST
    Figure CN120076148A_ABST
Patent Text Reader

Abstract

The invention discloses a beam spot position obtaining method and device, and relates to the field of particle accelerators, and the method comprises the steps: periodically obtaining a fluorescent target picture when a beam is not detected; detecting the fluorescent target picture to obtain the target center position of the fluorescent target picture; target center positions of all the fluorescent target pictures are obtained, and the average value of all the target center positions is calculated; when the beam is detected, obtaining a fluorescence target picture containing beam spots; detecting the fluorescence target picture containing the beam spot to obtain the beam spot position of the fluorescence target picture; and converting the beam spot position of the fluorescent target picture according to the average value to obtain a final beam spot position. By detecting the fluorescent target image containing the beam spot, the position of the beam spot can be accurately determined. According to the method, the influence of light interference information can be effectively avoided, high accuracy can still be kept even in different illumination environments, and therefore accurate positioning of the beam spot position is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of particle accelerators, and particularly to a method and device for obtaining the position of a beam spot. Background Art

[0002] Beam tuning in an accelerator is a crucial step in particle accelerator operation and is widely used in high-energy physics experiments, medical treatment, material research, and other fields. The performance and stability of the particle beam directly affect the accuracy of experimental results. Therefore, it is crucial to precisely adjust various parameters of the accelerator to ensure that the beam current meets the expected experimental requirements. The beam tuning process includes beam current intensity adjustment, beam quality optimization, and beam trajectory adjustment. Among them, locating the position of the beam spot is the key to adjusting the trajectory, which determines the precise transmission and final effect of the particle beam.

[0003] Currently, the method for locating the position of the beam spot mainly relies on the way of manual observation of the fluorescent target. The operator places a fluorescent target in the accelerator and estimates the specific position of the beam spot based on the light emission signal on the fluorescent target. However, the way of manual observation depends on human eye observation and judgment and is easily interfered by external factors such as light and equipment accuracy, resulting in misjudgment of the beam spot position.

[0004] Therefore, how to accurately locate the position of the beam spot has become an urgent problem to be solved in this field. Summary of the Invention

[0005] This application provides a method and device for obtaining the position of a beam spot, aiming to accurately locate the position of the beam spot.

[0006] To achieve the above object, this application provides the following technical solutions:

[0007] A method for obtaining the position of a beam spot includes:

[0008] Periodically obtain fluorescent target pictures when no beam current is detected;

[0009] Detect the fluorescent target pictures to obtain the center position of the fluorescent target pictures;

[0010] Obtain the center positions of all fluorescent target pictures and calculate the average value of all center positions;

[0011] When a beam current is detected, obtain a fluorescent target picture containing a beam spot;

[0012] Detect the fluorescent target picture containing a beam spot to obtain the beam spot position of the fluorescent target picture;

[0013] Convert the beam spot position of the fluorescent target picture according to the average value to obtain the final beam spot position.

[0014] Optionally, detecting the fluorescent target picture to obtain the center position of the fluorescent target picture includes:

[0015] Input the fluorescent target picture into the target detection model to obtain a first rectangular detection frame; the target detection model is pre-trained from an initial target detection model using a sample fluorescent target picture containing a beam spot; the initial target detection model is trained based on the sample fluorescent target picture as input;

[0016] Obtain the pixel coordinates of the first corner position and the pixel coordinates of the second corner position from the first rectangular detection frame;

[0017] Calculate the center position of the fluorescent target picture according to the pixel coordinates of the first corner position and the pixel coordinates of the second corner position.

[0018] Optionally, the process of training the initial target detection model based on the sample fluorescent target picture as input includes:

[0019] Obtain the sample fluorescent target picture;

[0020] Input the sample fluorescent target picture into the initial target detection model to obtain a first sample rectangular detection frame;

[0021] Calculate the loss function between the first sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescent target picture;

[0022] If the loss function does not converge, adjust the model parameters of the initial target detection model and return to execute the step of inputting the sample fluorescent target picture into the initial target detection model to obtain a first sample rectangular detection frame;

[0023] If the loss function converges, determine that the training of the initial target detection model is completed.

[0024] Optionally, the process of training the initial target detection model with a sample fluorescent target picture containing a beam spot to obtain the target detection model includes:

[0025] Obtain the sample fluorescent target picture containing a beam spot;

[0026] Input the sample fluorescent target picture containing a beam spot into the initial target detection model to obtain a second sample rectangular detection frame;

[0027] Calculate the loss function between the second sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescent target picture containing a beam spot;

[0028] If the loss function does not converge, adjust the model parameters of the initial target detection model, and return to execute the step of inputting the sample fluorescent target picture containing the beam spot into the initial target detection model to obtain a second sample rectangular detection frame;

[0029] If the loss function converges, determine the initial target detection model as the target detection model.

[0030] Optionally, the detecting the fluorescent target picture containing the beam spot to obtain the beam spot position of the fluorescent target picture includes:

[0031] Input the fluorescent target picture containing the beam spot into the target detection model to obtain a second rectangular detection frame;

[0032] Obtain the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position from the second rectangular detection frame;

[0033] Calculate the beam spot position of the fluorescent target picture according to the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position.

[0034] Optionally, the converting the beam spot position of the fluorescent target picture according to the average value to obtain the final beam spot position includes:

[0035] Calculate the difference between the abscissa in the average value and the abscissa in the beam spot position of the fluorescent target picture to obtain the abscissa difference;

[0036] Calculate the difference between the ordinate in the average value and the ordinate in the beam spot position of the fluorescent target picture to obtain the ordinate difference;

[0037] Determine the abscissa difference and the ordinate difference as the final beam spot position.

[0038] An apparatus for obtaining the beam spot position includes:

[0039] A first obtaining unit, configured to periodically obtain a fluorescent target picture when no beam current is detected;

[0040] A first detecting unit, configured to detect the fluorescent target picture to obtain the target center position of the fluorescent target picture;

[0041] A calculating unit, configured to obtain the target center positions of all fluorescent target pictures and calculate the average value of all target center positions;

[0042] A second obtaining unit, configured to obtain a fluorescent target picture containing a beam spot when a beam current is detected;

[0043] A second detection unit for detecting the fluorescence target picture containing the beam spot to obtain the position of the beam spot in the fluorescence target picture;

[0044] A conversion unit for converting the position of the beam spot in the fluorescence target picture according to the average value to obtain the final beam spot position.

[0045] Optionally, the first detection unit includes:

[0046] An input subunit for inputting the fluorescence target picture into a target detection model to obtain a first rectangular detection frame; the target detection model is pre-trained from an initial target detection model using a sample fluorescence target picture containing a beam spot; the initial target detection model is trained based on the sample fluorescence target picture as input;

[0047] An acquisition subunit for acquiring the pixel coordinates of the first corner position and the pixel coordinates of the second corner position from the first rectangular detection frame;

[0048] A calculation subunit for calculating the center position of the target in the fluorescence target picture according to the pixel coordinates of the first corner position and the pixel coordinates of the second corner position.

[0049] Optionally, the input subunit is specifically configured to:

[0050] Obtain a sample fluorescence target picture;

[0051] Input the sample fluorescence target picture into the initial target detection model to obtain a first sample rectangular detection frame;

[0052] Calculate the loss function between the first sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescence target picture;

[0053] If the loss function does not converge, adjust the model parameters of the initial target detection model and return to execute the step of inputting the sample fluorescence target picture into the initial target detection model to obtain a first sample rectangular detection frame;

[0054] If the loss function converges, determine that the training of the initial target detection model is completed.

[0055] Optionally, the input subunit is specifically configured to:

[0056] Obtain a sample fluorescence target picture containing a beam spot;

[0057] Input the sample fluorescence target picture containing a beam spot into the initial target detection model to obtain a second sample rectangular detection frame;

[0058] Calculate the loss function between the second sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescence target image containing the beam spot;

[0059] If the loss function does not converge, adjust the model parameters of the initial target detection model, and return to execute the step of inputting the sample fluorescence target image containing the beam spot into the initial target detection model to obtain the second sample rectangular detection frame;

[0060] If the loss function converges, determine the initial target detection model as the target detection model.

[0061] The technical solution provided by this application, when no beam current is detected, periodically acquires fluorescence target images; detects the fluorescence target images to obtain the target center positions of the fluorescence target images; acquires the target center positions of all fluorescence target images and calculates the average value of all target center positions; when beam current is detected, acquires the fluorescence target image containing the beam spot; detects the fluorescence target image containing the beam spot to obtain the beam spot position of the fluorescence target image; converts the beam spot position of the fluorescence target image according to the average value to obtain the final beam spot position. By detecting the fluorescence target image containing the beam spot, the position of the beam spot can be accurately determined. This method has stronger anti-environmental interference information ability than the method based on image processing, and can still maintain high accuracy even under different environmental lighting conditions, thus ensuring the accurate positioning of the beam spot position. Description of the Drawings

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0063] Figure 1 It is a flowchart of a method for obtaining the beam spot position provided by an embodiment of the present application;

[0064] Figure 2 It is a flowchart of a method for detecting a fluorescence target image provided by an embodiment of the present application;

[0065] Figure 3 It is a flowchart of a method for training an initial target detection model provided by an embodiment of the present application;

[0066] Figure 4 It is a flowchart of a method for training a target detection model provided by an embodiment of the present application;

[0067] Figure 5Flow chart of a detection method for a fluorescence target image including a beam spot provided by an embodiment of the present application;

[0068] Figure 6 Schematic diagram of a fluorescence target image provided by an embodiment of the present application;

[0069] Figure 7 Schematic architecture diagram of a device for obtaining the beam spot position provided by an embodiment of the present application. Detailed implementation manners

[0070] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0071] In the present application, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0072] As Figure 1 shown, it is a flow chart of a method for obtaining the beam spot position provided by an embodiment of the present application, including the following steps:

[0073] S101: When no beam current is detected, periodically obtain fluorescence target images.

[0074] Among them, the beam current refers to the group of particles accelerated in the accelerator, which will reach the target area at a certain moment, and the fluorescence target image refers to the image of the surface of the fluorescence target captured by the camera.

[0075] Optionally, to periodically obtain fluorescence target images, a fluorescence target image can be obtained every 1 second, or a fluorescence target image can be obtained every 5 seconds. Each obtained fluorescence target image is different. Specifically, fluorescence target images can be obtained periodically through logical statements. The logical statement can be: image = caget(“VS01.image”), where “VS01.image” is the PV name, and caget() is to further improve the accuracy of the obtained target center coordinates.

[0076] For example, run the logic statement every 1 second for three times to obtain three different fluorescent target pictures.

[0077] It should be noted that the fluorescent target pictures can be obtained from the control network in real time in the form of process variables (such as PV) through a control framework (such as EPICS).

[0078] In addition, a control framework is used to control multiple devices on the accelerator. For example, data is read from beam measurement devices or the excitation power supply is controlled.

[0079] S102: Detect the fluorescent target pictures to obtain the center position of the fluorescent target in the pictures.

[0080] Among them, the center position of the fluorescent target picture includes the center coordinates.

[0081] It can be understood that when the beam has not arrived, the surface of the fluorescent target is stationary and not affected by the particle beam or laser beam. Therefore, the position error in the picture is small, and the center coordinates of the target can accurately reflect the actual position of the target. When the beam arrives, the target will produce a fluorescent reaction due to the irradiation of particles or light beams, and this reaction may cause slight deformation or displacement of the target surface physically, affecting the accuracy of the image. Therefore, obtaining the picture before the beam arrives can ensure the stability and accuracy of the center coordinates of the target more effectively.

[0082] It should be noted that for the detection of the fluorescent target pictures, specifically, extract the rectangular frame containing the center of the fluorescent target picture; determine the center position of the target according to the rectangular frame containing the center of the target.

[0083] Optionally, in another embodiment of the present application, the specific implementation manner of step S102 is as Figure 2 shown, and includes the following steps:

[0084] S201: Input the fluorescent target picture into the target detection model to obtain the first rectangular detection frame.

[0085] Among them, the target detection model is pre-trained by using sample fluorescent target pictures containing beam spots; the detection model is trained based on the sample fluorescent target pictures as inputs.

[0086] Optionally, the first rectangular detection frame includes at least the center position of the fluorescent target picture.

[0087] It should be noted that after the fluorescent target image is input into the object detection model, the model may generate multiple outputs. It is necessary to screen out the optimal result from these outputs and determine it as the first rectangular detection box. Each output contains three parts: the first part is the label; the second part is the confidence of the label, and this confidence is set to 0.8. That is to say, if the confidence of the label output by the model is lower than 0.8, it will be filtered out and not output; the third part is the rectangular detection box corresponding to the label. If only the confidence of one label is higher than 0.8, then select the rectangular box corresponding to this label as the first rectangular detection box. If there are multiple labels with confidence higher than the confidence level, then screen out the label with the highest confidence from multiple labels, and determine the rectangular detection box corresponding to the label with the highest confidence as the first rectangular detection box.

[0088] In addition, when the object detection model is deployed to any server in the control network, after obtaining the fluorescent target picture from the control network through the control framework, the fluorescent target picture can be input into the object detection model to obtain the first rectangular detection box. Then, based on this first rectangular detection box, the center position of the fluorescent target picture can be further determined.

[0089] Optionally, in another embodiment of the present application, the specific implementation manner of training the initial object detection model based on the sample fluorescent target picture as input, as Figure 3 shown, includes the following steps:

[0090] S301: Obtain the sample fluorescent target picture.

[0091] Among them, the sample fluorescent target picture includes: multiple fluorescent target pictures under different exposure degrees and different rotation angles.

[0092] S302: Input the sample fluorescent target picture into the initial object detection model to obtain the first sample rectangular detection box.

[0093] Among them, the first sample rectangular detection box is a rectangular box containing the center position of the sample fluorescent target picture.

[0094] Optionally, the initial object detection model includes but is not limited to: YOLO, SSD. Among them, in SSD, VGG16 is used as the backbone network, and 4 of its layers are used as trainable layers for training.

[0095] S303: Calculate the loss function between the first sample rectangular detection box and the actual rectangular detection box corresponding to the sample fluorescent target picture.

[0096] Specifically, the mean square error between the first sample rectangular detection box and the actual rectangular detection box corresponding to the sample fluorescent target picture can be calculated, and the mean square error is used as the loss function.

[0097] S304: If the loss function does not converge, adjust the model parameters of the initial object detection model and return to execute step S302.

[0098] It should be noted that if the loss function does not converge, it means that the loss function does not decrease as the training steps increase. At this time, adjust the model parameters of the initial object detection model and return to execute step S302 until the loss function converges.

[0099] S305: If the loss function converges, it is determined that the training of the initial object detection model is completed.

[0100] It can be understood that if the loss function converges, that is, the loss function gradually decreases as the training steps increase and finally tends to be stable or no longer changes significantly, it means that the training of the initial object detection model is completed at this time.

[0101] Optionally, in another embodiment of the present application, the specific implementation manner of training the initial object detection model with a sample fluorescence target image containing a beam spot to obtain an object detection model is as follows Figure 4 shown, including:

[0102] S401: Obtain a sample fluorescence target image containing a beam spot.

[0103] Among them, the sample fluorescence target image containing a beam spot includes beam spots of various shapes randomly placed on the target surface of the fluorescence target image.

[0104] S402: Input the sample fluorescence target image containing a beam spot into the initial object detection model to obtain a second sample rectangular detection frame.

[0105] Among them, the second sample rectangular detection frame is a rectangular frame containing the position of the beam spot.

[0106] S403: Calculate the loss function between the second sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescence target image containing a beam spot.

[0107] Optionally, the mean square error between the second sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescence target image containing a beam spot can be calculated, and the mean square error is used as the loss function.

[0108] S404: If the loss function does not converge, adjust the model parameters of the initial object detection model and return to execute step S402.

[0109] It should be noted that for the specific implementation manner of step S404, reference can be made to step S304 accordingly, and details are not described here again.

[0110] S405: If the loss function converges, determine the initial object detection model as the object detection model.

[0111] It can be understood that if the loss function converges, that is, the loss function gradually decreases as the number of training steps increases and finally tends to be stable or no longer changes significantly, it indicates that the training of the initial object detection model is completed at this time. By determining the initial object detection model as the object detection model, it is possible to use the object detection model to detect the rectangular frame containing the bull's-eye position and the rectangular frame containing the beam spot position.

[0112] S202: Obtain the pixel coordinates of the first corner position and the pixel coordinates of the second corner position from the first rectangular detection frame.

[0113] Specifically, the first corner position is the upper left corner of the first rectangular detection frame, and the second corner position is the lower right corner of the first rectangular detection frame. Alternatively, the first corner position is the lower left corner of the first rectangular detection frame, and the second corner position is the upper right corner of the first rectangular detection frame.

[0114] S203: Calculate the bull's-eye position of the fluorescent target image based on the pixel coordinates of the first corner position and the pixel coordinates of the second corner position.

[0115] Among them, the specific implementation process of calculating the bull's-eye position of the fluorescent target image based on the pixel coordinates of the first corner position and the pixel coordinates of the second corner position is: calculate using the bull's-eye calculation formula. Specifically, the specific expression forms of the bull's-eye calculation formula are shown in formulas (1) and (2).

[0116] x3=(x1+x2) / 2 (1)

[0117] y3=(y1+y2) / 2 (2)

[0118] In formulas (1) and (2), (x1,y1) are the pixel coordinates of the first corner position, (x2,y2) are the pixel coordinates of the second corner position, and (x3,y3) are the bull's-eye position of the fluorescent target image.

[0119] S103: Obtain the bull's-eye positions of all fluorescent target images and calculate the average value of all bull's-eye positions.

[0120] It should be noted that after obtaining multiple bull's-eye positions, in order to improve the accuracy of the bull's-eye position, it is usually necessary to perform certain processing on these bull's-eye positions. A common method is to calculate the average value of multiple bull's-eye positions. By calculating the average value of all bull's-eye coordinates, accidental errors or measurement deviations can be effectively eliminated, and a more stable and reliable bull's-eye position can be obtained.

[0121] S104: When the beam current is detected, obtain the fluorescent target image containing the beam spot.

[0122] It is understandable that when the beam acts on the fluorescent target material, the charged particles in the beam will excite the atoms or molecules in the target material to generate fluorescence. The emission region of this fluorescence is consistent with the shape of the beam spot of the beam. Therefore, the fluorescent target image can reflect the spatial distribution of the beam. By capturing this fluorescence through an optical imaging system, a fluorescent target picture containing the beam spot can be obtained.

[0123] S105: Detect the fluorescent target picture containing the beam spot to obtain the position of the beam spot in the fluorescent target picture.

[0124] Among them, the position of the beam spot in the fluorescent target picture includes the beam spot coordinates.

[0125] It is understandable that when detecting the fluorescent target picture containing the beam spot, specifically, extract the rectangular frame containing the beam spot in the fluorescent target picture containing the beam spot; determine the beam spot position according to the rectangular frame containing the beam spot.

[0126] Optionally, in another embodiment of the present application, the specific implementation manner of step S105 is as Figure 5 shown, and includes the following steps:

[0127] S501: Input the fluorescent target picture containing the beam spot into the target detection model to obtain a second rectangular detection frame.

[0128] Among them, the target detection model is pre-trained using the sample fluorescent target pictures containing the beam spot; the detection model is trained based on the sample fluorescent target pictures as inputs.

[0129] Optionally, the second rectangular detection frame at least includes: the beam spot position.

[0130] It should be noted that after inputting the fluorescent target picture containing the beam spot into the target detection model, the model may generate multiple outputs. It is necessary to screen out the optimal result from these outputs and determine it as the second rectangular detection frame. Each output contains three parts: the first part is the label; the second part is the confidence level of the label, and this confidence level is set to 0.8. That is to say, if the confidence level of the label output by the model is lower than 0.8, it will be filtered out and not output; the third part is the rectangular detection frame corresponding to the label. If only the confidence level of one label is higher than 0.8, then select the rectangular frame corresponding to this label as the second rectangular detection frame. If there are multiple labels with confidence levels higher than the confidence level, then screen out the label with the highest confidence level from the multiple labels, and determine the rectangular detection frame corresponding to the label with the highest confidence level as the second rectangular detection frame.

[0131] S502: Obtain the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position from the second rectangular detection frame.

[0132] Specifically, the position of the third corner point is the upper left corner of the second rectangular detection frame, and the position of the fourth corner point is the lower right corner of the second rectangular detection frame. Alternatively, the position of the third corner point is the lower left corner of the second rectangular detection frame, and the position of the fourth corner point is the upper right corner of the second rectangular detection frame.

[0133] S503: Calculate the beam spot position of the fluorescence target image based on the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position.

[0134] Among them, the specific implementation process of calculating the beam spot position of the fluorescence target image based on the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position is: calculate using the beam spot calculation formula. Specifically, the specific manifestation form of the beam spot calculation formula is shown in Formulas (3) and (4).

[0135] x6 = (x4 + x5) / 2 (3)

[0136] y6 = (y4 + y5) / 2 (4)

[0137] In Formulas (3) and (4), (x4, y4) are the pixel coordinates of the third corner point position, (x5, y5) are the pixel coordinates of the fourth corner point position, and (x6, y6) are the beam spot positions of the fluorescence target image.

[0138] In addition, to more detailedly display the process of the target detection model detecting the fluorescence target image, refer to Figure 6 the schematic diagram of a fluorescence target image shown. When no beam current is detected, perform an affine transformation on the fluorescence target image to correct the geometric distortion of the image, and input the deformed fluorescence target image into the target detection model to obtain the position of the target center. After detecting the beam current, input the fluorescence target image containing the beam spot into the target detection model for detection to obtain the beam spot position.

[0139] S106: Convert the beam spot position of the fluorescence target image according to the average value to obtain the final beam spot position.

[0140] It should be noted that during the actual beam tuning process, the ideal goal is to align the beam spot position with the micro-core of the target center. However, in actual situations, the beam spot often does not fall on the target center. Therefore, it is very important to measure the distance and orientation between the beam spot center and the target center. Calculating the coordinates of the beam spot relative to the target center is the most convenient measurement method, but it should be noted that all the previously obtained target center coordinates and beam spot coordinates are relative to the upper left corner of the image as the origin. Through the average value, the beam spot position in the fluorescence target image can be converted into coordinates based on the target center, thereby obtaining the final beam spot position.

[0141] Specifically, the specific implementation process of converting the spot position of the fluorescence target image according to the average value to obtain the final spot position is as follows: Calculate the difference between the abscissa in the average value and the abscissa in the spot position of the fluorescence target image to obtain the abscissa difference; Calculate the difference between the ordinate in the average value and the ordinate in the spot position of the fluorescence target image to obtain the ordinate difference; Determine the abscissa difference and the ordinate difference as the final spot position.

[0142] In summary, by detecting the fluorescence target image containing the spot, the position of the spot can be accurately determined. This method can effectively avoid the influence of interference information and still maintain high accuracy even under different environmental and interference conditions, thus ensuring the precise positioning of the spot position.

[0143] As Figure 7 shown, it is a schematic structural diagram of a device for obtaining the spot position provided by an embodiment of the present application. The obtaining device includes: a first obtaining unit 100, a first detecting unit 200, a calculating unit 300, a second obtaining unit 400, a second detecting unit 500, and a converting unit 600.

[0144] The first obtaining unit 100 is used to periodically obtain the fluorescence target image when no beam current is detected.

[0145] The first detecting unit 200 is used to detect the fluorescence target image to obtain the center position of the fluorescence target image.

[0146] The calculating unit 300 is used to obtain the center positions of all fluorescence target images and calculate the average value of all center positions.

[0147] The second obtaining unit 400 is used to obtain the fluorescence target image containing the spot when the beam current is detected.

[0148] The second detecting unit 500 is used to detect the fluorescence target image containing the spot to obtain the spot position of the fluorescence target image.

[0149] Specifically, the second detecting unit 500 is used to: input the fluorescence target image containing the spot into the target detection model to obtain a second rectangular detection frame; Obtain the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position from the second rectangular detection frame; Calculate the spot position of the fluorescence target image according to the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position.

[0150] The converting unit 600 is used to convert the spot position of the fluorescence target image according to the average value to obtain the final spot position.

[0151] The conversion unit 600 is specifically configured to: calculate the difference between the abscissa in the average value and the abscissa in the spot position of the fluorescence target image to obtain the abscissa difference; calculate the difference between the ordinate in the average value and the ordinate in the spot position of the fluorescence target image to obtain the ordinate difference; and determine the final spot position based on the abscissa difference and the ordinate difference.

[0152] In summary, by detecting the fluorescence target image containing the spot, the position of the spot can be accurately determined. This method can effectively avoid the influence of interference information and still maintain high accuracy even under different environmental and interference conditions, thus ensuring the precise positioning of the spot position.

[0153] Combined with Figure 7 the content shown, the first detection unit 100 includes:

[0154] An input subunit, configured to input the fluorescence target image into the target detection model to obtain a first rectangular detection frame; the target detection model is pre-trained by using a sample fluorescence target image containing a spot on an initial target detection model; the initial target detection model is trained based on the sample fluorescence target image as the input.

[0155] The input subunit is specifically configured to: obtain a sample fluorescence target image; input the sample fluorescence target image into the initial target detection model to obtain a first sample rectangular detection frame; calculate the loss function between the first sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescence target image; if the loss function does not converge, adjust the model parameters of the initial target detection model, and return to execute the step of inputting the sample fluorescence target image into the initial target detection model to obtain a first sample rectangular detection frame; if the loss function converges, determine that the training of the initial target detection model is completed.

[0156] The input subunit is specifically configured to: obtain a sample fluorescence target image containing a spot; input the sample fluorescence target image containing a spot into the initial target detection model to obtain a second sample rectangular detection frame; calculate the loss function between the second sample rectangular detection frame and the actual rectangular detection frame corresponding to the sample fluorescence target image containing a spot; if the loss function does not converge, adjust the model parameters of the initial target detection model, and return to execute the step of inputting the sample fluorescence target image containing a spot into the initial target detection model to obtain a second sample rectangular detection frame; if the loss function converges, determine the initial target detection model as the target detection model.

[0157] An acquisition subunit, configured to acquire the pixel coordinates of the first corner position and the pixel coordinates of the second corner position from the first rectangular detection frame.

[0158] A calculation subunit, configured to calculate the center position of a fluorescent target image based on the pixel coordinates of a first corner position and the pixel coordinates of a second corner position.

[0159] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for a system or system embodiment, since it is basically similar to a method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiment. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.

[0160] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0161] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for obtaining a beam spot position, characterized in that: include: When the beam is not detected, images of the fluorescent target are acquired periodically; Detecting the fluorescent target image to obtain the bull's eye position of the fluorescent target image; Obtain the bull's-eye positions of all fluorescent target images and calculate the average of all bull's-eye positions; When the beam is detected, a fluorescent target image including the beam spot is obtained; Detecting the fluorescent target image including the beam spot to obtain the beam spot position of the fluorescent target image; The beam spot position of the fluorescent target image is converted according to the average value to obtain a final beam spot position.

2. The method according to claim 1, characterized in that The detecting the fluorescent target image to obtain the bull's eye position of the fluorescent target image includes: The fluorescent target image is input into the target detection model to obtain a first rectangular detection frame; the target detection model is pre-trained using a sample fluorescent target image containing a beam spot to train an initial target detection model; the initial target detection model is trained based on the sample fluorescent target image as input; Obtaining pixel coordinates of a first corner point and pixel coordinates of a second corner point from the first rectangular detection frame; The bull's-eye position of the fluorescent target image is calculated based on the pixel coordinates of the first corner point position and the pixel coordinates of the second corner point position.

3. The method according to claim 2, characterized in that The process of training the initial target detection model based on the sample fluorescent target image as input includes: Get sample fluorescent target images; Inputting the sample fluorescent target image into the initial target detection model to obtain a first sample rectangular detection frame; Calculating a loss function between the first sample rectangular detection frame and an actual rectangular detection frame corresponding to the sample fluorescent target image; If the loss function does not converge, the model parameters of the initial target detection model are adjusted, and the step of inputting the sample fluorescent target image into the initial target detection model to obtain a first sample rectangular detection frame is returned to execute; If the loss function converges, it is determined that the training of the initial target detection model is completed.

4. The method according to claim 2, characterized in that: The process of pre-training the initial target detection model using a sample fluorescent target image containing a beam spot to obtain the target detection model includes: Acquire a sample fluorescent target image including a beam spot; Inputting the sample fluorescent target image including the beam spot into the initial target detection model to obtain a second sample rectangular detection frame; Calculating a loss function between the second sample rectangular detection frame and an actual rectangular detection frame corresponding to the sample fluorescent target image containing the beam spot; If the loss function does not converge, the model parameters of the initial target detection model are adjusted, and the step of inputting the sample fluorescent target image containing the beam spot into the initial target detection model to obtain a second sample rectangular detection frame is returned; If the loss function converges, the initial target detection model is determined as the target detection model.

5. The method according to claim 1, characterized in that The detecting the fluorescent target image including the beam spot to obtain the beam spot position of the fluorescent target image includes: Inputting the fluorescent target image including the beam spot into the target detection model to obtain a second rectangular detection frame; Obtaining pixel coordinates of a third corner point and pixel coordinates of a fourth corner point from the second rectangular detection frame; The beam spot position of the fluorescent target image is calculated according to the pixel coordinates of the third corner point position and the pixel coordinates of the fourth corner point position.

6. The method according to claim 1, characterized in that The step of converting the beam spot position of the fluorescent target image according to the average value to obtain a final beam spot position includes: Calculating the difference between the abscissa in the average value and the abscissa in the beam spot position of the fluorescent target image to obtain the abscissa difference; Calculating the difference between the ordinate in the average value and the ordinate in the beam spot position of the fluorescent target image to obtain a ordinate difference; The horizontal coordinate difference and the vertical coordinate difference are determined as the final beam spot position.

7. A device for acquiring a beam spot position, characterized in that: include: A first acquisition unit, used for periodically acquiring a fluorescent target image when no beam is detected; A first detection unit is used to detect the fluorescent target image to obtain the center position of the fluorescent target image; A calculation unit, used to obtain the bull's eye positions of all fluorescent target images and calculate the average value of all bull's eye positions; A second acquisition unit is used to acquire a fluorescent target image including a beam spot after the beam is detected; A second detection unit is used to detect the fluorescent target image including the beam spot to obtain the beam spot position of the fluorescent target image; A conversion unit is used to convert the beam spot position of the fluorescent target image according to the average value to obtain a final beam spot position.

8. The device according to claim 7, characterized in that The first detection unit comprises: An input subunit is used to input the fluorescent target image into a target detection model to obtain a first rectangular detection frame; the target detection model is pre-trained using a sample fluorescent target image containing a beam spot to train an initial target detection model; the initial target detection model is trained based on the sample fluorescent target image as input; An acquisition subunit, used to acquire pixel coordinates of a first corner point position and pixel coordinates of a second corner point position from the first rectangular detection frame; The calculation subunit is used to calculate the center position of the fluorescent target image according to the pixel coordinates of the first corner point position and the pixel coordinates of the second corner point position.

9. The device according to claim 8, characterized in that The input subunit is specifically used for: Get sample fluorescent target images; Inputting the sample fluorescent target image into the initial target detection model to obtain a first sample rectangular detection frame; Calculating a loss function between the first sample rectangular detection frame and an actual rectangular detection frame corresponding to the sample fluorescent target image; If the loss function does not converge, the model parameters of the initial target detection model are adjusted, and the step of inputting the sample fluorescent target image into the initial target detection model to obtain a first sample rectangular detection frame is returned to be executed; If the loss function converges, it is determined that the training of the initial target detection model is completed.

10. The device according to claim 8, characterized in that The input subunit is specifically used for: Acquire a sample fluorescent target image including a beam spot; Inputting the sample fluorescent target image including the beam spot into the initial target detection model to obtain a second sample rectangular detection frame; Calculating a loss function between the second sample rectangular detection frame and an actual rectangular detection frame corresponding to the sample fluorescent target image containing the beam spot; If the loss function does not converge, the model parameters of the initial target detection model are adjusted, and the step of inputting the sample fluorescent target image containing the beam spot into the initial target detection model to obtain a second sample rectangular detection frame is returned; If the loss function converges, the initial target detection model is determined as the target detection model.

Citation Information

Patent Citations

  • Accelerator beam position measuring method and system based on neural network

    CN107356955A

  • Automatic beam spot calibration and beam adjustment device for nuclear track membrane production terminal

    CN111867227A

  • Beam section processing method suitable for low-energy proton beam under strong background noise

    CN112698380A

  • Beam track positioning method and device, medium and computer equipment

    CN116027382A

  • Imaging method and device for particle beam change in particle beam scanning process

    CN118817741A