Ultrasonic image processing method
By displaying the differential data of ultrasound images and standard images, guiding the movement of the ultrasound probe, and optimizing the probe movement using offline deep reinforcement learning model, the problem that ultrasound image accuracy is affected by user experience in ultrasound equipment is solved, and higher quality ultrasound images are achieved collection.
Patent Information
- Application Number
- CN202310531998.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
The movement of ultrasound probes in existing ultrasound devices depends on the user's subjective experience, resulting in limited accuracy of ultrasound images, especially for users with less experience, it is difficult for high-quality ultrasound images to be obtained.
By displaying the action data generated by the first ultrasound image, standard ultrasound image and position information, the user is guided to move the ultrasound probe to improve the accuracy of the ultrasound image. The offline deep reinforcement learning model combined with the BCQ model is used to guide the probe movement based on coarse and fine particle size action to ensure that Image quality.
It significantly improves the accuracy of ultrasonic images collected by ultrasonic probes, simplifies user operation processes, improves image quality, and is suitable for users of different experience levels.
Smart Images

Figure CN118924329A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and in particular to a method for processing ultrasonic images. Background Art
[0002] Ultrasound equipment is a real-time medical imaging device. Using ultrasound equipment to examine patients has the characteristics of no radiation and repeatable diagnosis. Therefore, ultrasound equipment has a wide range of primary medical application scenarios.
[0003] In the prior art, how to move the ultrasound probe in the ultrasound device usually depends on the user's subjective consciousness, that is, experience. If the user's experience is low, the accuracy of the ultrasound image collected by the ultrasound probe will be affected.
[0004] Therefore, how to enable users to obtain more accurate ultrasound images is an urgent problem to be solved. Summary of the invention
[0005] In an exemplary embodiment of the present application, a method for processing an ultrasound image is provided to improve the accuracy of an ultrasound image acquired using an ultrasound probe.
[0006] According to a first aspect of an exemplary embodiment, a method for processing an ultrasound image is provided, comprising:
[0007] In response to a first operation, a first ultrasound image corresponding to the first section is displayed; wherein the first operation is that the user uses an ultrasound probe to scan the first section;
[0008] Displaying first action data; wherein the first action data is generated according to the first ultrasound image, the first standard ultrasound image and the first position information; the first position information is the position of the ultrasound probe after the first operation; the first action data includes movement information and rotation information of the ultrasound probe; the first standard ultrasound image is a pre-stored standard scan image of the first section;
[0009] In response to a second operation, a second ultrasound image corresponding to the first section is displayed; wherein the second operation is that the user moves the ultrasound probe according to the first action data.
[0010] According to a second aspect of an exemplary embodiment, there is provided an apparatus for processing an ultrasound image, the apparatus comprising:
[0011] A first display unit is used to display a first ultrasound image corresponding to a first section in response to a first operation; wherein the first operation is that a user uses an ultrasound probe to scan the first section;
[0012] The second display unit is used to display the first action data; wherein the first action data is generated according to the first ultrasonic image, the first standard ultrasonic image and the first position information; the first position information is the position of the ultrasonic probe after the first operation; the first action data includes the movement information and the rotation information of the ultrasonic probe; the first standard ultrasonic image is a pre-stored standard scanning image of the first section;
[0013] The third display unit is used to display a second ultrasound image corresponding to the first section in response to a second operation; wherein the second operation is that the user moves the ultrasound probe according to the first action data.
[0014] According to a third aspect of an exemplary embodiment, there is provided an electronic device comprising: a processor; and a memory for storing processor executable instructions; wherein the processor implements the steps of the above-mentioned ultrasound image processing method by running the executable instructions.
[0015] According to a fourth aspect of the exemplary embodiment, a computer storage medium is provided, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the steps of a method for processing an ultrasound image.
[0016] In an embodiment of the present application, in response to the user's operation of scanning the first section using an ultrasonic probe, a first ultrasonic image corresponding to the first section is displayed, but the first ultrasonic image may have low accuracy; therefore, the first action data generated according to the first ultrasonic image, the first standard ultrasonic image corresponding to the first section stored in advance, and the first position information of the ultrasonic probe are displayed to instruct the user to move the ultrasonic probe, and the first action data includes movement information and rotation information of the ultrasonic probe. In addition, the present application displays a second ultrasonic image corresponding to the first section in response to the user's operation of moving the ultrasonic probe according to the first action data. Compared with the first ultrasonic image, the second ultrasonic image has a higher accuracy. Therefore, the present application can improve the accuracy of ultrasonic images collected using an ultrasonic probe. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 The hardware configuration block diagram of an ultrasound device provided by an embodiment of the present application is exemplarily shown;
[0019] Figure 2A schematic diagram of an application scenario of an ultrasound image processing method provided in an embodiment of the present application is exemplarily shown;
[0020] Figure 3 A flowchart of a method for processing an ultrasound image provided by an embodiment of the present application is exemplarily shown;
[0021] Figure 4 A schematic diagram exemplarily shows an ultrasonic device provided in an embodiment of the present application responding to a first operation;
[0022] Figure 5 A schematic diagram showing, by way of example, the movement of an ultrasound probe provided in an embodiment of the present application;
[0023] Figure 6 A flowchart of a method for selecting a section provided in an embodiment of the present application is exemplified;
[0024] Figure 7 A schematic diagram of a first page provided by an embodiment of the present application is exemplarily shown;
[0025] Figure 8 A schematic diagram showing an ultrasonic device provided in an embodiment of the present application responding to a slice selection operation is exemplarily shown;
[0026] Fig. 9 A schematic diagram exemplarily shows an ultrasonic device provided in an embodiment of the present application responding to a second operation;
[0027] Fig.10 A schematic diagram of a display page for displaying a target ultrasound image provided by an embodiment of the present application is exemplarily shown;
[0028] Fig.11 A schematic diagram of a save operation provided by an embodiment of the present application is exemplarily shown;
[0029] Fig.12 A schematic diagram exemplarily shows another saving operation provided in an embodiment of the present application;
[0030] Fig.13 A flowchart of a method for generating first action data provided by an embodiment of the present application is exemplarily shown;
[0031] Fig.14 A flowchart of a method for determining a second similarity between a first ultrasound image and a first standard ultrasound image provided by an embodiment of the present application is exemplarily shown;
[0032] Fig.15 A schematic diagram showing, by way of example, a sliding window provided in an embodiment of the present application sliding on a first ultrasound image;
[0033] Fig.16A flowchart of a method for determining the similarity between a first region and a second region provided in an embodiment of the present application is exemplarily shown;
[0034] Fig.17 A schematic diagram of a display page showing a first ultrasound image provided by an embodiment of the present application is exemplarily shown;
[0035] Fig.18 A flowchart of a training method for an offline deep reinforcement learning model provided in an embodiment of the present application is exemplified;
[0036] Fig.19 The schematic diagram of the framework of a BCQ model provided in an embodiment of the present application is exemplarily shown;
[0037] Fig. 20 A flowchart showing a specific training method of the BCQ model provided in an embodiment of the present application is exemplified;
[0038] Fig.21 The following is a schematic diagram showing the structure of an ultrasonic image processing device provided in an embodiment of the present application;
[0039] Fig. 22 The schematic diagram of the structure of an ultrasonic image processing device provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0041] In the prior art, how to move the ultrasound probe in the ultrasound device depends entirely on the user's subjective consciousness, that is, experience. If the user's experience is low, the accuracy of the ultrasound image collected by the ultrasound probe will be affected.
[0042] Therefore, how to enable users to obtain more accurate ultrasound images is an urgent problem to be solved.
[0043] Typically, the user is a doctor who uses the ultrasound device. For the sake of convenience of description, they are collectively referred to as users in the embodiments of the present application.
[0044] To this end, an embodiment of the present application provides a method for processing an ultrasound image to improve the accuracy of an ultrasound image acquired using an ultrasound probe.
[0045] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiment of the present application.
[0046] It should be understood that Figure 1 The ultrasound device shown is only an example and the ultrasound device may have more Figure 1 The more or less components shown in the figure can be combined with two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0047] Figure 1 Schematically shows a hardware configuration block diagram of an ultrasound device according to an exemplary embodiment.
[0048] like Figure 1 As shown, the ultrasound device may include, for example: a processor 11, a memory 12, a display unit 13 and an ultrasound probe 14; wherein:
[0049] The ultrasonic probe 14 is configured to acquire a first ultrasonic image corresponding to the first section after the user performs a first operation, and to acquire a second ultrasonic image after the user performs a second operation; wherein the first operation is that the user uses the ultrasonic probe to scan the first section; and the second operation is that the user moves the ultrasonic probe according to the first action data;
[0050] The processor 11 is connected to the ultrasound probe 14, the display unit 13 and the memory 12 respectively, and is configured to execute: generating first action data according to the first ultrasound image, the first standard ultrasound image and the first position information; wherein the first position information is the position of the ultrasound probe after the first operation; the first action data includes movement information and rotation information of the ultrasound probe; the first standard ultrasound image is a pre-stored standard scan image of the first section;
[0051] A display unit 13, used for displaying a first ultrasonic image, first motion data, and a second ultrasonic image corresponding to the first section;
[0052] The memory 12 is configured to store data required for displaying the first ultrasound image, the first motion data, and the second ultrasound image, and may include software programs, application interface data, and the like.
[0053] In addition, the present application embodiment also provides an optional application scenario of the ultrasonic image processing method, such as Figure 2 As shown, it includes an ultrasound device 20 and a server 21;
[0054] The ultrasound device 20 includes a display screen 2001 and an ultrasound probe 2002;
[0055] The ultrasound device 20 collects a first ultrasound image corresponding to a first section through the ultrasound probe 2002 after the user performs a first operation; wherein the first operation is that the user uses the ultrasound probe to scan the first section; sends the first ultrasound image to the server 21; and receives first action data sent by the server 21, and displays the first ultrasound image and the first action data on the display screen 2001; collects a second ultrasound image corresponding to the first section through the ultrasound probe 2002 after the user performs a second operation, wherein the second operation is that the user moves the ultrasound probe according to the first action data, and displays the second ultrasound image on the display screen 2001;
[0056] The server 21 is used to generate first action data based on the first ultrasound image, the first standard ultrasound image and the first position information, and send the first action data to the ultrasound device 20; wherein the first position information is the position of the ultrasound probe after the first operation; the first action data includes movement information and rotation information of the ultrasound probe; the first standard ultrasound image is a pre-stored standard scanning image of the first section.
[0057] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 or Figure 2 The application scenario shown can also be used in other possible application scenarios, which are not limited in the embodiments of the present application.
[0058] refer to Figure 3 A flowchart of a method for processing an ultrasonic image is shown to illustrate the technical solution provided in an embodiment of the present application.
[0059] S301: In response to a first operation, display a first ultrasound image corresponding to a first section.
[0060] The first operation is that the user uses an ultrasonic probe to scan the first section. The first ultrasonic image can be obtained by the user using the ultrasonic probe to perform an initial scan on the first section according to the patient's condition; or it can be obtained by using the ultrasonic probe to scan the first section after determining the action data one or more times and moving the ultrasonic probe according to the action data.
[0061] Figure 4 A schematic diagram of an ultrasonic device provided in an embodiment of the present application responding to a first operation, wherein: Figure 4 (a) is a schematic diagram of an ultrasonic device provided in an embodiment of the present application responding to a first operation, Figure 4(b) is a schematic diagram of a display page showing a first ultrasound image provided by an embodiment of the present application. Figure 4 As shown in (a), the ultrasound device responds to the user using the ultrasound probe to scan the second liver portal of patient A, that is, the first section, so that Figure 4 The display page in (b) displays the first ultrasound image corresponding to the first section and the name of the first section, i.e., the second liver portal.
[0062] S302: Display first action data.
[0063] Since the user has little experience, the accuracy of the first ultrasound image obtained by scanning the patient using the ultrasound probe is low, so the first motion data needs to be displayed to the user so that the user moves the ultrasound probe according to the first motion data.
[0064] The first motion data is generated according to the first ultrasonic image, the first standard ultrasonic image and the first position information.
[0065] The first position information is the position of the ultrasonic probe after the first operation, that is, the posture of the ultrasonic probe at that moment. The first position information pos can be represented by 6 degrees of freedom, namely, 3D spatial position (x, y, z) and corresponding rotation angles (α, β, γ), that is, pos = (x, y, z, α, β, γ).
[0066] The first motion data includes movement information and rotation information of the ultrasonic probe. Specifically, the movement information of the ultrasonic probe includes movement direction information and movement distance information, and the rotation information of the ultrasonic probe includes rotation angle information and rotation direction information. Figure 5 A schematic diagram of the movement of an ultrasonic probe provided in an embodiment of the present application, such as Figure 5 As shown, in a three-dimensional coordinate system, the first action data can be expressed as (x1, y1, z1, α1, β1, γ1). The first action data is converted into a text description using a related algorithm. For example, the first action data obtained by converting the action data is: upper left movement distance a, clockwise rotation angle b. The user moves the ultrasound probe according to the converted first action data, so that the ultrasound probe can be moved from position 1 to position 2.
[0067] like Figure 4 As shown in (b), the display page shows a schematic diagram of the ultrasound probe moving from position 1 to position 2 in a three-dimensional coordinate system, so that the user can determine the moving direction and rotation angle. A text description of the first action data is displayed below the schematic diagram, i.e., the moving distance c in the upper left corner and the clockwise rotation angle d, so that the user can understand it easily.
[0068] The first standard ultrasound image is a pre-stored standard scanning image of the first section. Figure 6 A flow chart of a method for selecting a section provided in an embodiment of the present application. Before step S301 or before step S302, section selection can be performed through steps S601-S602. Figure 6 At least the following steps are included:
[0069] S601: Display the first page.
[0070] The first page includes N standard ultrasound images of N sections of the first organ, wherein the specific value of N can be set according to actual conditions.
[0071] The first organ mentioned above can be any one of the patient's abdomen, thyroid, heart, carotid artery, breast, vagina, etc.
[0072] Take the section selection before step 301 as an example. Figure 7 is a schematic diagram of the first page provided for the embodiment of the present application, such as Figure 7 As shown, if the abdomen is the first organ, multiple sections of the abdomen are displayed on the first page. Each section is indicated by a rectangular frame, and the name of the section and the corresponding standard ultrasound image are displayed in each rectangular frame. On the first page, 8 sections of the abdomen are displayed, namely, the longitudinal section 1 of the left liver through the abdominal aorta, the longitudinal section 2 of the liver through the inferior vena cava, the oblique section 3 of the left lobe of the liver under the xiphoid, the oblique section 4 of the liver under the right costal margin, the section 5 of the second hepatic portal, the oblique section 6 of the right costal margin through the first hepatic portal, the longitudinal section 7 of the first hepatic portal under the right costal margin, and the long axis section 8 of the gallbladder.
[0073] S602: In response to the user's section selection operation on the first page, determining the first section selected by the user, and displaying a first standard ultrasound image of the first section.
[0074] Figure 8 A schematic diagram of an ultrasound device provided in an embodiment of the present application in response to a slice selection operation, wherein: Figure 8 (a) is a schematic diagram of selecting a first page provided in an embodiment of the present application, Figure 8 (b) is a schematic diagram of a display page showing a first standard ultrasound image provided by an embodiment of the present application. Figure 8 As shown in (a), 8 sections are displayed on the first page, each section is indicated by a rectangular frame, and the name of the section and the corresponding standard ultrasound image are displayed in each rectangular frame. The ultrasound device responds to the user's selection operation of the first section in the first page, that is, the second hepatic portal section 5, and displays Figure 8 The display page in (b) displays the first standard ultrasound image corresponding to the first section and the name of the first section, namely, the second portal section.
[0075] S303: In response to the second operation, display a second ultrasound image corresponding to the first section.
[0076] The second operation is that the user moves the ultrasound probe according to the first action data, thereby improving the accuracy of the acquired second ultrasound image.
[0077] Fig. 9 A schematic diagram of an ultrasonic device provided in an embodiment of the present application responding to a second operation, wherein: Fig. 9 (a) is a schematic diagram of selecting a second operation using an ultrasonic device according to an embodiment of the present application, Fig. 9 (b) is a schematic diagram of a display page showing a second ultrasound image provided by an embodiment of the present application. Fig. 9 As shown in (a), the ultrasound device responds to the user's operation of moving the ultrasound probe according to the first action data when scanning the second liver portal of patient A using the ultrasound probe, that is, the second operation, by displaying the ultrasound device. Fig. 9 The display page in (b) displays the second ultrasound image corresponding to the first section.
[0078] After the second ultrasound image corresponding to the first section is displayed in step S303, the present application also includes the following two situations:
[0079] In the first case, if the second ultrasound image meets the scanning condition, the second ultrasound image is displayed as the target ultrasound image.
[0080] The scanning condition is determined based on the second ultrasound image and the first standard ultrasound image. Specifically, the scanning condition may be that the first similarity between the second ultrasound image and the first standard ultrasound image is greater than or equal to a set threshold, and the set threshold may be set according to actual conditions.
[0081] In the second case, if the second ultrasound image does not meet the scanning condition, the second action data is displayed.
[0082] The second motion data is generated based on the second ultrasonic image, the first standard ultrasonic image and the second position information, and the second position information is the position of the ultrasonic probe after the second operation; the second motion data includes movement information and rotation information of the ultrasonic probe.
[0083] If the threshold is set to 90, the similarity between the second ultrasonic image and the first standard ultrasonic image is 92, and the similarity between the second ultrasonic image and the first standard ultrasonic image is greater than the set threshold, the second ultrasonic image meets the scanning condition, and the second ultrasonic image is the target ultrasonic image, that is, the second ultrasonic image is in the first situation. Fig.10 is a schematic diagram of a display page for displaying a target ultrasound image provided in an embodiment of the present application, such as Fig.10 As shown, the second ultrasound image, that is, the target ultrasound image, is displayed on the display page, and a prompt box "Ultrasound image quality has reached the standard" is popped up on the display page, which may also be other prompt information, so as to remind the user to save the target ultrasound image.
[0084] When the second image is in the first situation, if the target ultrasound image needs to be saved, the user can save it in the following two ways:
[0085] In the first method, the user can hold the ultrasound probe and keep it still for a set time interval to save the target ultrasound image, and when the ultrasound device emits a "beep" prompt sound, it is determined that the target ultrasound image is saved successfully.
[0086] The above-set time interval may be 2-3 seconds or other values.
[0087] Fig.11 A schematic diagram of a save operation provided in an embodiment of the present application, wherein: Fig.11 (a) is a schematic diagram of saving a target ultrasound image provided by an embodiment of the present application, Fig.11 (b) is a schematic diagram of a page displaying a target ultrasound image provided by an embodiment of the present application. Fig.11 As shown in (a), the user holds the ultrasound probe for 2-3 seconds without moving to save the target ultrasound image, and determines that the target ultrasound image has been successfully saved when the ultrasound device emits a "beep" prompt sound. Fig.11 As shown in (b), the historical ultrasonic image portion in the display page displays the successfully saved target ultrasonic image, that is, the second ultrasonic image.
[0088] The second method is that the user can also press the "Save" button on the display page of the ultrasound device to save the target ultrasound image.
[0089] Fig.12 A schematic diagram of another saving operation provided in an embodiment of the present application, wherein: Fig.12 (a) is a schematic diagram of another method for storing a target ultrasound image provided by an embodiment of the present application, Fig.12 (b) is a schematic diagram of another page displaying a target ultrasound image provided by an embodiment of the present application. Fig.12 As shown in (a), the ultrasound device responds to the user clicking the "Save" button on the display page, and displays the Fig.12 The display page in (b) displays the successfully saved second ultrasound image, i.e., the target ultrasound image, and the ultrasound image successfully saved at a historical moment, such as ultrasound image 1, in the historical ultrasound image portion of the display page.
[0090] This application also supports users to determine based on experience that the current ultrasound image has met certain requirements. Users can then click the "Save" button on the display page or perform other operations at any time when the ultrasound device does not pop up a prompt box "Ultrasound image quality has met the standards" to save the ultrasound image at the current moment.
[0091] Through the above embodiment, it is realized that in response to the first operation, the first ultrasound image corresponding to the first section is displayed, the first action data is displayed, and in response to the second operation, the second ultrasound image corresponding to the first section is displayed. In the process of responding to the second operation, the first action data is applied to move the ultrasound probe. In order to make the embodiment of the present application more perfect, the determination process of the first action data is described below.
[0092] Fig.13 A flowchart of a method for generating first action data provided in an embodiment of the present application can generate the first action data through steps S131-S132. Fig.13 At least the following steps are included:
[0093] S131: Determine a second similarity between the first ultrasonic image and the first standard ultrasonic image based on a pixel value of each pixel of the first ultrasonic image and a pixel value of each pixel of the first standard ultrasonic image.
[0094] In order to enable the ultrasound probe to explore the standard ultrasound image, SSIM (Structural Similarity Index) is introduced to evaluate the image quality of the ultrasound image. SSIM is an indicator used to measure the structural similarity of two images. Since the standard ultrasound image only requires the key structure to be displayed, the structural similarity index is more in line with the judgment of the quality of the ultrasound image by relevant personnel. Therefore, the second similarity between the first ultrasound image and the first standard ultrasound image is compared in three dimensions: brightness, contrast, and structure, and the final second similarity is a function of the three.
[0095] in, Fig.14 A flowchart of a method for determining a second similarity between a first ultrasonic image and a first standard ultrasonic image provided in an embodiment of the present application can be used to determine the second similarity between the first ultrasonic image and the first standard ultrasonic image through steps S141-S143. Fig.14 At least the following steps are included:
[0096] S141: Slide the set sliding window on the first ultrasound image with a set sliding step length to obtain pixel values of each pixel in the first area corresponding to the sliding window.
[0097] The size of the sliding window set above is set according to actual conditions while ensuring that it is smaller than or equal to the size of the first ultrasound image. The sliding step size set above can be set according to actual conditions.
[0098] Fig.15 A schematic diagram of a sliding window sliding on a first ultrasound image provided in an embodiment of the present application is shown in FIG. Fig.15 As shown, the size of the first ultrasonic image is 18*6, the size of the sliding window is 3*3, the sliding step is 2, the sliding window slides from the upper left edge of the first ultrasonic image in a sliding direction from left to right with a sliding step of 2, and the area corresponding to the sliding window on the first ultrasonic image is the first area.
[0099] S142: For each first region, determine the similarity between the first region and the second region based on the pixel value of each pixel of the first region and the pixel value of each pixel of the second region in the first standard ultrasound image corresponding to the first region.
[0100] in, Fig.16 A flowchart of a method for determining the similarity between a first region and a second region provided in an embodiment of the present application can be used to determine the similarity between the first region and the second region through steps S161-S164. Fig.16 At least the following steps are included:
[0101] S161: Determine a first sub-similarity between the first region and the second region based on the pixel value of each pixel in the first region and the pixel value of each pixel in the second region.
[0102] Optionally, a first sub-similarity between the first region and the second region is determined based on a first average pixel value of the first region and a second average pixel value of the second region.
[0103] Specifically, the first sub-similarity I can be determined by the following formula:
[0104]
[0105] Wherein, μ1 is the first average pixel value of the first area, μ2 is the second average pixel value of the second area, and C1 is a set constant.
[0106] The first average pixel value is determined according to the pixel values of each pixel in the first area, and the first average pixel value μ1 can be determined by the following formula:
[0107]
[0108] Where N is the total number of pixels in the first area, x i is the pixel value of the i-th pixel in the first region.
[0109] The second average pixel value is determined according to the pixel values of each pixel in the second area, and the second average pixel value μ2 can be determined by the following formula:
[0110]
[0111] The total number of pixels in the first area is the same as the total number of pixels in the second area, y i is the pixel value of the i-th pixel in the second area.
[0112] S162: Determine a second sub-similarity between the first region and the second region based on the first standard deviation and the second standard deviation.
[0113] Specifically, the second sub-similarity C can be determined by the following formula:
[0114]
[0115] Wherein, C2 is a set constant, σ1 is the first standard deviation of the first region, and σ2 is the second standard deviation of the second region.
[0116] The first standard deviation is determined according to the pixel value of each pixel in the first area and the first average pixel value of the first area. The first standard deviation σ1 can be determined by the following formula:
[0117]
[0118] Where N is the total number of pixels in the first area, x i is the pixel value of the i-th pixel in the first area, and μ1 is the first average pixel value of the first area.
[0119] The second standard deviation is determined according to the pixel value of each pixel in the second area and the second average pixel value of the second area. The second standard deviation σ2 can be determined by the following formula:
[0120]
[0121] The total number of pixels in the first area is the same as the total number of pixels in the second area, y i is the pixel value of the i-th pixel in the second area, and μ2 is the second average pixel value of the second area.
[0122] S163: Determine a third sub-similarity between the first region and the second region based on the covariance, the first standard deviation, and the second standard deviation.
[0123] Specifically, the third sub-similarity S can be determined by the following formula:
[0124]
[0125] Among them, C3 is the set constant, σ xy is the covariance, σ1 is the first standard deviation of the first region, and σ2 is the second standard deviation of the second region.
[0126] The above covariance is determined based on the pixel values of each pixel in the first area, the first average pixel value, the pixel values of each pixel in the second area, and the second average pixel value. The covariance σ can be determined by the following formula: xy :
[0127]
[0128] Wherein, N is the total number of pixels in the first area, and the total number of pixels in the first area is the same as the total number of pixels in the second area, μ1 is the first average pixel value of the first area, and x i is the pixel value of the i-th pixel in the first area, μ2 is the second average pixel value of the second area, and y i is the pixel value of the i-th pixel in the second area.
[0129] S164: Determine the similarity between the first region and the second region based on the first sub-similarity, the second sub-similarity, and the third sub-similarity.
[0130] Among them, the first sub-similarity is brightness, that is, the average grayscale is used as an estimate of brightness measurement; the second sub-similarity is contrast, that is, the drastic change in image brightness, that is, the standard deviation of pixel values; the third sub-similarity is structure, and the structure is represented by a vector composed of all pixels of the ultrasound image, while excluding the influence of brightness and contrast, that is, excluding the influence of mean and standard deviation, and the normalized image vector can be used for structural comparison.
[0131] Specifically, the similarity SSIM1 between the first region and the second region can be determined according to the following formula:
[0132] SSIM1 = I*C*S;
[0133] Among them, I is the first sub-similarity, C is the second sub-similarity, and S is the third sub-similarity.
[0134] For simplicity and speed of calculation, C3=C2 / 2 is set. Therefore, the above formula for determining the similarity SSIM1 between the first region and the second region can be simplified to the following formula:
[0135]
[0136] Among them, σ xyis the covariance, σ1 is the first standard deviation of the first area, σ2 is the second standard deviation of the second area, μ1 is the first average pixel value of the first area, μ2 is the second average pixel value of the second area, and C1 and C2 are set parameters.
[0137] S143: Obtain a second similarity based on the similarity between each first region and the second region.
[0138] Specifically, an average SSIM value of the entire first ultrasound image is calculated based on the similarities of the first regions, and the average SSIM value is the second similarity.
[0139] For example, the size of the first ultrasound image is 16*16, the size of the sliding window is 8*8, and the sliding step is 8. The sliding window is slid on the first ultrasound image with a sliding step of 8, and the area corresponding to the sliding window on the first ultrasound image is the first area. There are 4 first areas during the sliding window sliding process, namely, the first area A, the first area B, the first area C, and the first area D. It is determined that the first area A corresponds to the second area A in the first standard ultrasound image, the first area B corresponds to the second area B in the first standard ultrasound image, the first area C corresponds to the second area C in the first standard ultrasound image, and the first area D corresponds to the second area D in the first standard ultrasound image. If the similarity between the first area A and the second area A is SSIM1, the similarity between the first area B and the second area B is SSIM2, the similarity between the first area C and the second area C is SSIM3, and the similarity between the first area D and the second area D is SSIM4, then the target similarity between the first ultrasound image and the first standard ultrasound image is SSIM=(SSIM1+SSIM2+SSIM3+SSIM4) / 4.
[0140] S132: If the second similarity is less than the set threshold, determining first motion data according to the first ultrasound image, the second similarity and the first position information.
[0141] In the embodiment of the present application, if the second similarity is greater than or equal to the set threshold, the first ultrasound image is the target ultrasound image.
[0142] For example, the first ultrasound image is obtained by the user using an ultrasound probe to perform an initial scan on the first section. Fig.17 is a schematic diagram of a display page showing a first ultrasound image provided in an embodiment of the present application, such as Fig.17 As shown, the display page displays a first ultrasound image, i.e., a target ultrasound image, and a first standard ultrasound image, and displays first position information, i.e., position 1 of the ultrasound probe in the three-dimensional coordinate system. A prompt box "Ultrasound image quality has reached the standard" is popped up on the display page, which may also be other prompt information, so as to remind the user to save the target ultrasound image.
[0143] At present, the main methods for real-time guidance of ultrasound probes are: the first is an analysis method based on traditional image morphology, such as three-dimensional view navigation. However, the difficulty and limitation of this solution is that it is a traditional image morphology method, which performs analysis and guidance on existing images. It often requires the operator to reach the specified section first, requires certain experience for the operator, introduces additional workload, and has poor real-time performance. The second is an ultrasound probe navigation training method based on online reinforcement learning. However, the disadvantage of this solution is that online reinforcement learning is a method of imitating the user to move the virtual probe to collect ultrasound images in a virtual simulation environment, but in the real-world probe navigation task, the patient's anatomical structure is highly variable, so it is more complex and challenging. In order to solve the above problems, this application adopts an offline reinforcement learning method to learn ultrasound probe operation experience from existing expert data, which effectively solves the problem of the difference between the real environment and the virtual environment.
[0144] Optionally, determining the first action data according to the first ultrasonic image, the second similarity and the first position information includes:
[0145] The first ultrasound image, the second similarity, and the first position information are input into an offline deep reinforcement learning model to obtain first action data.
[0146] The above-mentioned offline deep reinforcement learning model can be BCQ (Batch-Constrained deep Q-learning), BEAR (Bootstrapping Error Accumulation Reduction), BRAC (Behavior Regularized Actor Critic), IQL (Implicit Q-learning), CQL (Conservative Q-Learning), OneStep (One-step strategy improvement algorithm), AWR (Advantage-Weighted Regression), CRR (Critic Regularized Regression), AWAC (Advantage Weighted ActorCritic) and other models.
[0147] Since a slight change in the posture of the ultrasonic probe may cause a sudden change in the ultrasonic image, the present application draws on the idea of hierarchical reinforcement learning to control the movement of the ultrasonic probe in a coarse-to-fine manner. The coarse-grained action guides the ultrasonic probe to quickly reach the designated position, and the fine-grained action is used for posture fine-tuning to find the best ultrasonic image. Specifically, in the process of inputting the first ultrasonic image, the second similarity and the first position information into the offline deep reinforcement learning model for processing, the action is divided into coarse-grained action (x, y, z, α, β, γ) and fine-grained action (x', y', z', α', β', γ'). The coarse-grained action has low precision and a large range of action changes, while the fine-grained action has high precision and a small range of action changes. When the second similarity is less than or equal to the set similarity, it means that the first ultrasonic image is still a certain distance away from the first standard ultrasonic image, and a coarse-grained action needs to be obtained, where the set similarity is less than the set threshold; when the second similarity is greater than the set similarity, it means that the first ultrasonic image is close to the first standard ultrasonic image and a fine-grained action needs to be obtained.
[0148] In addition, the ultrasound probe is in close contact with the patient, and the offline deep reinforcement learning model will explore unsafe actions during the learning process, which may cause harm to the patient. Therefore, unsafe actions need to be limited. Here, x, y and z need to be less than the set first threshold, and α, β and γ need to be less than the set second threshold. The first threshold can be 5 cm, or it can be set according to actual conditions. The second threshold can be 30°, or it can be set according to actual conditions.
[0149] in, Fig.18 A flowchart of a training method for an offline deep reinforcement learning model provided in an embodiment of the present application, such as Fig.18 As shown, including:
[0150] S181: Obtain a training sample set.
[0151] The above training sample set includes multiple groups of training data.
[0152] In order to improve the accuracy of the offline deep reinforcement model, the training data of this application takes into account the data at historical moments. Therefore, each set of training data includes the ultrasound image and position information at the current moment, at least one ultrasound image and position information at a historical moment, the ultrasound image and position information at the next moment, action data, and the similarity between the ultrasound image at the current moment and the corresponding standard ultrasound image. Among them, the action data is the ultrasound probe moving from the position information at the current moment to the position information at the next moment according to the action data.
[0153] For example, the training data at time t includes the ultrasound image and position information at time t, that is, s0 = (pos, img) t, 9 ultrasound images and position information at historical moments, that is, s1 = [(pos,img) t-9 ,…,(pos,img) t-1 ], where (pos,img) i is the ultrasound image img and position information pos at the i-th moment, and the ultrasound image and position information at the t+1th moment, that is, s t+1 =(pos,img) t+1 , action data a t and the similarity r between the ultrasound image at time t and the standard ultrasound image t Therefore, the set of training data can be expressed as (s t ,a t ,r t ,s t+1 ), where s t =[s0,s1].
[0154] Each set of training data may also only include the ultrasound image and position information at the current moment, the ultrasound image and position information at the next moment, the motion data, and the similarity between the ultrasound image at the current moment and the corresponding standard ultrasound image.
[0155] S182: Input each group of training data in the training sample set into a pre-built offline deep reinforcement learning model, process it using the pre-built offline deep reinforcement learning model, and train the pre-built offline deep reinforcement learning model with the goal of outputting the motion data of the ultrasound image at the current moment.
[0156] S183: Until the pre-built offline deep reinforcement learning model converges, an offline deep reinforcement learning model is obtained.
[0157] Since only offline data is used for learning, the agent cannot fully explore the action space, resulting in an inability to accurately estimate the value of certain actions and extrapolation errors. To solve this problem, this application uses an offline deep reinforcement learning model. Taking the BCQ model as an example, Fig.19 Schematic diagram of a BCQ model provided in the embodiment of the present application. Fig.19 As shown in Figure 1, the BCQ model consists of two parts: the evaluation network (Critic network) and the policy network (Actor network). The Actor network is used to generate actions, and the Critic network is used to evaluate the quality of actions.
[0158] When the offline deep reinforcement learning model is a BCQ model, the specific training process of the BCQ model is as follows: Fig. 20 As shown, including:
[0159] S201: Initialize the pre-built BCQ model.
[0160] like Fig.19 As shown, the BCQ model includes the value network Value Network Perturbation Network ξ φ , VAE (Variational AutoEncoder) generation network, target value network Target Value Network and the target perturbation network ξ φ′ Among them, VAE generates network G ω Including encoder and decoder Right now The value network is used to evaluate the value of the action, and the perturbation network and VAE generation network are used to generate the action. The target value network is introduced to update the parameters through soft update, making the learning process more stable.
[0161] S202: Obtain training data.
[0162] N groups of training data (s, a, r, s′) are sampled from the data storage device, where s is the ultrasound image and position information at the current moment, that is, the state data at the current moment; a is the action data; r is the similarity between the ultrasound image at the current moment and the corresponding standard ultrasound image; s′ is the ultrasound image and position information at the next moment, that is, the state data at the next moment.
[0163] S203: Input the training data into a pre-built BCQ model.
[0164] S204: Based on the training data, use the VAE to generate a network to generate action data.
[0165] The current state data s and action data a in the training data are input into the VAE generation network to obtain parameters μ and σ, that is, μ, in, is the encoder in the VAE generation network. Based on the parameters μ and σ, the parameter z that obeys the Gaussian distribution is determined, that is, z~N(μ,σ). The current state data s and parameter z are input into the VAE generation network to obtain the action data generated by the VAE generation network. Right now in, Generate the decoder in the VAE network. According to the action data a and the generated action data Use the following formula to update the network parameter ω of the VAE generation network:
[0166]
[0167] Among them, N(0,1) represents 0-1 distribution, argmin means to make the formula reach the minimum value, D KL Relative entropy is calculated.
[0168] Sample n actions using the updated VAE generator network In order to increase the diversity of action data, the perturbation network ξ is used φ Add a perturbation to each action Among them, G ω is the VAE generated network, Φ is the parameter of the perturbation network, and n can be set according to actual conditions.
[0169] S205: Based on the training data and the generated action data, the value corresponding to each action data is determined using a value network.
[0170] For the generated i-th action data a i , use the following formula to determine the corresponding value y:
[0171]
[0172] Among them, γ is the discount factor, γ∈(0,1], γ can be 0.99; r is the similarity; λ is a hyperparameter, which can be 0.5. Both γ and λ are used to limit the impact of the future on the present. and is the target value network, and the current value network and have the same network structure. The value range of i is [1, n], s ′ It is the state data of the next moment.
[0173] S206: According to the value corresponding to each action data, the loss function is used to update the parameters of the value network and the perturbation network.
[0174] The value network Q can be updated using the following formula: θ Parameters θ:
[0175] θ←argmin θ ∑(yQ θ (s,a)) 2 ;
[0176] Among them, y is the value corresponding to an action data, argmin means making the formula reach the minimum value, s is the state data at the current moment, and a is the action data.
[0177] The perturbation network ξ can be updated using the following formula φ Parameter Φ:
[0178]
[0179] Among them, ξ φ (s,a,Φ) is the perturbation network, s is the state data at the current moment, and a is the action data. For the value network.
[0180] S207: Based on the update coefficient, soft update the parameters of the target value network and the target perturbation network.
[0181] The parameter θ′ of the target value network can be updated using the following formula: i :
[0182] θ′ i ←τθ+(1-τ)θ′ i ;
[0183] The parameter φ′ of the target perturbation network can be updated using the following formula:
[0184] φ′←τφ+(1-τ)φ′;
[0185] Among them, τ is the update coefficient, θ is the parameter of the value network, and θ′ i is the parameter of the i-th target value network, the value range of i is [1,2], φ is the parameter of the perturbation network, and φ′ is the parameter of the target perturbation network.
[0186] S208: Determine whether the pre-built BCQ model converges. If so, execute step S209; otherwise, execute step S202.
[0187] S209: Obtain the trained BCQ model.
[0188] This application collects rich and diverse expert data collected by relevant experts when using ultrasonic equipment in advance, that is, training data, and conducts strategy learning from the existing expert data without interacting with the environment, so as to maximize the target benefit and reach the decision-making level of relevant experts. The offline deep reinforcement learning model in this application is complete in design, intuitive in process, does not require human-computer interaction and simulation experiments, and is easy to implement.
[0189] After obtaining the offline deep reinforcement learning model, the present application can introduce the "fine-tuning" method in the field of natural language processing, first learning the strategy from the offline data set, and then further training the offline deep reinforcement learning model by interacting with the real environment, so that the offline deep reinforcement learning model is better than the model trained simply from the offline data set.
[0190] The present application can improve the accuracy of ultrasound images collected using an ultrasound probe, that is, it can guide users to obtain more accurate ultrasound images, and the overall process of the method provided by the present application is simple and highly feasible.
[0191] Based on the same inventive concept, the present application embodiment provides an ultrasonic image processing device, such as Fig.21 As shown, it includes the following units:
[0192] The first display unit 211 is used to display a first ultrasound image corresponding to a first section in response to a first operation; wherein the first operation is that a user uses an ultrasound probe to scan the first section;
[0193] The second display unit 212 is used to display the first action data; wherein the first action data is generated according to the first ultrasound image, the first standard ultrasound image and the first position information; the first position information is the position of the ultrasound probe after the first operation; the first action data includes the movement information and the rotation information of the ultrasound probe; the first standard ultrasound image is a pre-stored standard scan image of the first section;
[0194] The third display unit 213 is used to display the second ultrasound image corresponding to the first section in response to the second operation; wherein the second operation is that the user moves the ultrasound probe according to the first action data.
[0195] In some possible designs, the above device further includes:
[0196] A fourth display unit is used to display the first page; wherein the first page includes N standard ultrasound images of N sections of the first organ;
[0197] The selection unit is used to determine a first section selected by the user in response to a section selection operation performed by the user on the first page, and to display a first standard ultrasound image of the first section.
[0198] In some possible designs, the movement information of the ultrasonic probe includes movement direction information and movement distance information, and the rotation information of the ultrasonic probe includes rotation angle information and rotation direction information.
[0199] In some possible designs, the third display unit 213 is also used for:
[0200] If the second ultrasound image meets the scanning condition, the second ultrasound image is displayed as the target ultrasound image; wherein the scanning condition is determined based on the second ultrasound image and the first standard ultrasound image.
[0201] In some possible designs, the scanning condition is that a first similarity between the second ultrasound image and the first standard ultrasound image is greater than or equal to a set threshold.
[0202] In some possible designs, the second display unit 212 is used to generate the first action data in the following manner:
[0203] determining a second similarity between the first ultrasonic image and the first standard ultrasonic image based on a pixel value of each pixel of the first ultrasonic image and a pixel value of each pixel of the first standard ultrasonic image;
[0204] If the second similarity is less than the set threshold, the first motion data is determined according to the first ultrasound image, the second similarity and the first position information.
[0205] In some possible designs, the second display unit 212 is used for:
[0206] Slide the set sliding window on the first ultrasound image with a set sliding step length to obtain pixel values of each pixel in the first area corresponding to the sliding window;
[0207] For each first region, determining a similarity between the first region and the second region based on a pixel value of each pixel of the first region and a pixel value of each pixel of the second region in a first standard ultrasound image corresponding to the first region;
[0208] Based on the similarity between each first region and the second region, a second similarity is obtained.
[0209] In some possible designs, the second display unit 212 is used for:
[0210] Determining a first sub-similarity between the first region and the second region based on a pixel value of each pixel of the first region and a pixel value of each pixel of the second region;
[0211] Determine a second sub-similarity between the first region and the second region based on the first standard deviation and the second standard deviation; wherein the first standard deviation is determined based on the pixel value of each pixel in the first region and the first average pixel value of the first region; and the second standard deviation is determined based on the pixel value of each pixel in the second region and the second average pixel value of the second region;
[0212] Determine a third sub-similarity between the first region and the second region based on the covariance, the first standard deviation, and the second standard deviation; wherein the covariance is determined based on the pixel value of each pixel of the first region, the first average pixel value, the pixel value of each pixel of the second region, and the second average pixel value;
[0213] Based on the first sub-similarity, the second sub-similarity, and the third sub-similarity, a similarity between the first region and the second region is determined.
[0214] In some possible designs, the second display unit 212 is used for:
[0215] The first ultrasound image, the second similarity, and the first position information are input into an offline deep reinforcement learning model to obtain first action data.
[0216] In some possible designs, the second display unit 212 is used for:
[0217] Acquire a training sample set, wherein the training sample set includes multiple groups of training data, each group of training data includes an ultrasound image and position information at a current moment, at least one ultrasound image and position information at a historical moment, an ultrasound image and position information at a next moment, action data, and a similarity between the ultrasound image at the current moment and a corresponding standard ultrasound image; the action data is the ultrasound probe moving from the position information at the current moment to the position information at the next moment according to the action data;
[0218] Input each set of training data in the training sample set into a pre-built offline deep reinforcement learning model, process the data using the pre-built offline deep reinforcement learning model, and train the pre-built offline deep reinforcement learning model with the goal of outputting the motion data of the ultrasound image at the current moment;
[0219] Until the pre-built offline deep reinforcement learning model converges, an offline deep reinforcement learning model is obtained.
[0220] Since the above-mentioned device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0221] In some embodiments, based on the same inventive concept, an ultrasonic image processing device is also provided in the embodiments of the present application. The device can realize the ultrasonic image processing function discussed above. Please refer to Fig. 22 , the device includes a processor 221 and a memory 222, wherein the memory 222 is used to store program instructions;
[0222] The processor 221 calls the program instructions stored in the memory and executes the program instructions to implement:
[0223] In response to a first operation, a first ultrasound image corresponding to the first section is displayed; wherein the first operation is that the user uses an ultrasound probe to scan the first section;
[0224] Displaying first action data; wherein the first action data is generated according to the first ultrasound image, the first standard ultrasound image and the first position information; the first position information is the position of the ultrasound probe after the first operation; the first action data includes movement information and rotation information of the ultrasound probe; the first standard ultrasound image is a pre-stored standard scan image of the first section;
[0225] In response to a second operation, a second ultrasound image corresponding to the first section is displayed; wherein the second operation is that the user moves the ultrasound probe according to the first action data.
[0226] In one possible design, the processor 221 is further configured to execute:
[0227] Displaying a first page; wherein the first page includes N standard ultrasound images of N sections of the first organ;
[0228] In response to the user's section selection operation on the first page, the first section selected by the user is determined, and a first standard ultrasound image of the first section is displayed.
[0229] In a possible design, the movement information of the ultrasonic probe includes movement direction information and movement distance information, and the rotation information of the ultrasonic probe includes rotation angle information and rotation direction information.
[0230] In one possible design, the processor 221 is further configured to execute:
[0231] If the second ultrasound image meets the scanning condition, the second ultrasound image is displayed as the target ultrasound image; wherein the scanning condition is determined based on the second ultrasound image and the first standard ultrasound image.
[0232] In a possible design, the scanning condition is that a first similarity between the second ultrasound image and the first standard ultrasound image is greater than or equal to a set threshold.
[0233] In a possible design, the first action data is generated in the following manner:
[0234] determining a second similarity between the first ultrasonic image and the first standard ultrasonic image based on a pixel value of each pixel of the first ultrasonic image and a pixel value of each pixel of the first standard ultrasonic image;
[0235] If the second similarity is less than the set threshold, the first motion data is determined according to the first ultrasound image, the second similarity and the first position information.
[0236] In one possible design, determining a second similarity between the first ultrasound image and the first standard ultrasound image based on a pixel value of each pixel of the first ultrasound image and a pixel value of each pixel of the first standard ultrasound image includes:
[0237] Slide the set sliding window on the first ultrasound image with a set sliding step length to obtain pixel values of each pixel in the first area corresponding to the sliding window;
[0238] For each first region, determining a similarity between the first region and the second region based on a pixel value of each pixel of the first region and a pixel value of each pixel of the second region in a first standard ultrasound image corresponding to the first region;
[0239] Based on the similarity between each first region and the second region, a second similarity is obtained.
[0240] In one possible design, determining the similarity between the first region and the second region based on the pixel value of each pixel of the first region and the pixel value of each pixel of the second region in the first standard ultrasound image corresponding to the first region includes:
[0241] Determining a first sub-similarity between the first region and the second region based on a pixel value of each pixel of the first region and a pixel value of each pixel of the second region;
[0242] Determine a second sub-similarity between the first region and the second region based on the first standard deviation and the second standard deviation; wherein the first standard deviation is determined based on the pixel value of each pixel in the first region and the first average pixel value of the first region; and the second standard deviation is determined based on the pixel value of each pixel in the second region and the second average pixel value of the second region;
[0243] Determine a third sub-similarity between the first region and the second region based on the covariance, the first standard deviation, and the second standard deviation; wherein the covariance is determined based on the pixel value of each pixel of the first region, the first average pixel value, the pixel value of each pixel of the second region, and the second average pixel value;
[0244] Based on the first sub-similarity, the second sub-similarity, and the third sub-similarity, a similarity between the first region and the second region is determined.
[0245] In a possible design, determining the first action data according to the first ultrasound image, the second similarity and the first position information includes:
[0246] The first ultrasound image, the second similarity, and the first position information are input into an offline deep reinforcement learning model to obtain first action data.
[0247] In one possible design, the offline deep reinforcement learning model is trained by:
[0248] Acquire a training sample set, wherein the training sample set includes multiple groups of training data, each group of training data includes an ultrasound image and position information at a current moment, at least one ultrasound image and position information at a historical moment, an ultrasound image and position information at a next moment, action data, and a similarity between the ultrasound image at the current moment and a corresponding standard ultrasound image; the action data is the ultrasound probe moving from the position information at the current moment to the position information at the next moment according to the action data;
[0249] Input each set of training data in the training sample set into a pre-built offline deep reinforcement learning model, process the data using the pre-built offline deep reinforcement learning model, and train the pre-built offline deep reinforcement learning model with the goal of outputting the motion data of the ultrasound image at the current moment;
[0250] Until the pre-built offline deep reinforcement learning model converges, an offline deep reinforcement learning model is obtained.
[0251] The embodiment of the present application further provides a computer storage medium, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned ultrasound image processing method.
[0252] In some possible implementations, various aspects of the present application may also be implemented in the form of a program product, the computer program product including a computer program code, which, when executed on a computer, enables the computer to execute any of the ultrasound image processing methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the ultrasound image processing method, the implementation of the above computer program product may refer to the implementation of the method, and the repeated parts will not be repeated.
[0253] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0254] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0255] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0256] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0257] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for processing an ultrasound image, It is characterized in that include: In response to a first operation, displaying a first ultrasound image corresponding to a first section; wherein the first operation is that a user uses an ultrasound probe to scan the first section; Displaying first action data; wherein the first action data is generated according to the first ultrasound image, the first standard ultrasound image and the first position information; the first position information is the position of the ultrasound probe after the first operation; the first action data includes the movement information and the rotation information of the ultrasound probe; the first standard ultrasound image is a pre-stored standard scan image of the first section; In response to a second operation, a second ultrasound image corresponding to the first section is displayed; wherein the second operation is that the user moves the ultrasound probe according to the first motion data.
2. The method according to claim 1, It is characterized in that Also includes: Displaying a first page; wherein the first page includes N standard ultrasound images of N sections of the first organ; In response to the user's section selection operation on the first page, a first section selected by the user is determined, and a first standard ultrasound image of the first section is displayed.
3. The method according to claim 1, It is characterized in that The movement information of the ultrasonic probe includes movement direction information and movement distance information, and the rotation information of the ultrasonic probe includes rotation angle information and rotation direction information.
4. The method according to claim 1, It is characterized in that Also includes: If the second ultrasound image meets the scanning condition, the second ultrasound image is displayed as a target ultrasound image; wherein the scanning condition is determined based on the second ultrasound image and the first standard ultrasound image.
5. The method according to claim 4, It is characterized in that The scanning condition is that a first similarity between the second ultrasound image and the first standard ultrasound image is greater than or equal to a set threshold.
6. The method according to claim 1, It is characterized in that The first action data is generated by: determining a second similarity between the first ultrasonic image and the first standard ultrasonic image based on a pixel value of each pixel of the first ultrasonic image and a pixel value of each pixel of the first standard ultrasonic image; If the second similarity is less than a set threshold, the first motion data is determined according to the first ultrasound image, the second similarity and the first position information.
7. The method according to claim 6, It is characterized in that The determining, based on the pixel value of each pixel of the first ultrasonic image and the pixel value of each pixel of the first standard ultrasonic image, a second similarity between the first ultrasonic image and the first standard ultrasonic image comprises: Sliding the set sliding window on the first ultrasound image with a set sliding step length, and obtaining pixel values of each pixel in the first area corresponding to the sliding window; For each first region, determining a similarity between the first region and the second region based on a pixel value of each pixel of the first region and a pixel value of each pixel of a second region in the first standard ultrasound image corresponding to the first region; The second similarity is obtained based on the similarity between each first region and the second region.
8. The method according to claim 7, It is characterized in that The determining the similarity between the first region and the second region based on the pixel value of each pixel of the first region and the pixel value of each pixel of the second region in the first standard ultrasound image corresponding to the first region comprises: Determining a first sub-similarity between the first region and the second region based on a pixel value of each pixel of the first region and a pixel value of each pixel of the second region; Determining a second sub-similarity between the first region and the second region based on a first standard deviation and a second standard deviation; wherein the first standard deviation is determined based on a pixel value of each pixel in the first region and a first average pixel value of the first region; and the second standard deviation is determined based on a pixel value of each pixel in the second region and a second average pixel value of the second region; Determine a third sub-similarity between the first region and the second region based on the covariance, the first standard deviation, and the second standard deviation; wherein the covariance is determined according to the pixel values of each pixel of the first region, the first average pixel value, the pixel values of each pixel of the second region, and the second average pixel value; Based on the first sub-similarity, the second sub-similarity, and the third sub-similarity, a similarity between the first region and the second region is determined.
9. The method according to claim 6, It is characterized in that The determining the first action data according to the first ultrasonic image, the second similarity and the first position information includes: The first ultrasound image, the second similarity and the first position information are input into an offline deep reinforcement learning model to obtain the first action data.
10. The method according to claim 9, It is characterized in that The offline deep reinforcement learning model is trained by the following method: Acquire a training sample set, wherein the training sample set includes multiple groups of training data, each group of training data includes an ultrasound image and position information at a current moment, at least one ultrasound image and position information at a historical moment, an ultrasound image and position information at a next moment, action data, and a similarity between the ultrasound image at the current moment and a corresponding standard ultrasound image; the action data is the ultrasound probe moving from the position information at the current moment to the position information at the next moment according to the action data; Inputting each set of training data in the training sample set into a pre-constructed offline deep reinforcement learning model, processing the pre-constructed offline deep reinforcement learning model, and training the pre-constructed offline deep reinforcement learning model with the goal of outputting the motion data of the ultrasound image at the current moment; Until the pre-built offline deep reinforcement learning model converges, the offline deep reinforcement learning model is obtained.
