Method, device and medium for generating a medical image segmentation model
By acquiring prior segmentation contours and performing multi-directional sampling and resampling, a high-precision medical image segmentation model is generated, which solves the problem that prostate MR image segmentation in existing technologies relies on manual delineation, improves segmentation efficiency and accuracy, and reduces costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI DROIDSURG MEDICAL CO LTD
- Filing Date
- 2023-11-21
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, segmentation of prostate MR images relies on doctors manually drawing layers one by one, resulting in high labor and time costs, and the segmentation accuracy depends on the doctor's experience and subjective perception.
By acquiring the prior segmentation contour containing the target, filtering and denoising are performed, multi-directional sampling is carried out to generate target candidate boxes and segmentation thresholds, the edges of the region of interest are extracted, the edge intersections are merged, and the reference contour is resampled to form a high-precision medical image segmentation model.
It improves segmentation efficiency and accuracy, reduces the need for manual delineation, enhances the correspondence between the model and the original image, and lowers labor costs.
Smart Images

Figure CN117474940B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method, apparatus, device, and medium for generating a medical image segmentation model. Background Technology
[0002] Currently, prostate disease is a very common condition among men, and prostate magnetic resonance (MR) imaging is involved in both diagnosis and treatment. Segmenting the prostate through MR images not only assists doctors in identifying lesions but also guides the protection of surrounding organs during treatment.
[0003] Currently, prostate segmentation on MR images is mostly based on manual layer-by-layer delineation by physicians. The accuracy of segmentation depends entirely on the physician's experience and subjective perception, and this layer-by-layer delineation leads to high labor and time costs. Therefore, there is an urgent need for a novel method, device, equipment, and medium for generating medical image segmentation models to improve these issues. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, device, and medium for generating medical image segmentation models, which is used to automatically acquire high-precision medical image segmentation models.
[0005] In a first aspect, the present invention provides a method for generating a medical image segmentation model, comprising: S0, acquiring a prior segmentation contour containing a target; S1, performing filtering and denoising processing on an original image sequence to obtain a first image sequence; S2, sampling the first image sequence in multiple directions according to the prior segmentation contour to obtain a second image sequence containing an automatically segmented contour; S3, generating target candidate boxes according to the prior segmentation contour, and cropping the second image sequence according to the target candidate boxes to obtain a third image sequence; S4, generating segmentation thresholds corresponding to each prior segmentation layer in the third image sequence according to the prior segmentation contour, to form a segmentation threshold. S5. Based on the segmentation threshold candidate set, obtain the region of interest candidate set for each layer in the third image sequence; S6. Perform edge extraction and edge smoothing on the region of interest in each layer to obtain the edge candidate set of all regions of interest in that layer; S7. Merge the edges in each layer to obtain the intersection points of the edges to form an intersection point set; S8. Select the automatic segmentation contour that is most similar to the prior segmentation contour as the reference contour of the current layer based on the intersection point set; S9. Resample all reference contours in the third image sequence to obtain the target contours of all layers in the corresponding original image sequence, and model them to form a target medical image segmentation model.
[0006] The beneficial effects of the method of this invention are as follows: This invention supports manually drawing arbitrary cutting layers as prior segmentation contours, and automatically obtaining the segmentation contours of other layers based on the prior segmentation contours, which is beneficial to improving segmentation efficiency. Cropping the second image sequence with target candidate boxes obtained from the prior segmentation contours is beneficial to improving target selection efficiency. Setting segmentation threshold candidate sets, region of interest candidate sets, edge candidate sets, and intersection point sets facilitates the selection of reference contours. By resampling all reference contours, the target contours corresponding to the first image sequence can be obtained, making the target medical image segmentation model directly correspond to the original image sequence, which is beneficial to improving the model's segmentation accuracy.
[0007] Optionally, it also includes: S10, for layers between adjacent prior segmentation contours, obtaining two reference contours for each layer in opposite directions, and then fusing the two reference contours to obtain the target contour.
[0008] Optionally, it also includes: S11, for the abnormal slice interval of the target medical image segmentation model, add at least one layer containing the prior segmentation contour, repeat S1-S9 until the obtained target medical image segmentation model has no abnormalities.
[0009] Optionally, S2 includes: sampling the first image sequence in the X, Y and Z directions, setting the sampling rate in the Z direction to be greater than the sampling rates in the X and Y directions; after sampling the first image sequence in multiple directions and automatically segmenting the contours, inserting the layer containing the prior segmented contours into the corresponding position of the first image sequence to obtain a second image sequence containing the prior segmented contours and the automatically segmented contours.
[0010] Optionally, S4 includes: segmenting the layer image using different thresholds to obtain pre-segmented contours, calculating the intersection-union ratio (IU) between the pre-segmented contours and the prior segmented contours, and taking the threshold at which the IU is maximized as the segmentation threshold for that layer.
[0011] Optionally, S8 includes: for each layer in the third image sequence, obtaining all contours passing through at least two intersection points using the intersection point set of the layer's edges; selecting the contour most similar to the nearest prior segmentation contour among all contours as the target contour of the current layer based on the prior features of the target; for layers between adjacent prior segmentation contours, selecting the contour most similar to the contour of the previous layer among all contours as the target contour of the current layer.
[0012] In a second aspect, the present invention provides a medical image segmentation model generation apparatus, used in the method described in any one of the first aspects, comprising: an input unit for acquiring a prior segmentation contour containing a target; a filtering unit for filtering and denoising an original image sequence to obtain a first image sequence; a sampling unit for sampling the first image sequence in multiple directions and automatically segmenting the contour to obtain a second image sequence containing the automatically segmented contour; a cropping unit for generating target candidate boxes based on the prior segmentation contour, and cropping the second image sequence based on the target candidate boxes to obtain a third image sequence; and a processing unit for generating a third image sequence based on the prior segmentation contour. The segmentation thresholds of each prior segmentation layer in the column are used to form a segmentation threshold candidate set; based on the segmentation threshold candidate set, a region of interest candidate set for each layer in the third image sequence is obtained; edge extraction and edge smoothing are performed on the regions of interest in each layer to obtain an edge candidate set for all regions of interest in that layer; the edges in each layer are merged to obtain the intersection points of the merged edges to form an intersection point set; based on the intersection point set, the automatically segmented contour most similar to the prior segmentation contour is selected as the reference contour for the current layer; all reference contours in the third image sequence are resampled to obtain the target contours of all layers in the corresponding original image sequence, and a target medical image segmentation model is modeled.
[0013] Optionally, the processing unit is further configured to acquire two reference contours for each layer between adjacent prior segmentation contours in opposite directions, and then fuse the two reference contours to obtain the target contour.
[0014] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a program executable on the processor, and when the program is executed by the processor, the electronic device performs the method described in any one of the first aspects.
[0015] Fourthly, the present invention provides a readable storage medium storing a program, characterized in that, when the program is executed, it implements the method described in any one of the first aspects. Attached Figure Description
[0016] Figure 1 A schematic diagram of the process for generating a medical image segmentation model provided by the present invention;
[0017] Figure 2 A schematic diagram of a magnetic resonance image containing a prostate provided by the present invention;
[0018] Figure 3 A schematic diagram of a magnetic resonance image including automatically segmented contours provided by the present invention;
[0019] Figure 4 A schematic diagram illustrating the principle of bidirectional acquisition of reference contours provided by the present invention;
[0020] Figure 5 This invention provides a schematic diagram of the structure of a device for generating a medical image segmentation model;
[0021] Figure 6 This invention provides a schematic diagram of the structure of an electronic device.
[0022] Numbering on the map:
[0023] 1. First prior segmentation contour; 2. Second prior segmentation contour;
[0024] 31. Input unit; 32. Filtering unit; 33. Sampling unit; 34. Clipping unit; 35. Processing unit;
[0025] 41. Processor; 42. Memory; 43. Output interface; 44. Communication interface; 45. Antenna. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "comprising" and similar expressions used herein mean that the element or object preceding the word covers the element or object listed following the word and its equivalents, but do not exclude other elements or objects.
[0027] In response to the problems existing in the current technology, such as Figure 1As shown, the first embodiment provides a method for generating a medical image segmentation model, including: S0, obtaining a prior segmentation contour containing a target; S1, performing filtering and denoising processing on the original image sequence to obtain a first image sequence; S2, sampling the first image sequence in multiple directions according to the prior segmentation contour to obtain a second image sequence containing an automatically segmented contour; S3, generating target candidate boxes according to the prior segmentation contour, and cropping the second image sequence according to the target candidate boxes to obtain a third image sequence; S4, generating segmentation thresholds corresponding to each prior segmentation layer in the third image sequence according to the prior segmentation contour to form a segmentation threshold. S5. Based on the segmentation threshold candidate set, obtain the region of interest candidate set for each layer in the third image sequence; S6. Perform edge extraction and edge smoothing on the region of interest in each layer to obtain the edge candidate set of all regions of interest in that layer; S7. Merge the edges in each layer to obtain the intersection points of the edges to form an intersection point set; S8. Select the automatic segmentation contour that is most similar to the prior segmentation contour as the reference contour of the current layer based on the intersection point set; S9. Resample all reference contours in the third image sequence to obtain the target contours of all layers in the corresponding original image sequence, and model them to form a target medical image segmentation model.
[0028] It is worth noting that this embodiment supports manually drawing arbitrary cutting layers as prior segmentation contours, and automatically obtaining the segmentation contours of other layers based on the prior segmentation contours, which is beneficial to improving segmentation efficiency. Cropping the second image sequence with target candidate boxes obtained from the prior segmentation contours is beneficial to improving target selection efficiency. Setting segmentation threshold candidate sets, region of interest candidate sets, edge candidate sets, and intersection point sets facilitates the selection of reference contours. By resampling all reference contours, the target contours corresponding to the first image sequence can be obtained, making the target medical image segmentation model directly correspond to the original image sequence, which is beneficial to improving the model's segmentation accuracy.
[0029] Specifically, S0 includes: setting the target as the prostate of the current object, and setting the prior segmentation contour as a manually drawn segmentation contour that includes the prostate.
[0030] In other specific embodiments, S0 includes: setting the target as the kidney of the current object, and setting the prior segmentation contour as a default segmentation contour that includes the kidney. The default segmentation contour is obtained by scaling, stretching, translating, and rotating a segmentation contour that is not of the current object. It is worth noting that the target can be set as any abdominal organ of the current object.
[0031] In some specific embodiments, S1 includes: setting the original image sequence as a magnetic resonance image sequence including the target. A layer in the magnetic resonance image sequence containing the prostate, such as... Figure 2As shown, the magnetic resonance image sequence is subjected to Gaussian filtering to reduce noise during the magnetic resonance image acquisition process.
[0032] In some specific embodiments, S1 includes: setting the original image sequence as a computed tomography (CT) image sequence including the target; and performing median filtering on the CT image sequence to reduce noise during the CT image acquisition process. It is worth noting that the original image sequence can be any medical 3D image sequence containing the target.
[0033] In some embodiments, S2 includes: sampling the first image sequence in the X, Y, and Z directions, setting the sampling rate in the Z direction to be greater than the sampling rates in the X and Y directions; after sampling the first image sequence in multiple directions and automatically segmenting the contours, inserting the layer containing the prior segmented contours into the corresponding position of the first image sequence to obtain a second image sequence containing the prior segmented contours and the automatically segmented contours. The obtained automatically segmented contours are as follows: Figure 3 As shown.
[0034] Specifically, the X direction is set to the front of the body, the Y direction to the side of the body, and the Z direction to the top of the head. The sampling rates for the X, Y, and Z directions are set to (0.57, 0.57, 4.00) mm. In some other specific embodiments, the sampling rates for the X, Y, and Z directions are set to (1.20, 1.20, 8.00) mm. In still other specific embodiments, the sampling rates for the X, Y, and Z directions are set to (0.20, 0.20, 2.00) mm. It is worth noting that the sampling rates for the X, Y, and Z directions can be set to any value, but the sampling rates for the X and Y directions must be the same and less than the sampling rate for the Z direction.
[0035] In some embodiments, S4 includes: segmenting the layer image using different thresholds to obtain pre-segmented contours, calculating the intersection-union ratio (IU) between the pre-segmented contours and the prior segmented contours, and taking the threshold at which the IU is maximized as the segmentation threshold for that layer. The pre-segmented contours are obtained by calculating the prior segmented contours using an adaptive algorithm.
[0036] Specifically, the adaptive algorithm is a region-growing algorithm. Based on the texture features of the NMR image, the image is segmented into several regions, and then contours are extracted based on the features within each region. The region-growing algorithm can select seed points based on prior segmentation contours and then adaptively expand the regions to generate pre-segmented contours.
[0037] In other specific embodiments, the adaptive algorithm is based on level set theory, which represents the shape in the NMR image as the minimum value of a level set function. The level set theory-based algorithm can iteratively update the level set function, causing the shape to gradually approximate the prior segmentation contour, ultimately generating a pre-segmented contour.
[0038] In some specific embodiments, the adaptive algorithm is a deep learning-based algorithm. Under the guidance of prior segmentation contours, the deep learning algorithm can adaptively learn the features and patterns for generating pre-segmented contours.
[0039] In some embodiments, S5 includes: for each layer in the third image sequence that does not contain a prior segmentation contour, segmenting it sequentially using each threshold in the candidate threshold set to obtain a candidate set of regions of interest corresponding to that layer.
[0040] In some embodiments, S6 includes: for each layer in the third image sequence, performing edge extraction and edge smoothing on each region of interest in sequence, and forming an edge candidate set by the edges corresponding to all regions of interest in each layer.
[0041] For example, for a layer in a third image sequence, S7 includes: extracting two regions of interest with overlapping parts from the layer, traversing the edges of the overlapping parts, and determining the intersection of the two regions of interest.
[0042] In some embodiments, S8 includes: for each layer in the third image sequence, obtaining all contours that pass through at least two intersection points using the set of intersection points of the layer's edges; selecting the contour most similar to the nearest prior segmentation contour among all the contours as the target contour of the current layer based on the prior features of the target; for layers between adjacent prior segmentation contours, selecting the contour most similar to the contour of the previous layer among all the contours as the target contour of the current layer.
[0043] Specifically, when the target is the prostate, its prior features include: the prostate first enlarges and then shrinks in the Z-direction. The similarity between contours is measured using Hausdorff distance; the smaller the Hausdorff distance value, the higher the similarity between two contours.
[0044] In some embodiments, S9 includes: when resampling, the sampling rate is set to be consistent with the original image sequence. For example, both the original image sequence and the first image sequence are set to 30 layers, and both the second and third image sequences are set to 10 layers. The fourth image sequence obtained after resampling is set to 30 layers. The 30 layers in the fourth image sequence correspond one-to-one with the 30 layers in the original image sequence.
[0045] In some specific embodiments, the third image sequence can be interpolated to extend each layer of a 10-layer third image sequence upwards to form a 30-layer fourth image sequence. During this upward extension, interpolation methods can be used to estimate new pixel values.
[0046] like Figure 4 As shown, in some embodiments, it further includes: S10, for layers between adjacent prior segmentation contours, obtaining two reference contours for each layer in opposite directions, and then fusing the two reference contours to obtain the target contour.
[0047] Specifically, taking the n layers between the first prior segmentation contour 1 and the second prior segmentation contour 2 as an example, where n is a positive integer. When obtaining the reference contour along the Z direction, the positive reference contour of the starting layer L1 is obtained based on the first prior segmentation contour 1, the positive reference contour of the intermediate layer L2 is obtained based on the starting layer L1, and the positive reference contour of the ending layer Ln is obtained based on the intermediate layer Ln-1.
[0048] In other specific embodiments, when obtaining the reference contour along the Z-direction, the reverse reference contour of the ending layer Ln is obtained according to the second prior segmentation contour 2, the reverse reference contour of the intermediate layer Ln-1 is obtained according to the ending layer Ln, and the reverse reference contour of the starting layer L1 is obtained according to the intermediate layer L2.
[0049] In some specific embodiments, the target contour is obtained by fusing the forward reference contour and the reverse reference contour on the same layer.
[0050] In some embodiments, the method further includes: S11, adding at least one layer containing prior segmentation contours for abnormal slice intervals of the target medical image segmentation model, repeating S1-S9 until the obtained target medical image segmentation model is free of abnormalities.
[0051] Specifically, the layer containing the prior segmentation contour is a layer obtained by manually delineating the abnormal layers corresponding to the original image sequence. In other specific embodiments, the layer containing the prior segmentation contour is a layer obtained by iterative calculation based on non-abnormal layers. In some embodiments, S11 further includes determining whether each layer in the target medical image segmentation model is abnormal based on prior features. When the current layer is confirmed to be abnormal, the M layers adjacent to the current layer are confirmed to be abnormal slice intervals.
[0052] like Figure 5As shown, the second embodiment provides a medical image segmentation model generation apparatus for the method described in any one of the above embodiments, comprising: an input unit 31 for acquiring a prior segmentation contour containing a target; a filtering unit 32 for filtering and denoising the original image sequence to obtain a first image sequence; a sampling unit 33 for sampling the first image sequence in multiple directions and automatically segmenting the contour to obtain a second image sequence containing the automatically segmented contour; a cropping unit 34 for generating target candidate boxes based on the prior segmentation contour, and cropping the second image sequence based on the target candidate boxes to obtain a third image sequence; and a processing unit 35 for generating a third image sequence based on the prior segmentation contour. The segmentation thresholds of each prior segmentation layer in the third image sequence are used to form a segmentation threshold candidate set. Based on the segmentation threshold candidate set, a region of interest (ROI) candidate set for each layer in the third image sequence is obtained. Edge extraction and edge smoothing are performed on the ROI in each layer to obtain an edge candidate set for all ROIs in that layer. The edges in each layer are merged to obtain the intersection points of the merged edges to form an intersection point set. Based on the intersection point set, the automatically segmented contour most similar to the prior segmentation contour is selected as the reference contour for the current layer. All reference contours in the third image sequence are resampled to obtain the target contours of all layers in the corresponding original image sequence, and a target medical image segmentation model is formed.
[0053] Specifically, the input unit 31 is configured as a nuclear magnetic resonance spectrometer, the filtering unit 32 is configured as a filter, the sampling unit 33 is configured as a radio frequency receiver, and the cropping unit 34 and processing unit 35 are configured as processors. In some other specific embodiments, the input unit 31, filtering unit 32, sampling unit 33, cropping unit 34, and processing unit 35 are disposed on the same image processing chip.
[0054] In some embodiments, the processing unit is further configured to: acquire two reference contours for each layer between adjacent prior segmentation contours in opposite directions, and then fuse the two reference contours to obtain the target contour.
[0055] like Figure 6 As shown, the third embodiment provides an electronic device including a memory 42 and a processor 41. The memory 42 stores a program that can run on the processor 41. When the program is executed by the processor 41, the electronic device performs the method described in any of the above embodiments.
[0056] In one possible embodiment, the electronic device further includes: an output interface 43 for outputting results; a communication interface 44 for transmitting communication signals; and an antenna 45 for transmitting or receiving signals.
[0057] It should be noted that the processor 41 in this embodiment can be an image processing chip or an integrated circuit chip, capable of processing image signals. In implementation, each step of the above method embodiment can be completed by the integrated logic circuitry in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices. It can implement or execute the methods, steps, and logic block diagrams disclosed in this embodiment. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this embodiment can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0058] It is understood that the memory 42 in this embodiment can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0059] The fourth embodiment provides a readable storage medium storing a program, characterized in that, when the program is executed, it implements the method described in any one of the first aspects.
[0060] It is worth noting that if the method is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0061] While embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations fall within the scope and spirit of the invention as set forth in the claims. Furthermore, the invention described herein may have other embodiments and can be implemented or carried out in various ways.
Claims
1. A method for generating a medical image segmentation model, characterized in that, include: S0, obtain the prior segmentation contour containing the target; S1, perform filtering and noise reduction on the original image sequence to obtain the first image sequence; S2, based on the prior segmentation contour, the first image sequence is sampled in multiple directions to obtain a second image sequence containing the automatically segmented contour; S3, generate target candidate boxes based on the prior segmented contours, and crop the second image sequence based on the target candidate boxes to obtain a third image sequence; S4, generate a segmentation threshold for each prior segmentation layer in the third image sequence based on the prior segmentation contour to form a segmentation threshold candidate set; S5, based on the segmentation threshold candidate set, obtain the region of interest candidate set for each layer in the third image sequence; S6, perform edge extraction and edge smoothing on the regions of interest in each layer to obtain the edge candidate set of all regions of interest in that layer; S7, merge the edges in each layer and obtain the intersection points of the edges to form an intersection point set; S8. Select the automatic segmentation contour that is most similar to the prior segmentation contour as the reference contour of the current layer based on the intersection point set. S9, resample all reference contours in the third image sequence to obtain the target contours of all layers in the corresponding original image sequence, and model them to form a target medical image segmentation model.
2. The method according to claim 1, characterized in that, Also includes: S10, for layers between adjacent prior segmentation contours, two reference contours are obtained for each layer in opposite directions, and then the target contour is obtained by fusing the two reference contours.
3. The method according to claim 1, characterized in that, Also includes: S11, for the abnormal slice intervals of the target medical image segmentation model, add at least one layer containing the prior segmentation contour, and repeat S1-S9 until the obtained target medical image segmentation model is free of abnormalities.
4. The method according to claim 1, characterized in that, S2 includes: The first image sequence is sampled in the X, Y and Z directions, and the sampling rate in the Z direction is set to be greater than the sampling rate in the X and Y directions; After sampling the first image sequence in multiple directions and automatically segmenting the contours, the layer containing the prior segmented contours is inserted into the corresponding position of the first image sequence to obtain a second image sequence containing the prior segmented contours and the automatically segmented contours.
5. The method according to claim 1, characterized in that, S4 includes: Different thresholds are used to segment the layer image to obtain pre-segmented contours. The intersection-union ratio (IUU) of the pre-segmented contours and the prior segmented contours is calculated. The threshold at which the IUU is maximized is taken as the segmentation threshold of the layer.
6. The method according to claim 1, characterized in that, S8 includes: For each layer in the third image sequence, all contours passing through at least two intersection points are obtained using the intersection point set of the layer's edges; based on the prior features of the target, the contour most similar to the nearest prior segmentation contour among all the contours is selected as the target contour of the current layer; for layers between adjacent prior segmentation contours, the contour most similar to the contour of the previous layer among all the contours is selected as the target contour of the current layer.
7. An apparatus for generating a medical image segmentation model, used in the method according to any one of claims 1 to 6, characterized in that, include: Input unit, used to obtain the prior segmentation contour containing the target; The filtering unit is used to filter and denoise the original image sequence to obtain the first image sequence. A sampling unit is used to sample the first image sequence in multiple directions and automatically segment the contours to obtain a second image sequence containing the automatically segmented contours. A cropping unit is used to generate target candidate boxes based on the prior segmentation contours, and crop the second image sequence based on the target candidate boxes to obtain a third image sequence. The processing unit is configured to generate segmentation thresholds for each prior segmentation layer in the third image sequence based on the prior segmentation contours, to form a segmentation threshold candidate set; obtain a region of interest (ROI) candidate set for each layer in the third image sequence based on the segmentation threshold candidate set; perform edge extraction and edge smoothing on the ROIs in each layer to obtain an edge candidate set for all ROIs in that layer; merge the edges in each layer to obtain the intersection points of the merged edges, to form an intersection point set; select the automatically segmented contour most similar to the prior segmentation contour as the reference contour for the current layer based on the intersection point set; resample all reference contours in the third image sequence to obtain the target contours for all layers in the corresponding original image sequence, and model them to form a target medical image segmentation model.
8. The apparatus according to claim 7, characterized in that, Also includes: The processing unit is also used to obtain two reference contours for each layer between adjacent prior segmentation contours in opposite directions, and then fuse the two reference contours to obtain the target contour.
9. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a program that can run on the processor, and when the program is executed by the processor, causes the electronic device to perform the method of any one of claims 1 to 6.
10. A readable storage medium storing a program, characterized in that, When the program is executed, it implements the method of any one of claims 1 to 6.