An automatic target positioning method, device, and computer storage medium

By using a target detection network to detect the target image and automatically calculating the motor movement distance, the high time and labor costs of traditional target positioning methods are solved, and the target can be positioned quickly and accurately.

CN116721155BActive Publication Date: 2026-01-30PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310644518.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-02
Publication Date
2026-01-30
Estimated Expiration
2043-06-02

AI Technical Summary

Technical Problem

Traditional target positioning methods require manual operation, which is time-consuming and labor-intensive, making it difficult to achieve high-speed and accurate target positioning.

Method used

The target image is detected by using a target detection network (such as the YOLO model), and the distance moved by the motor is obtained by linear transformation through the position label, so as to realize the automatic positioning of the target.

Benefits of technology

It achieves high-speed and precise target positioning, reduces time and labor costs, and improves positioning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116721155B_ABST
    Figure CN116721155B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic target positioning method, apparatus, and computer storage medium, relating to the field of high-energy particle acceleration. The method includes acquiring an image of a target to be positioned; detecting the target image using a target detection network to obtain a position label; the target detection network being trained using a YOLO model; performing a linear transformation based on the position label to obtain a motor movement distance; and moving the target based on the motor movement distance. This invention enables high-speed and precise target positioning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of high-energy particle acceleration, in particular to a target body automatic positioning method and device and computer storage medium. BACKGROUND

[0002] Laser ion accelerator is a new type of accelerator based on superfast laser acceleration, which has the advantages of small volume, high acceleration gradient and low cost, and has wide application prospects in the fields of super-high dose rate tumor radiotherapy, proton imaging and inertial confinement fusion. In laser ion acceleration, the coupling position of laser and target body affects the cutoff energy of ion beam, and the positioning efficiency of target body position affects the debugging speed of the accelerator.

[0003] The traditional target body positioning method usually uses the small depth of field characteristics of the high-power microscope objective lens behind the target, and determines the position of the target body according to the image clarity. This optical imaging method needs manual operation or design of a precise auxiliary function to control the motor to gradually approach the best target position, which is time-consuming and labor-intensive. SUMMARY

[0004] The purpose of the present application is to provide a target body automatic positioning method, device and computer storage medium to realize high-speed and accurate positioning of the target body.

[0005] To achieve the above purpose, the present application provides the following solutions:

[0006] A target body automatic positioning method comprises:

[0007] Obtaining a target body image to be positioned;

[0008] Detecting the target body image to be positioned by using a target detection network to obtain a position label; the target detection network is obtained by training a Yolo model;

[0009] Performing linear transformation according to the position label to obtain a motor movement distance;

[0010] Moving the target body according to the motor movement distance.

[0011] Optionally, the training process of the target detection network comprises:

[0012] Obtaining a target body image with annotation information, and dividing the target body image with annotation information into a training set and a validation set; the annotation information includes clear and unclear areas in the target body image;

[0013] Training the Yolo model by using the training set, and obtaining a target detection network when the number of iterations reaches a set number.

[0014] Optionally, the Yolo model is specifically a YoloV5 deep network model.

[0015] Optionally, the linear transformation according to the position label obtains a motor movement distance, and specifically includes:

[0016] According to the position label, it is judged whether there is a clear position, and a judgment result is obtained.

[0017] If the judgment result is yes, the motor movement distance is determined according to the object confidence and the object abscissa in the position label.

[0018] If the judgment result is no, the motor movement distance is determined according to the object confidence, the object width and the object abscissa in the position label.

[0019] The application further provides a target automatic positioning device applying the target automatic positioning method, and the target automatic positioning device comprises a camera, a motor, a target and an upper computer.

[0020] The target is fixed on the motor; the motor comprises three linear translation stages; the three linear translation stages are used for controlling the target to move in three directions respectively; the camera is used for acquiring a target image; and the motor is connected with the upper computer.

[0021] The upper computer comprises:

[0022] An acquisition module is configured to acquire a target image to be positioned.

[0023] A detection module is configured to detect the target image to be positioned by using a target detection network to obtain a position label; the target detection network is obtained by training a Yolo model.

[0024] A change module is configured to perform linear transformation according to the position label to obtain a motor movement distance.

[0025] A movement module is configured to control the motor to move the target according to the motor movement distance.

[0026] Optionally, the camera is a CCD camera.

[0027] Optionally, the training process of the target detection network comprises:

[0028] A target image with annotation information is acquired, and the target image with annotation information is divided into a training set and a verification set; the annotation information comprises a clear area and a non-clear area in the target image.

[0029] The Yolo model is trained by using the training set, and when the number of iterations reaches a set number of times, a target detection network is obtained.

[0030] The application further provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method.

[0031] According to the embodiments of the application, the following technical effects are achieved.

[0032] The target detection network is obtained by training a Yolo model, and the position label is obtained by detecting the target image to be positioned by using the target detection network; the motor moving distance is obtained by performing linear transformation according to the position label; and the target is moved according to the motor moving distance. The position of the target from the best focusing point is inferred by using a single picture, the target is accurately and quickly moved, and therefore, high-speed and accurate positioning of the target is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0033] 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 needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0034] Figure 1 It is a schematic diagram of the coupling of laser and target position in a laser accelerator;

[0035] Figure 2 It is a schematic diagram of target positioning;

[0036] Figure 3 It is an input schematic diagram of the target detection network;

[0037] Figure 4 It is an output schematic diagram of the target detection network;

[0038] Figure 5 It is a conversion flowchart from the predicted label to the motor moving distance;

[0039] Figure 6 It is a schematic diagram of data flow between the on-machine position and the server;

[0040] Figure 7 It is a flowchart of the target automatic positioning method provided by the present application. DETAILED DESCRIPTION

[0041] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0042] The present application aims to provide a target automatic positioning method, device and computer storage medium to realize high-speed and accurate positioning of a target.

[0043] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] As shown in the drawings, Figure 7 The present application provides a target automatic positioning method, which sends the target image captured by a CCD to a server through a request, the server performs target detection network reasoning, and returns grid labeling of the clear position of the image; the local computer converts the labeling information into the distance of the motor y-axis movement through linear conversion, and completes the accurate positioning of the target, specifically including:

[0045] Step 101: obtaining a target image to be positioned.

[0046] Step 102: detecting the target image to be positioned by using a target detection network to obtain a position label; the target detection network is obtained by training a Yolo model.

[0047] Step 103: linearly transforming according to the position label to obtain the motor movement distance.

[0048] Step 103, specifically including: judging whether there is a clear position according to the position label to obtain a judgment result; if the judgment result is yes, determining the motor movement distance according to the object confidence and object horizontal coordinate in the position label; if the judgment result is no, determining the motor movement distance according to the object confidence, object width and object horizontal coordinate in the position label.

[0049] Step 104: moving the target according to the motor movement distance.

[0050] The training process of the target detection network includes:

[0051] Obtaining a target image with labeling information, and dividing the target image with labeling information into a training set and a verification set; the labeling information includes clear areas and non-clear areas in the target image.

[0052] Specifically, the y-axis is manually moved to obtain the best imaging point of the target body, so that the clear position of the image is located in the center of the field of view, and the front and back are scanned at a step of 10 um, and the target body images at different steps are stored. The clear position and non-clear position of each image are manually labeled.

[0053] In the entire data set for network training, there are 150 labeled plastic target body images, and the images at a distance of 60 um to 100 um from the best focus position are labeled with non-clear positions, and the images at a distance of 60 um before and after the best focus position are labeled with clear positions and non-clear positions. Randomly shuffle the picture order and divide the training set and the validation set according to the number of 8:2.

[0054] The Yolo model is trained using the training set, and when the number of iterations reaches a set number of times, a target detection network is obtained. The Yolo model is specifically a YoloV5 deep network model.

[0055] Specifically, a pre-trained YoloV5 deep network model is used as the initial network state. The network object output type is changed to 2, i.e. clear and non-clear objects. The network trained for 400 iterations is saved as a.pt file under the pytorch framework for use in the test set and actual deployment.

[0056] The LabVIEW on-machine-position target body program is used as the client, and the computing platform with the pytorch framework is used as the server. The server deploys the deep network of the trained weight; when the target body replacement action is completed, the client sends a calculation request to the server, and the server reads the picture and calculates the corresponding position label;

[0057] The on-machine-position converts the position label into a y-axis movement distance L through linear transformation and sends it to the motor controller, so that the motor moves L and completes the position confirmation of the target body.

[0058] As shown in Figure 5 The specific conversion algorithm is as follows:

[0059] The format of the network output label is (c, conf, x, y, h, w), wherein x and y represent the center horizontal and vertical coordinates of the detected object, h is the height of the object, w is the width of the object, c is the category of the object (0 and 1 represent clear objects and non-clear objects respectively), and conf is the object confidence. First, according to the output label of the target detection network, it is judged by the program whether there is a clear category in the object category c in the label; specifically, it is determined by the clear area and non-clear area in the label information; if there is, find the clear position label with the maximum conf value, get the horizontal coordinate x of the corresponding label, and calculate the motor moving distance L = k1 * (0.5-x); if there is no clear position, find the non-clear position label with the maximum conf value, get the width w and horizontal coordinate x of the corresponding label, and calculate the motor moving distance as k1, k2 are linear conversion coefficients, which depend on the target body and the angle after the target, and are calibrated by the actual moving distance of the target body and the detected output label. The input and output of the target detection model are as shown in Figure 3 and Figure 4 .

[0060] The present application is based on the Yolo series of target detection deep network model, which converts the prediction task of the out-of-focus position into a target detection task. Due to the use of lightweight network, the picture input can be quickly converted into label output, and then the target body positioning can be realized quickly.

[0061] As shown in Figure 6 , based on the client-server use under the Flask framework, the program of controlling the motor and the algorithm program of reasoning the picture are separated, which can realize the saving of local computing resources, can ensure the reasoning speed, and can realize the rapid deployment on different laser accelerator devices.

[0062] As shown in Figure 2 , the present application also provides a target body automatic positioning device, which applies the above-mentioned target body automatic positioning method. The target body automatic positioning device comprises a camera, a motor, a target body and an upper computer. The target body is fixed on the motor. The motor comprises three linear translation stages. The three linear translation stages are used for controlling the movement of the target body in three directions respectively. The camera is used for acquiring target body images. The motor is connected with the upper computer. The camera is a CCD camera.

[0063] The host computer comprises: an acquisition module configured to acquire a target image to be positioned; a detection module configured to detect the target image to be positioned by a target detection network to obtain a position label; the target detection network is obtained by training a Yolo model; a change module configured to perform linear transformation according to the position label to obtain a motor movement distance; and a movement module configured to control the motor to move the target according to the motor movement distance.

[0064] The training process of the target detection network comprises:

[0065] A target image with annotation information is acquired, and the target image with annotation information is divided into a training set and a verification set; the annotation information comprises a clear area and a non-clear area in the target image.

[0066] The Yolo model is trained by using the training set, and when the number of iterations reaches a set number of times, a target detection network is obtained.

[0067] The present application relies on hardware settings and software algorithms, and the main devices used in the main acceleration cavity of the laser accelerator include: a high-power microscope objective with a specific depth of field size and a CCD camera, a high-precision motor, and a halogen light source; in terms of software algorithms, a target detection deep learning network Yolo model (open source), LabVIEW on-machine position software for controlling the motor and the CCD camera;

[0068] The multi-hole target is fixed on a 6-dimensional high-precision motor, and three linear translation tables control the movement in the xyz direction. The distance between the target and the microscope behind the target is controlled by the forward and backward movement of the y-axis of the translation table. As shown in Figure 1 Each white small hole represents a target, and the main laser is focused on the target through focusing elements (the focusing position of the laser is determined by the target rear camera equipped with a high-power objective). The target rear camera is fixed and does not move, the target surface is imaged by the CCD equipped with a high-power objective behind the target, the target is moved forward and backward, the clear position is placed in the center of the field of view, and the position positioning of the target is realized.

[0069] The normal direction of the target surface and the receiving direction of the target rear camera form a certain angle. Due to the small depth of field of the high-power objective, the image clarity in the imaging field of view has differences in position, that is, the target surface within the depth of field can be clearly imaged, and the target surface outside the depth of field cannot be clearly imaged. At the same time, the position of the clear position in the CCD field of view can determine the defocus position: the clear position on the left side indicates that the target is in front of the focal plane; the clear position on the right side indicates that the target is behind the focal plane; and the clear position in the center indicates that the target has completed positioning.

[0070] The movement of the y-axis is controlled by the on-machine position software to move the clear position to the center of the field of view, and the position positioning of the target is completed.

[0071] The illuminating light of the present application is halogen lamp, and the use of halogen lamp to illuminate the target increases the brightness of the whole field of view.

[0072] The present application also provides a computer storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the method as above.

[0073] The present application infers the position of the target from a single picture and the distance of the target from the best focus point. Compared with the traditional method, position scanning results in high time cost, and the present application can realize the accurate and rapid movement of the target, solve a series of problems such as the large number of targets required for high-frequency continuous shooting, the long time required for installation and debugging, and the high labor cost, and realize high-speed and accurate positioning of the target.

[0074] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0075] The principles and implementation modes of the present application are described by using specific examples in this paper, and the above embodiment description is only used to help understand the method of the present application and its core idea; at the same time, for the general technical personnel in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In view of the above, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method for automatically positioning a target body, characterized by, The method comprises: acquiring a target body image to be positioned; detecting the target body image to be positioned by using a target detection network to obtain a position label; the target detection network is obtained by training a Yolo model; performing linear transformation according to the position label to obtain a motor moving distance; moving the target body according to the motor moving distance.

2. The method of claim 1, wherein, The training process of the target detection network comprises: acquiring a target body image with annotation information, and dividing the target body image with annotation information into a training set and a verification set; the annotation information comprises a clear area and a non-clear area in the target body image; training the Yolo model by using the training set, and obtaining a target detection network when the number of iterations reaches a set number of times.

3. The method of claim 1, wherein, The Yolo model is specifically a YoloV5 deep network model.

4. The method of claim 1, wherein, The linear transformation according to the position label to obtain the motor moving distance specifically comprises: determining whether there is a clear position according to the position label to obtain a determination result; if the determination result is yes, determining the motor moving distance according to the object confidence and the object horizontal coordinate in the position label; if the determination result is no, determining the motor moving distance according to the object confidence, the object width and the object horizontal coordinate in the position label.

5. An automatic target positioning device, characterized by The target body automatic positioning device applies the target body automatic positioning method in any one of claims 1-4, and the target body automatic positioning device comprises a camera, a motor, a target body and an upper computer. The target body is fixed on the motor; the motor comprises three linear translation stages; the three linear translation stages are used for controlling the target body to move in three directions respectively; the camera is used for acquiring a target body image; and the motor is connected with the upper computer. The upper computer comprises: an acquisition module, which is used for acquiring a target body image to be positioned; a detection module, which is used for detecting the target body image to be positioned by using a target detection network to obtain a position label; the target detection network is obtained by training a Yolo model; a change module, which is used for performing linear transformation according to the position label to obtain a motor moving distance; a moving module, which is used for moving the target body by controlling the motor according to the motor moving distance.

6. The automatic target positioning device according to claim 5, wherein The camera is a CCD camera.

7. The automatic target positioning device according to claim 5, wherein The training process of the target detection network comprises: acquiring a target body image with annotation information, and dividing the target body image with annotation information into a training set and a verification set; the annotation information comprises a clear area and a non-clear area in the target body image; training the Yolo model by using the training set, and obtaining a target detection network when the number of iterations reaches a set number of times.

8. A computer storage medium, characterized in that, A computer program is stored thereon, and the computer program is executed by a processor to implement the method in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Transparent target positioning system in laser ion accelerator and positioning method thereof

    CN108901118A

  • Complex scene laser tracker target ball center positioning method and device based on YOLOv3

    CN114596336A