CN117952891A - Medical image segmentation method and electronic equipment - Google Patents

Medical image segmentation method and electronic equipment Download PDF

Info

Publication number
CN117952891A
CN117952891A CN202211313552.9A CN202211313552A CN117952891A CN 117952891 A CN117952891 A CN 117952891A CN 202211313552 A CN202211313552 A CN 202211313552A CN 117952891 A CN117952891 A CN 117952891A
Authority
CN
China
Prior art keywords
particle
global optimal
optimal position
weight coefficient
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211313552.9A
Other languages
Chinese (zh)
Inventor
徐传鹏
李其花
刘于豪
吴海燕
孙林
李和意
陈永健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Hisense Medical Equipment Co Ltd
Original Assignee
Qingdao Hisense Medical Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Medical Equipment Co Ltd filed Critical Qingdao Hisense Medical Equipment Co Ltd
Priority to CN202211313552.9A priority Critical patent/CN117952891A/en
Publication of CN117952891A publication Critical patent/CN117952891A/en
Pending legal-status Critical Current

Links

Landscapes

  • Apparatus For Radiation Diagnosis (AREA)

Abstract

The disclosure provides a segmentation method of medical images and electronic equipment. The method is used for improving the accuracy of image segmentation. Comprising the following steps: randomly determining a plurality of particles in the medical image; respectively inputting the current positions of the particles into a preset fitness function to obtain fitness values of the particles; updating the current position of each particle by using the global optimal position in the current position of each particle obtained through the fitness value of each particle and an inertia weight coefficient corresponding to the current iteration number, and returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the designated iteration number, updating the global optimal position based on the fitness value and the current position of each particle, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decreasing updating strategy; and dividing the medical image according to the image dividing threshold value obtained based on the updated global optimal position, and obtaining the divided medical image.

Description

Medical image segmentation method and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a medical image segmentation method and an electronic device.
Background
The medical image segmentation is a key problem for determining whether the medical image can provide reliable basis in clinical diagnosis and treatment, and aims to segment out parts with certain special meanings in the medical image and extract relevant characteristics, so as to provide reliable basis for clinical diagnosis and treatment and pathology research and assist doctors to make more accurate diagnosis. Along with the rapid development and popularization of medical imaging equipment, CT (Computed Tomography, electronic computer tomography) equipment and the like are commonly applied to daily clinical diagnosis processes, more clear CT imaging and the like can obtain images reflecting the physiological and physical characteristics of human bodies in two-dimensional and three-dimensional areas, and human body target organs are separated in an automatic or manual mode, so that the images are more visual to be presented, and the three-dimensional structures of human body tissue organs are reconstructed. The distribution of tissue and organs around the focus can be displayed through a three-dimensional visualization technology, and the method becomes an indispensable technical means for medical institutions to develop disease diagnosis, operation planning, prognosis evaluation and follow-up.
In the prior art, the medical image segmentation method is to segment an image by combining a particle swarm algorithm and an Otsu algorithm, wherein an image segmentation threshold value is determined through the particle swarm algorithm, and then the image segmentation threshold value is input into an OTSU algorithm for image segmentation. However, in the particle swarm algorithm in the prior art, the inertia weight coefficient updating strategy is linearly decreased, so that the optimal value is not easily searched in the initial iteration stage of the particle swarm algorithm, and the local extremum is trapped in the later iteration stage. So that the accuracy of image segmentation is low.
Disclosure of Invention
An exemplary embodiment of the disclosure provides a medical image segmentation method and an electronic device, which are used for improving accuracy of image segmentation.
A first aspect of the present disclosure provides a method of segmentation of a medical image, the method comprising:
Randomly determining a specified number of particles in any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image;
respectively inputting the current positions of the particles into a preset fitness function to obtain fitness values of the particles;
Obtaining a global optimal position in the current position of each particle through the fitness value of each particle;
After updating the current position of each particle by using the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the designated iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy;
obtaining an image segmentation threshold based on the updated global optimal position;
And dividing the medical image according to the image dividing threshold value to obtain a divided medical image.
In this embodiment, an image segmentation threshold is determined by improving an update strategy of an inertia weight coefficient in a particle swarm algorithm, and then an image is segmented by the image segmentation threshold. The invention changes the updating strategy of the inertia weight coefficient into the nonlinear decreasing updating strategy, thereby enabling the particle swarm algorithm to keep a larger value in a longer time in the initial stage of iteration, and solving the problem that the optimal value is easily not searched in the early stage of the linear weight updating strategy in the prior art, so that the local extremum is trapped in the later stage of iteration. The accuracy of image segmentation is improved.
In one embodiment, the inertial weight coefficient corresponding to the current number of iterations is determined by the following formula:
Wherein ω is the inertial weight coefficient, ω max is the maximum value of the preset inertial weight coefficient, ω min is the minimum value of the preset inertial weight coefficient, t max is the specified number of iterations, a is a first preset curve control coefficient, and b is a second preset curve control coefficient.
The inertia weight coefficient in the embodiment is in nonlinear decrease, so that the particle swarm algorithm keeps a larger value in a longer time in the initial stage of iteration, and the problem that the optimal value is easily not searched in the early stage of the linear weight updating strategy in the prior art, so that the local extremum is trapped in the later stage of iteration is solved. The accuracy of image segmentation is improved.
In one embodiment, the obtaining the global optimal position in the current position of each particle through the fitness value of each particle includes:
and determining the position of the particle with the highest fitness value in the particles as the global optimal position.
In this embodiment, the position of the particle with the highest fitness value in each particle is determined as the global optimal position, so that the determined global optimal position is more accurate, and the accuracy of image segmentation is further improved.
In one embodiment, before updating the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number, the method further includes:
for any one particle, determining the fitness value of the particle and the position corresponding to the highest fitness value in the fitness values of the particle in historical iteration as the optimal position of the particle;
The updating the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number comprises the following steps:
Updating the speed of the particles according to the optimal position of the particles, the global optimal position and the inertia weight coefficient corresponding to the current iteration times to obtain the updated speed of the particles;
And obtaining the updated position of the particle based on the updated speed of the particle and the current position of the particle.
In this embodiment, the current position of the particle is updated according to the optimal position and the global optimal position of the particle, so that the current position of the updated example is more accurate, and the accuracy of image segmentation is further improved.
In one embodiment, the updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position includes:
Determining the position of the particle corresponding to the highest fitness in the fitness of each particle as the updated global optimal position;
The obtaining an image segmentation threshold based on the updated global optimal position includes:
And determining a target particle according to the updated global optimal position, and determining the image segmentation threshold value based on a plurality of pixel points corresponding to the target particle.
According to the embodiment, the image segmentation threshold value is determined through the global optimal position, so that the accuracy of the image segmentation threshold value is improved.
In one embodiment, the segmenting the medical image according to the image segmentation threshold value, to obtain a segmented medical image, includes:
For any pixel point in the medical image, if the pixel value of the pixel point is larger than the image segmentation threshold value, determining the pixel point as the foreground pixel point; or alternatively, the first and second heat exchangers may be,
If the pixel value of the pixel point is not greater than the image segmentation threshold value, determining the pixel point as the background pixel point;
and dividing the medical image based on each foreground pixel point and each background dividing point to obtain the divided medical image.
A second aspect of the present disclosure provides an electronic device comprising a memory and a processor, wherein:
the memory is configured to store ultrasound images to be spliced;
the processor is configured to:
Randomly determining a specified number of particles in any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image;
respectively inputting the current positions of the particles into a preset fitness function to obtain fitness values of the particles;
Obtaining a global optimal position in the current position of each particle through the fitness value of each particle;
After updating the current position of each particle by using the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the designated iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy;
obtaining an image segmentation threshold based on the updated global optimal position;
And dividing the medical image according to the image dividing threshold value to obtain a divided medical image.
In one embodiment, the processor is further configured to:
determining an inertial weight coefficient corresponding to the current iteration number by the following formula:
Wherein ω is the inertial weight coefficient, ω max is the maximum value of the preset inertial weight coefficient, ω min is the minimum value of the preset inertial weight coefficient, t max is the specified number of iterations, a is a first preset curve control coefficient, and b is a second preset curve control coefficient.
In one embodiment, the processor executes the fitness value passing through each particle to obtain a global optimal position among the current positions of each particle, and is specifically configured to:
and determining the position of the particle with the highest fitness value in the particles as the global optimal position.
In one embodiment, the processor is further configured to:
Before updating the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number, determining the fitness value of each particle and the position corresponding to the highest fitness value in the fitness values of the particles in the historical iteration as the optimal position of each particle;
the processor executes the method to update the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number, and is specifically configured to:
Updating the speed of the particles according to the optimal position of the particles, the global optimal position and the inertia weight coefficient corresponding to the current iteration times to obtain the updated speed of the particles;
And obtaining the updated position of the particle based on the updated speed of the particle and the current position of the particle.
In one embodiment, the processor performs the updating of the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, and is specifically configured to:
Determining the position of the particle corresponding to the highest fitness in the fitness of each particle as the updated global optimal position;
The obtaining an image segmentation threshold based on the updated global optimal position includes:
And determining a target particle according to the updated global optimal position, and determining the image segmentation threshold value based on a plurality of pixel points corresponding to the target particle.
In one embodiment, the processor performs the segmentation of the medical image according to the image segmentation threshold to obtain a segmented medical image, and is specifically configured to:
For any pixel point in the medical image, if the pixel value of the pixel point is larger than the image segmentation threshold value, determining the pixel point as the foreground pixel point; or alternatively, the first and second heat exchangers may be,
If the pixel value of the pixel point is not greater than the image segmentation threshold value, determining the pixel point as the background pixel point;
and dividing the medical image based on each foreground pixel point and each background dividing point to obtain the divided medical image.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions for execution by the at least one processor; the instructions are executable by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
According to a fourth aspect provided by embodiments of the present disclosure, there is provided a computer storage medium storing a computer program for performing the method according to the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is one of the applicable scene schematics in one embodiment according to the present disclosure;
FIG. 2 is a second schematic view of an applicable scenario in one embodiment of the present disclosure;
FIG. 3 is a third view of an applicable scenario in accordance with one embodiment of the present disclosure;
FIG. 4 is one of the flow diagrams of a method of segmentation of medical images according to one embodiment of the present disclosure;
FIG. 5 is a flow diagram of updating particle locations according to one embodiment of the present disclosure;
FIG. 6 is a graph of inertial weight coefficients according to one embodiment of the present disclosure;
FIG. 7 is a comparison graph of inertial weight coefficients according to one embodiment of the present disclosure;
FIG. 8 is a second flow chart of a method of segmenting medical images according to one embodiment of the present disclosure;
FIG. 9 is a segmentation apparatus of a medical image according to an embodiment of the present disclosure;
Fig. 10 is a schematic structural view of an electronic device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
The term "and/or" in the embodiments of the present disclosure describes an association relationship of association objects, which indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The application scenario described in the embodiments of the present disclosure is for more clearly describing the technical solution of the embodiments of the present disclosure, and does not constitute a limitation on the technical solution provided by the embodiments of the present disclosure, and as a person of ordinary skill in the art can know that, with the appearance of a new application scenario, the technical solution provided by the embodiments of the present disclosure is equally applicable to similar technical problems. In the description of the present disclosure, unless otherwise indicated, the meaning of "a plurality" is two or more.
In the prior art, the medical image segmentation method is to segment an image by combining a particle swarm algorithm and an Otsu algorithm, wherein an image segmentation threshold value is determined through the particle swarm algorithm, and then the image segmentation threshold value is input into an OTSU algorithm for image segmentation. However, in the particle swarm algorithm in the prior art, the inertia weight coefficient updating strategy is linearly decreased, so that the optimal value is not easily searched in the initial iteration stage of the particle swarm algorithm, and the local extremum is trapped in the later iteration stage. So that the accuracy of image segmentation is low.
Accordingly, the present disclosure provides a method of segmenting medical images by determining an image segmentation threshold by improving an update strategy of inertial weight coefficients in a particle swarm algorithm, and then segmenting the images by the image segmentation threshold. The invention changes the updating strategy of the inertia weight coefficient into the nonlinear decreasing strategy, thereby enabling the particle swarm algorithm to keep a larger value in a longer time in the initial stage of iteration, and solving the problem that the optimal value is easily not searched in the early stage of the linear weight updating strategy in the prior art, so that the local extremum is trapped in the later stage of iteration. The accuracy of image segmentation is improved. The following describes aspects of the present disclosure in detail with reference to the accompanying drawings.
As shown in fig. 1, an application scenario of a medical image segmentation method includes a terminal device 110 and a server 120, and the application scenario is described by taking an electronic device as an example of the server 120.
In one possible application scenario, the server 120 randomly determines a specified number of particles in any one medical image, where any one particle is obtained based on a plurality of adjacent pixels in the medical image; the current positions of the particles are respectively input into a preset fitness function to obtain fitness values of the particles; then, the server 120 obtains the global optimal position in the current position of each particle through the fitness value of each particle; after updating the current position of each particle by utilizing the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the appointed iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy; then, the server 120 obtains an image segmentation threshold value based on the updated global optimal position; and dividing the medical image according to the image division threshold value, and after obtaining the divided medical image, the server 120 sends the divided medical image to the terminal device 110 for display.
As shown in fig. 2, a second application scenario is schematically illustrated, where the application scenario includes a terminal device 110, a server 120, and a memory 130. The server 120 obtains medical images from the memory 130, and randomly determines a specified number of particles in the medical images for any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image; the current positions of the particles are respectively input into a preset fitness function to obtain fitness values of the particles; then, the server 120 obtains the global optimal position in the current position of each particle through the fitness value of each particle; after updating the current position of each particle by utilizing the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the appointed iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy; then, the server 120 obtains an image segmentation threshold value based on the updated global optimal position; and dividing the medical image according to the image division threshold value, and after obtaining the divided medical image, the server 120 sends the divided medical image to the terminal device 110 for display.
As shown in fig. 3, the third application scenario is a schematic diagram, and the application scenario includes the terminal device 110 and the memory 130. The application scenario is described by taking an electronic device as the terminal device 110 as an example. The terminal device 110 acquires a medical image from the memory 130, and randomly determines a specified number of particles in the medical image for any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image; the current positions of the particles are respectively input into a preset fitness function to obtain fitness values of the particles; then, the terminal device 110 obtains the global optimal position in the current position of each particle through the fitness value of each particle; after updating the current position of each particle by utilizing the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the appointed iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy; then, the terminal equipment 110 obtains an image segmentation threshold value based on the updated global optimal position; and dividing the medical image according to the image dividing threshold value to obtain a divided medical image and displaying the divided medical image.
The terminal device 110 and the server 120 in fig. 1 and fig. 2 may perform information interaction through a communication network, where a communication mode adopted by the communication network may be a wireless communication mode or a wired communication mode.
The server 120 may illustratively access the network for communication with the terminal device 110 via cellular mobile communication technology, including, for example, fifth generation mobile communication (5th Generation Mobile Networks,5G) technology.
Alternatively, the server 120 may access the network to communicate with the terminal device 110 via a short-range wireless communication, including, for example, wireless fidelity (WIRELESS FIDELITY, wi-Fi) technology.
In this description, only a single terminal device 110, a single server 120 and a single memory 130 are described in detail, but it should be understood by those skilled in the art that the terminal device 110, the server 120 and the memory 130 are shown to represent operations of the terminal device 110, the server 120 and the memory 130 according to the technical solution of the present application. Rather than implying a limitation on the number, type, or location of terminal devices 110, servers 120, and memories 130. It should be noted that the underlying concepts of the exemplary embodiments of this application are not altered if additional modules are added to or individual modules are removed from the illustrated environment.
It should be noted that, the memory in the embodiment of the present application may be, for example, a cache system, or may be hard disk storage, memory storage, or the like. In addition, the medical image segmentation method provided by the application is not only suitable for the application scenes shown in fig. 1,2 and 3, but also suitable for any medical image segmentation device.
Exemplary terminal devices 110 include, but are not limited to: a visual large screen, a tablet, a notebook, a palm top, a Mobile internet device (Mobile INTERNET DEVICE, MID), a wearable device, a Virtual Reality (VR) device, an augmented Reality (Augmented Reality, AR) device, a wireless terminal device in industrial control, a wireless terminal device in unmanned driving, a wireless terminal device in smart grid, a wireless terminal device in transportation security, a wireless terminal device in smart city, or a wireless terminal device in smart home, etc.; the terminal device may have an associated client installed thereon, which may be software (e.g., a browser, short video software, etc.), web pages, applets, etc.
The method for generating an ultrasonic panoramic image according to the exemplary embodiment of the present application will be described below with reference to the accompanying drawings in conjunction with the above-described application scenario, and it should be noted that the above-described application scenario is only shown for the convenience of understanding the method and principle of the present application, and the embodiment of the present application is not limited in any way in this respect.
As shown in fig. 4, a flow chart of a segmentation method of a medical image of the present disclosure includes the following steps:
Step 401: randomly determining a specified number of particles in any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image;
The number of the specified elements in the present embodiment is 30, but the number of the specified elements in the present embodiment is not limited thereto, and the number of the specified elements in the present embodiment may be set according to actual situations.
In one embodiment, any one particle is determined by:
And randomly selecting a plurality of adjacent pixel points, taking the pixel points as a particle, taking the centers of the pixel points as the current position of the particle, and setting the speed of the particle as a preset initial speed.
Wherein an average value of the positions of the plurality of pixel points is determined as the current position of the particle.
In the present embodiment, nine adjacent pixels are defined as one particle, but the number of the adjacent pixels is not limited in the present embodiment, and may be set according to actual situations.
Step 402: respectively inputting the current positions of the particles into a preset fitness function to obtain fitness values of the particles;
Step 403: obtaining a global optimal position in the current position of each particle through the fitness value of each particle;
In one embodiment, the position of the particle with the highest fitness value among the particles is determined as the global optimal position.
For example, the position of particle 1 is (x 1,y1), and the fitness value of particle 1 is a. The position of particle 2 is (x 2,y2) and the fitness value of particle 1 is B. The position of particle 3 is (x 3,y3), and the fitness value of particle 3 is C. If A > B > C, then the global optimal position is determined to be (x 1,y1).
To ensure that updated positions of particles can be determined, in one embodiment, the fitness value of the particle and the position corresponding to the highest fitness value of the fitness values of the particle in the historical iterations are determined as the optimal position of the particle for any one particle before step 404 is performed.
For example, the fitness value determined by the particle 4 at the first iteration is M, the fitness value determined by the particle 4 at the second iteration is N, and the fitness value determined by the particle 4 at the third iteration is R. The particle 4 determines the fitness value Q at the fourth iteration. If Q > M > R > N. The updated position of the particle 4 at the fourth iteration is determined as the optimal position of the particle 4.
Step 404: updating the current position of each particle by utilizing the global optimal position and an inertia weight coefficient corresponding to the current iteration times, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy;
As shown in fig. 5, a flow chart of updating the current position of the particle includes the following steps:
Step 501: updating the speed of the particles according to the optimal position of the particles, the global optimal position and the inertia weight coefficient corresponding to the current iteration times to obtain the updated speed of the particles; wherein the updated velocity of the particle can be determined by formula (1):
vi(k+1)=ω×vi(k)+cr1[Pbesti-xi(k)]+c2×r2[Gbesti-xi(k)] (1);
Wherein v i (k+1) is the updated speed of the particle i at the k+1th iteration, that is, the updated speed of the particle in this embodiment, ω is the inertia weight coefficient corresponding to the current iteration number, v i (k) is the speed of the particle i at the k-th iteration, c 1、c2 is a preset acceleration factor, P besti is the optimal position of the particle, r 1 and r 2 are random numbers between [0,1], G besti is the global optimal position, and x i (k) is the position of the particle i at the k-th iteration, that is, the current position of the particle in this embodiment.
Step 502: and obtaining the updated position of the particle based on the updated speed of the particle and the current position of the particle.
In one embodiment, the updated particle velocity is added to the current position of the particle to obtain the updated particle position, wherein the updated particle position can be determined by equation (2):
xi(k+1)=xi(k)+vi(k+1)…(2);
Wherein x i (k+1) is the position of the particle i at the k+1th iteration, that is, the position of the particle i after the update in this embodiment, x i (k) is the position of the particle i at the k iteration, that is, the current position of the particle in this embodiment, and v i (k+1) is the speed of the particle i after the update at the k+1th iteration, that is, the speed of the particle after the update in this embodiment.
Next, a description is given of a determination manner of an inertia weight coefficient corresponding to the current iteration number:
In one embodiment, the inertial weight coefficient corresponding to the current number of iterations is determined by the following formula:
Wherein ω is the inertial weight coefficient, ω max is the maximum value of the preset inertial weight coefficient, ω min is the minimum value of the preset inertial weight coefficient, t max is the specified number of iterations, a is a first preset curve control coefficient, and b is a second preset curve control coefficient.
It should be noted that: omega max=0.9,ωmin=0.4;tmax = 100 in this embodiment. However, the specific values of ω max、ωmin and t max in the present embodiment are not limited, and the values of ω max、ωmin and t max may be set according to actual situations.
Where a and b in the formula are points of inflection points of the control curve, a being used for the preceding inflection point of the control curve and b being used for the following inflection point of the control curve. Wherein, as shown in fig. 6, it can be seen from fig. 6 that the larger a is, the later a is, the smaller a is, and the earlier a is; the larger b, the earlier the latter inflection point. The smaller b, the later the inflection point.
It should be noted that: a=4 and b=10 in the present embodiment, but specific values of a and b are not limited, and may be set according to actual situations in the present embodiment.
As shown in fig. 7, W2 is a straight line corresponding to a conventional linearly decreasing weight updating policy, and W1 is a curve corresponding to a nonlinear weight coefficient decreasing updating policy in this embodiment. Fig. 7 illustrates a=4 and b=10 as an example. As can be seen from the graph, the nonlinear weight coefficient decreasing update strategy in the embodiment can keep a larger value in a longer time in the early stage of iteration, so that the problem that the linear weight update strategy cannot search for an optimal value in the early stage, and therefore the problem that the linear weight update strategy falls into a local extremum in the later stage of iteration can be well solved.
Step 405: judging whether the current iteration times are smaller than the appointed iteration times, if so, executing step 406, and if not, returning to executing step 402;
the number of specified iterations in this embodiment is 100, but the specific value of the number of specified iterations is not limited, and the number of specified iterations in this embodiment may be set according to actual situations.
Step 406: updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position;
In one embodiment, step 406 may be implemented as: and determining the position of the particle corresponding to the highest fitness in the fitness of each particle as the updated global optimal position.
Step 407: obtaining an image segmentation threshold based on the updated global optimal position;
in one embodiment, step 407 may be implemented as: and determining a target particle according to the updated global optimal position, and determining the image segmentation threshold value based on a plurality of pixel points corresponding to the target particle.
The method comprises the following steps: and determining the particle with the current position being the global optimal position as the target particle, and inputting a plurality of pixel points corresponding to the target particle into a preset otsu algorithm to obtain the image segmentation threshold.
The otsu algorithm is a method in the prior art, and the specific flow of the otsu algorithm is not described here in this embodiment.
Step 408: and dividing the medical image according to the image dividing threshold value to obtain a divided medical image.
In one embodiment, the segmented medical image is determined by:
For any pixel point in the medical image, if the pixel value of the pixel point is larger than the image segmentation threshold value, determining the pixel point as the foreground pixel point; or if the pixel value of the pixel point is not greater than the image segmentation threshold value, determining the pixel point as the background pixel point; and dividing the medical image based on each foreground pixel point and each background dividing point to obtain the divided medical image.
The invention can not only improve the accuracy of image segmentation, but also improve the efficiency of image segmentation, as shown in fig. 8, which is a time comparison table of the image segmentation mode in the prior art and the image segmentation mode in the invention, it can be seen from the figure that the segmentation duration of the image segmentation mode in the invention is shorter than that in the prior art, so that the image segmentation method in the invention can further improve the efficiency of image segmentation.
Based on the same disclosure concept, the medical image segmentation method as described above in the present disclosure may also be implemented by a medical image segmentation apparatus. The effects of the medical image segmentation apparatus are similar to those of the previous method, and will not be described in detail herein.
Fig. 9 is a schematic structural view of a medical image segmentation apparatus according to an embodiment of the present disclosure.
As shown in fig. 9, a segmentation apparatus 900 for medical images of the present disclosure may include a particle determination module 910, an fitness value determination module 920, a global optimal position determination module 930, a position update module 940, an image segmentation threshold determination module 950, and a segmentation module 960.
A particle determining module 910, configured to randomly determine, for any one medical image, a specified number of particles in the medical image, where any one particle is obtained based on a plurality of adjacent pixels in the medical image;
the fitness value determining module 920 is configured to input the current positions of the particles into a preset fitness function, respectively, to obtain fitness values of the particles;
A global optimal position determining module 930, configured to obtain a global optimal position in the current positions of the particles according to the fitness value of each particle;
A location updating module 940, configured to update the current location of each particle by using the global optimal location and an inertia weight coefficient corresponding to the current iteration number, and return to performing a step of inputting the current location of each particle into a preset fitness function respectively until the current iteration number is less than the specified iteration number, and update the global optimal location based on the fitness value and the current location of each particle to obtain an updated global optimal location, where the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental update strategy;
an image segmentation threshold determining module 950, configured to obtain an image segmentation threshold based on the updated global optimal position;
the segmentation module 960 is configured to segment the medical image according to the image segmentation threshold value, so as to obtain a segmented medical image.
In one embodiment, the apparatus further comprises:
the inertial weight coefficient determining module 970 is configured to determine the inertial weight coefficient corresponding to the current iteration number by the following formula:
Wherein ω is the inertial weight coefficient, ω max is the maximum value of the preset inertial weight coefficient, ω min is the minimum value of the preset inertial weight coefficient, t max is the specified number of iterations, a is a first preset curve control coefficient, and b is a second preset curve control coefficient.
In one embodiment, the global best position determining module 930 is specifically configured to:
and determining the position of the particle with the highest fitness value in the particles as the global optimal position.
In one embodiment, the apparatus further comprises:
An optimal position determining module 980, configured to determine, for any one particle, a fitness value of the particle and a position corresponding to a highest fitness value of the fitness values of the particle in historical iterations as an optimal position of the particle before updating the position of each particle by using the global optimal position and an inertia weight coefficient corresponding to a current iteration number;
the location update module 940 is specifically configured to:
Updating the speed of the particles according to the optimal position of the particles, the global optimal position and the current position of the particles to obtain the updated speed of the particles;
And obtaining the updated position of the particle based on the updated speed of the particle and the current position of the particle.
In one embodiment, the global best position determining module 930 is specifically configured to:
Determining the position of the particle corresponding to the highest fitness in the fitness of each particle as the updated global optimal position;
the image segmentation threshold determining module 950 is specifically configured to:
And determining a target particle according to the updated global optimal position, and determining the image segmentation threshold value based on a plurality of pixel points corresponding to the target particle.
In one embodiment, the segmentation module 960 is specifically configured to:
For any pixel point in the medical image, if the pixel value of the pixel point is larger than the image segmentation threshold value, determining the pixel point as the foreground pixel point; or alternatively, the first and second heat exchangers may be,
If the pixel value of the pixel point is not greater than the image segmentation threshold value, determining the pixel point as the background pixel point;
and dividing the medical image based on each foreground pixel point and each background dividing point to obtain the divided medical image.
Having described a method and apparatus for segmentation of medical images according to an exemplary embodiment of the present disclosure, an electronic device according to another exemplary embodiment of the present disclosure is next described.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present disclosure may include at least one processor, and at least one computer storage medium. Wherein the computer storage medium stores program code which, when executed by a processor, causes the processor to perform the steps in the medical image segmentation method according to various exemplary embodiments of the disclosure described above in this specification. For example, the processor may perform steps 401-408 as shown in FIG. 4.
An electronic device 1000 according to such an embodiment of the present disclosure is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general-purpose electronic device. Components of electronic device 1000 may include, but are not limited to: the at least one processor 1001, the at least one computer storage medium 1002, and a bus 1003 that connects the various system components, including the computer storage medium 1002 and the processor 1001.
Bus 1003 represents one or more of several types of bus structures, including a computer storage media bus or computer storage media controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
Computer storage media 1002 may include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 1021 and/or cache storage media 1022, and may further include read only computer storage media (ROM) 1023.
Computer storage media 1002 may also include program/utility 1025 having a set (at least one) of program modules 1024, such program modules 1024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The electronic device 1000 can also communicate with one or more external devices 1004 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 1000 to communicate with one or more other electronic devices. Such communication may occur through an input/output (I/O) interface 1005. Also, electronic device 1000 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1006. As shown, the network adapter 1006 communicates with other modules for the electronic device 1000 over the bus 1003. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with the electronic device 1000, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In some possible embodiments, aspects of a medical image segmentation method provided by the present disclosure may also be implemented in the form of a program product comprising program code for causing a computer device to carry out the steps of the medical image segmentation method according to the various exemplary embodiments of the present disclosure as described herein above, when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, a random access computer storage medium (RAM), a read-only computer storage medium (ROM), an erasable programmable read-only computer storage medium (EPROM or flash memory), an optical fiber, a portable compact disc read-only computer storage medium (CD-ROM), an optical computer storage medium, a magnetic computer storage medium, or any suitable combination of the foregoing.
The program product of segmentation of medical images of embodiments of the present disclosure may employ a portable compact disc read-only computer storage medium (CD-ROM) and include program code and may be run on an electronic device. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device, partly on the remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic device may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., connected through the internet using an internet service provider).
It should be noted that although several modules of the apparatus are mentioned in the detailed description above, this division is merely exemplary and not mandatory. Indeed, the features and functions of two or more modules described above may be embodied in one module in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module described above may be further divided into a plurality of modules to be embodied.
Furthermore, although the operations of the methods of the present disclosure are depicted in the drawings in a particular order, this is not required or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk computer storage media, CD-ROM, optical computer storage media, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable computer storage medium produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present disclosure without departing from the spirit or scope of the disclosure. Thus, the present disclosure is intended to include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. An electronic device comprising a memory and a processor, wherein:
the memory is configured to store ultrasound images to be spliced;
the processor is configured to:
Randomly determining a specified number of particles in any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image;
respectively inputting the current positions of the particles into a preset fitness function to obtain fitness values of the particles;
Obtaining a global optimal position in the current position of each particle through the fitness value of each particle;
After updating the current position of each particle by using the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the designated iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy;
obtaining an image segmentation threshold based on the updated global optimal position;
And dividing the medical image according to the image dividing threshold value to obtain a divided medical image.
2. The electronic device of claim 1, wherein the processor is further configured to:
determining an inertial weight coefficient corresponding to the current iteration number by the following formula:
Wherein ω is the inertial weight coefficient, ω max is the maximum value of the preset inertial weight coefficient, ω min is the minimum value of the preset inertial weight coefficient, t max is the specified number of iterations, a is a first preset curve control coefficient, and b is a second preset curve control coefficient.
3. The electronic device according to claim 1, wherein the processor executing the fitness value through each particle yields a global optimal position among the current positions of each particle, specifically configured to:
and determining the position of the particle with the highest fitness value in the particles as the global optimal position.
4. The electronic device of claim 1, wherein the processor is further configured to:
Before updating the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number, determining the fitness value of each particle and the position corresponding to the highest fitness value in the fitness values of the particles in the historical iteration as the optimal position of each particle;
the processor executes the method to update the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number, and is specifically configured to:
Updating the speed of the particles according to the optimal position of the particles, the global optimal position and the inertia weight coefficient corresponding to the current iteration times to obtain the updated speed of the particles;
And obtaining the updated position of the particle based on the updated speed of the particle and the current position of the particle.
5. The electronic device according to claim 1, wherein the processor is configured to update the global optimal position based on the fitness value and the current position of each particle, to obtain an updated global optimal position, and is specifically configured to:
Determining the position of the particle corresponding to the highest fitness in the fitness of each particle as the updated global optimal position;
The obtaining an image segmentation threshold based on the updated global optimal position includes:
And determining a target particle according to the updated global optimal position, and determining the image segmentation threshold value based on a plurality of pixel points corresponding to the target particle.
6. The electronic device of claim 1, wherein the processor performs the segmenting of the medical image according to the image segmentation threshold resulting in a segmented medical image, specifically configured to:
For any pixel point in the medical image, if the pixel value of the pixel point is larger than the image segmentation threshold value, determining the pixel point as the foreground pixel point; or alternatively, the first and second heat exchangers may be,
If the pixel value of the pixel point is not greater than the image segmentation threshold value, determining the pixel point as the background pixel point;
and dividing the medical image based on each foreground pixel point and each background dividing point to obtain the divided medical image.
7. A method of segmenting a medical image, the method comprising:
Randomly determining a specified number of particles in any one medical image, wherein any one particle is obtained based on a plurality of adjacent pixel points in the medical image;
respectively inputting the current positions of the particles into a preset fitness function to obtain fitness values of the particles;
Obtaining a global optimal position in the current position of each particle through the fitness value of each particle;
After updating the current position of each particle by using the global optimal position and an inertia weight coefficient corresponding to the current iteration number, returning to the step of respectively inputting the current position of each particle into a preset fitness function until the current iteration number is smaller than the designated iteration number, updating the global optimal position based on the fitness value and the current position of each particle to obtain an updated global optimal position, wherein the inertia weight coefficient is obtained based on a preset nonlinear weight coefficient decremental updating strategy;
obtaining an image segmentation threshold based on the updated global optimal position;
And dividing the medical image according to the image dividing threshold value to obtain a divided medical image.
8. The method of claim 7, wherein the inertial weight coefficient corresponding to the current number of iterations is determined by the formula:
Wherein ω is the inertial weight coefficient, ω max is the maximum value of the preset inertial weight coefficient, ω min is the minimum value of the preset inertial weight coefficient, t max is the specified number of iterations, a is a first preset curve control coefficient, and b is a second preset curve control coefficient.
9. The method of claim 7, wherein the obtaining the global optimal position among the current positions of the particles by the fitness value of the particles comprises:
and determining the position of the particle with the highest fitness value in the particles as the global optimal position.
10. The method of claim 7, wherein before updating the location of each particle using the global optimal location and an inertial weight coefficient corresponding to a current number of iterations, the method further comprises:
for any one particle, determining the fitness value of the particle and the position corresponding to the highest fitness value in the fitness values of the particle in historical iteration as the optimal position of the particle;
The updating the position of each particle by using the global optimal position and the inertia weight coefficient corresponding to the current iteration number comprises the following steps:
Updating the speed of the particles according to the optimal position of the particles, the global optimal position and the inertia weight coefficient corresponding to the current iteration times to obtain the updated speed of the particles;
And obtaining the updated position of the particle based on the updated speed of the particle and the current position of the particle.
CN202211313552.9A 2022-10-25 2022-10-25 Medical image segmentation method and electronic equipment Pending CN117952891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211313552.9A CN117952891A (en) 2022-10-25 2022-10-25 Medical image segmentation method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211313552.9A CN117952891A (en) 2022-10-25 2022-10-25 Medical image segmentation method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117952891A true CN117952891A (en) 2024-04-30

Family

ID=90796935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211313552.9A Pending CN117952891A (en) 2022-10-25 2022-10-25 Medical image segmentation method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117952891A (en)

Similar Documents

Publication Publication Date Title
Zhao et al. Automatic polyp segmentation via multi-scale subtraction network
US20210158533A1 (en) Image processing method and apparatus, and storage medium
TWI832966B (en) Method and apparatus for automated target and tissue segmentation using multi-modal imaging and ensemble machine learning models
JP2022526513A (en) Video frame information labeling methods, appliances, equipment and computer programs
CN108648140B (en) Image splicing method, system, equipment and storage medium
CN111027438B (en) Human body posture migration method, mobile terminal and computer storage medium
CN109272543B (en) Method and apparatus for generating a model
KR102305230B1 (en) Method and device for improving accuracy of boundary information from image
CN112529913A (en) Image segmentation model training method, image processing method and device
CN108648149B (en) Image splicing method, system, equipment and storage medium based on augmented reality
Qin et al. GuideRender: large-scale scene navigation based on multi-modal view frustum movement prediction
KR20220016212A (en) Image processing method and apparatus, electronic device, storage medium and program product
CN110827341A (en) Picture depth estimation method and device and storage medium
Sengan et al. Cost-effective and efficient 3D human model creation and re-identification application for human digital twins
CN116917949A (en) Modeling objects from monocular camera output
EP4290459A1 (en) Augmented reality method and related device thereof
Huang et al. 3D Graph-S 2 Net: Shape-aware self-ensembling network for semi-supervised segmentation with bilateral graph convolution
KR102352942B1 (en) Method and device for annotating object boundary information
CN114677422A (en) Depth information generation method, image blurring method and video blurring method
CN114283110A (en) Image processing method, device, equipment and storage medium for medical image
CN113409333A (en) Three-dimensional image cutting method and electronic equipment
CN113724185A (en) Model processing method and device for image classification and storage medium
CN109816791B (en) Method and apparatus for generating information
Ribeiro de Oliveira et al. Systematic Review of Virtual Reality Solutions Employing Artificial Intelligence Methods
Ren et al. Spatial geometric reasoning for room layout estimation via deep reinforcement learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination