Method and device for training ventricle region segmentation model and determining template image

By training the ventricular region segmentation model and selecting template images with high matching degree for brain CT image registration, the problem of low registration accuracy in the existing technology is solved and the accuracy of MCA blood supply area mapping is improved.

CN114066863BActive Publication Date: 2024-09-13SHENYANG NEUSOFT INTELLIGENT MEDICAL TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111387485.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2024-09-13
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

In the existing technology, the fixed template image used in ASPECTS results in low registration accuracy between the brain CT image and the template image, which affects the mapping effect of the MCA blood supply area and makes it difficult to accurately determine the blood supply of the MCA.

Method used

By training the ventricular region segmentation model, a template image with a high matching degree is determined from multiple available template images to reduce the difficulty of registering the brain CT image and the template image. The ventricular region segmentation model is used to classify the ventricular region of the candidate slice image. Match with the area ratio of the brain parenchyma area, and select the corresponding template image as the template image of the three-dimensional brain CT image.

Benefits of technology

It improves the registration accuracy of brain CT images and template images, increases the overlap area of ​​MCA blood supply area, improves the accuracy of ASPECTS, and reduces the difficulty of registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114066863B
    Figure CN114066863B
Patent Text Reader

Abstract

The embodiments of the present application disclose a training method for a ventricular region segmentation model, a method, device and apparatus for determining a template image of a brain CT image. A candidate slice image is determined from a three-dimensional brain CT image of a patient. The ventricular region and the brain parenchyma region of the candidate slice image are determined, and the area ratio of the ventricular region to the brain parenchyma region of each candidate slice image is calculated. The candidate slice image corresponding to the maximum value in the area ratio is determined as a typical slice image. A template image that matches the area ratio of the ventricular region to the brain parenchyma region of the typical slice image is selected from a template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image. Based on the area ratio of the ventricular region to the brain parenchyma region of the typical slice image, the template image selected from the template image group corresponding to the patient's age has a high degree of matching with the three-dimensional brain CT image, which can reduce the difficulty of subsequent registration of the brain CT image and the template image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a training method for a ventricular region segmentation model, a method, a device and equipment for determining a template image of a brain CT image. Background Art

[0002] Ischemic stroke is a major disease that threatens human health. ASPECTS (Alberta Stoke Program Early CT Score) can be used to determine the blood supply status of multiple blood supply areas in the MCA (Middle Cerebral Artery) of ischemic stroke patients, which can help doctors understand the blood supply status of patients.

[0003] MCA blood supply area mapping is the core link in ASPECTS. MCA blood supply area mapping refers to registering the brain CT image and the template image corresponding to the brain CT image to obtain the deformation field between the brain CT image and the template image corresponding to the brain CT image. Based on the obtained deformation field, the MCA brain atlas image corresponding to the template image is deformed to obtain the MCA brain atlas image corresponding to the brain CT image. The MCA brain atlas image includes the division results of each MCA blood supply area in the brain CT image. The MCA brain atlas image corresponding to the brain CT image is mapped to the brain CT image to obtain the division results of each MCA blood supply area in the brain CT image.

[0004] At present, the template image used in ASPECTS and the MCA brain atlas image corresponding to the template image are fixed. When registering a variety of different brain CT images based on the fixed template image and the MCA brain atlas image corresponding to the template image, it will increase the difficulty of registering the brain CT image and the template image, resulting in low registration accuracy, affecting the mapping effect of the MCA blood supply area, making it difficult to accurately determine the blood supply of the MCA. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a training method for a ventricular region segmentation model, a method, device and equipment for determining a template image of a brain CT image, which can select a template image with a high degree of matching with the brain CT image from a plurality of selectable template images, thereby reducing the difficulty of subsequent registration of the brain CT image and the template image.

[0006] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:

[0007] A training method for a ventricular region segmentation model, the ventricular region segmentation model comprising a first encoding branch, a second encoding branch and a first decoding branch, the method comprising:

[0008] Inputting a slice image to be trained into the first encoding branch to obtain a first image feature of the slice image to be trained, wherein the slice image to be trained is a slice image in a three-dimensional brain CT image;

[0009] Inputting the adjacent slice images of the slice image to be trained and the ventricle region segmentation and annotation images of the adjacent slice images of the slice image to be trained into the second encoding branch, acquiring the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricle region segmentation and annotation images of the adjacent slice images of the slice image to be trained;

[0010] fusing the first image feature, the second image feature and the third image feature to obtain a first image fusion feature;

[0011] Inputting the first image fusion feature into the first decoding branch to obtain a ventricle region segmentation prediction image of the slice image to be trained;

[0012] Calculating a first loss value according to the ventricular region segmentation prediction image of the slice image to be trained and the ventricular region segmentation annotation image of the slice image to be trained;

[0013] The ventricle region segmentation model is trained using the first loss value, and the step of inputting the candidate slice image to be trained into the first encoding branch and subsequent steps are repeatedly performed until a preset condition is met.

[0014] In a possible implementation, the method further includes:

[0015] Inputting the ventricular region segmentation prediction image of the slice image to be trained into a shape reconstruction model to obtain a first reconstructed image;

[0016] Inputting the segmented and annotated image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image;

[0017] Calculating a second loss value according to the first reconstructed image and the second reconstructed image;

[0018] The using the first loss value to train the ventricle region segmentation model comprises:

[0019] The first loss value and the second loss value are used to train the ventricular region segmentation model.

[0020] In a possible implementation, the shape reconstruction model includes a third encoding branch and a second decoding branch;

[0021] The step of inputting the ventricular region segmentation prediction image of the slice image to be trained into a shape reconstruction model to obtain a first reconstructed image comprises:

[0022] Inputting the ventricular region segmentation prediction image of the slice image to be trained into the third encoding branch to obtain a fourth image feature of the ventricular region segmentation prediction image of the slice image to be trained; inputting the fourth image feature into the second decoding branch to obtain a first reconstructed image;

[0023] The step of inputting the segmented and labeled image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image comprises:

[0024] The ventricular region segmentation and annotation image of the slice image to be trained is input into the third encoding branch to obtain the fifth image feature of the ventricular region segmentation and annotation image of the slice image to be trained; the fifth image feature is input into the second decoding branch to obtain a second reconstructed image.

[0025] A method for determining a template image of a brain CT image, the method comprising:

[0026] Determining candidate slice images from a three-dimensional brain CT image;

[0027] Extracting a brain parenchyma region in the candidate slice image;

[0028] Inputting a target candidate slice image, an adjacent slice image of the target candidate slice image, and a ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into a ventricular region segmentation model to obtain a ventricular region segmentation prediction image of the target candidate slice image; the ventricular region segmentation model is trained according to the ventricular region segmentation model training method according to any one of claims 1 to 3; the target candidate slice images are each of the candidate slice images;

[0029] Determine the ventricle region in the target candidate slice image according to the ventricle region segmentation prediction image of the target candidate slice image;

[0030] Calculating the area ratio of the ventricle region to the brain parenchyma region of each of the candidate slice images, and determining the candidate slice image corresponding to the maximum value of the area ratio as the typical slice image;

[0031] A template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image is selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0032] In a possible implementation, determining a candidate slice image from a three-dimensional brain CT image includes:

[0033] Binarizing the three-dimensional brain CT image according to a CT threshold to obtain a brain region, and determining a slice image with the largest area of ​​the brain region among slice images of the three-dimensional brain CT image as a central slice image;

[0034] A slice image whose slice index value is within a preset range of the slice index value of the central slice image is determined as a candidate slice image.

[0035] In a possible implementation, the ventricular region segmentation model includes a first encoding branch, a second encoding branch, and a first decoding branch, and inputting the target candidate slice image, the adjacent slice image of the target candidate slice image, and the ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image, including:

[0036] Inputting the target candidate slice image into the first encoding branch to obtain a sixth image feature of the target candidate slice image;

[0037] Inputting the adjacent slice images of the target candidate slice image and the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image into the second encoding branch, acquiring the seventh image feature of the adjacent slice images of the target candidate slice image and the eighth image feature of the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image;

[0038] fusing the sixth image feature, the seventh image feature and the eighth image feature to obtain a second image fusion feature;

[0039] The second image fusion feature is input into the first decoding branch to obtain a ventricular region segmentation prediction image of the target candidate slice image.

[0040] In a possible implementation, selecting a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image includes:

[0041] Obtain the segmentation threshold interval of the area ratio of the ventricular area to the brain parenchyma area corresponding to the patient's age;

[0042] Determine a segmentation threshold interval to which the area ratio of the ventricle region to the brain parenchyma region of the typical slice image belongs;

[0043] A template image corresponding to the matching segmentation threshold interval is selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0044] A training device for a ventricular region segmentation model, the ventricular region segmentation model comprising a first encoding branch, a second encoding branch and a first decoding branch, the device comprising:

[0045] A first input unit is used to input a slice image to be trained into the first encoding branch to obtain a first image feature of the slice image to be trained, wherein the slice image to be trained is a slice image in a three-dimensional brain CT image;

[0046] A second input unit is used to input the adjacent slice images of the slice image to be trained and the ventricle region segmentation and annotation image of the adjacent slice images of the slice image to be trained into the second encoding branch, and obtain the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricle region segmentation and annotation image of the adjacent slice images of the slice image to be trained;

[0047] a fusion unit, configured to fuse the first image feature, the second image feature and the third image feature to obtain a first image fusion feature;

[0048] A third input unit is used to input the first image fusion feature into the first decoding branch to obtain a ventricle region segmentation prediction image of the slice image to be trained;

[0049] A first calculation unit, configured to calculate a first loss value according to the ventricular region segmentation prediction image of the slice image to be trained and the ventricular region segmentation annotation image of the slice image to be trained;

[0050] An execution unit is used to train the ventricular region segmentation model by using the first loss value, and repeatedly input the candidate slice image to be trained into the first encoding branch and subsequent steps until a preset condition is met.

[0051] A device for determining a template image of a brain CT image, the device comprising:

[0052] A first determining unit, configured to determine a candidate slice image from a three-dimensional brain CT image;

[0053] An extraction unit, used for extracting a brain parenchyma region in the candidate slice image;

[0054] an acquisition unit, used for inputting a target candidate slice image, an adjacent slice image of the target candidate slice image, and a ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into a ventricular region segmentation model, and acquiring a ventricular region segmentation prediction image of the target candidate slice image; the ventricular region segmentation model is trained according to the above-mentioned ventricular region segmentation model training method; the target candidate slice images are each of the candidate slice images;

[0055] A second determining unit, configured to determine the ventricle region in the target candidate slice image according to the ventricle region segmentation prediction image of the target candidate slice image;

[0056] a calculation unit, configured to calculate the area ratio of the ventricle region to the brain parenchyma region of each of the candidate slice images, and determine the candidate slice image corresponding to the maximum value of the area ratio as the typical slice image;

[0057] The selection unit is used to select a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0058] A training device for a ventricular region segmentation model comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the training method for the ventricular region segmentation model as described above is implemented.

[0059] A device for determining a template image of a brain CT image comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for determining a template image of a brain CT image as described above is implemented.

[0060] A computer-readable storage medium stores instructions, which, when executed on a terminal device, enable the terminal device to execute the training method for a ventricular region segmentation model as described above, or to execute the method for determining a template image of a brain CT image as described above.

[0061] It can be seen that the embodiments of the present application have the following beneficial effects:

[0062] The embodiment of the present application provides a training method for a ventricular region segmentation model, a method, device and equipment for determining a template image of a brain CT image. Among them, the method for determining a template image of a brain CT image includes: determining a candidate slice image from a three-dimensional brain CT image of a patient. Determine each image in the candidate slice image as a target candidate slice image. Input the target candidate slice image, the adjacent slice image of the target candidate slice image, and the ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image. Furthermore, the ventricular region in the target candidate slice image can be determined based on the ventricular region segmentation prediction image of the target candidate slice image. In addition, the brain parenchyma region in the candidate slice image is extracted. After determining the ventricular region and the brain parenchyma region in the target candidate slice image, the area ratio of the ventricular region to the brain parenchyma region of each candidate slice image is calculated. The candidate slice image corresponding to the maximum value in the area ratio is determined as a typical slice image. In the embodiment of the present application, a template image group corresponding to the patient's age is provided according to the patient's age. Based on the typical slice images obtained, a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image can be selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image. Due to different patient ages, the corresponding template images are different. The ventricle region in the typical slice image is relatively complete and clear. The area ratio of the ventricle region to the brain parenchyma region of the typical slice image is different, and the corresponding template images are different. According to the area ratio of the ventricle region to the brain parenchyma region of the typical slice image, the template image selected from the template image group corresponding to the patient's age has a high degree of matching with the three-dimensional brain CT image, thereby reducing the difficulty of subsequent registration of the brain CT image and the template image. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram of the division result of each MCA blood supply area in a brain CT image provided in an embodiment of the present application;

[0064] Figure 2 A schematic diagram of a training method for a ventricular region segmentation model provided in an embodiment of the present application;

[0065] Figure 3 A flowchart of a method for training a ventricular region segmentation model provided in an embodiment of the present application;

[0066] Figure 4 A schematic diagram of another training method for a ventricular region segmentation model provided in an embodiment of the present application;

[0067] Figure 5 A flowchart of another method for training a ventricular region segmentation model provided in an embodiment of the present application;

[0068] Figure 6 A schematic diagram of a method for determining a template image of a brain CT image provided in an embodiment of the present application;

[0069] Figure 7 A flowchart of a method for determining a template image of a brain CT image provided in an embodiment of the present application;

[0070] Figure 8 Typical schematic diagrams of different ventricular morphology and nucleus levels provided in the embodiments of the present application;

[0071] Fig. 9 A schematic diagram of the structure of a training device for a ventricular region segmentation model provided in an embodiment of the present application;

[0072] Fig.10 A schematic diagram of the structure of a device for determining a template image of a brain CT image provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0074] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.

[0075] Ischemic stroke is a major disease that threatens human health. By determining the blood supply status of multiple blood supply areas in the MCA of patients with ischemic stroke, doctors can understand the blood supply status of patients. Figure 1 As shown, this figure is a schematic diagram of the division results of each MCA blood supply area in a brain CT image provided by an embodiment of the present application. Among them, the brain CT image is an image obtained after a brain examination is performed by a CT device. The brain CT image can be a three-dimensional brain CT image composed of multi-layer brain CT slice images, or it can be a single brain CT image of a two-dimensional plane image. The brain CT image has a skull area and a brain parenchyma area, and the brain parenchyma area has a ventricle area and an MCA blood supply area. For example, Figure 1 The following are schematic diagrams of the division results of each MCA blood supply area. In the brain CT image, the MCA blood supply area can be divided into 10 parts on two levels. There are 7 parts in the basal ganglia level, such as the caudate nucleus C, insula I, internal capsule IC, lentiform nucleus L, middle artery anterior cortical area M1, middle artery insular lateral cortical area M2, and middle artery posterior cortical area M3. There are 3 parts in the cranial nucleus layer and the upper layer of the nucleus, such as the middle cerebral artery cortex M4 above M1, the middle cerebral artery cortex M5 above M2, and the middle cerebral artery cortex M6 above M3.

[0076] ASPECTS can be used to determine the blood supply of multiple blood supply areas in the MCA of patients with ischemic stroke. The total score of ASPECTS is set to 10 points, which corresponds to the number of MCA blood supply areas. If any of the 10 MCA blood supply areas has early ischemic changes, 1 point is subtracted. In ASPECTS, it is first necessary to determine the blood supply areas of each MCA in the brain CT image, and then further determine the ischemic changes of each MCA blood supply area.

[0077] MCA blood supply area mapping is used to determine the various MCA blood supply areas of the brain CT image and is the core link of ASPECTS. MCA blood supply area mapping refers to registering the brain CT image and the template image corresponding to the brain CT image to obtain the deformation field between the brain CT image and the template image corresponding to the brain CT image. Based on the obtained deformation field, the MCA brain atlas image corresponding to the template image is deformed to obtain the MCA brain atlas image corresponding to the brain CT image. The MCA brain atlas image includes the division results of each MCA blood supply area in the brain CT image. The MCA brain atlas image corresponding to the brain CT image is mapped to the brain CT image to obtain the division results of each MCA blood supply area in the brain CT image.

[0078] At present, the template image used in ASPECTS and the MCA brain atlas image corresponding to the template image are fixed. When registering a variety of different brain CT images based on the fixed template image and the MCA brain atlas image corresponding to the template image, it will increase the difficulty of registering the brain CT image and the template image, resulting in low registration accuracy, affecting the mapping effect of the MCA blood supply area, making it difficult to accurately determine the blood supply of the MCA.

[0079] Based on this, the embodiment of the present application provides a training method for a ventricular region segmentation model, a method, device and equipment for determining a template image of a brain CT image. Among them, the method for determining a template image of a brain CT image includes: determining a candidate slice image from a three-dimensional brain CT image of a patient. Determine each image in the candidate slice image as a target candidate slice image. Input the target candidate slice image, the adjacent slice image of the target candidate slice image, and the ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image. Furthermore, the ventricular region in the target candidate slice image can be determined based on the ventricular region segmentation prediction image of the target candidate slice image. In addition, the brain parenchyma region in the candidate slice image is extracted. After determining the ventricular region and the brain parenchyma region in the target candidate slice image, the area ratio of the ventricular region to the brain parenchyma region of each candidate slice image is calculated. The candidate slice image corresponding to the maximum value in the area ratio is determined as a typical slice image. In the embodiment of the present application, a template image group corresponding to the patient's age is provided according to the patient's age. Based on the typical slice image obtained, a template image that matches the area ratio of the ventricle area to the brain parenchyma area of ​​the typical slice image can be selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image. Since the ventricles in the typical slices are relatively complete and clear, the area ratio of the ventricle area to the brain parenchyma area of ​​the typical slice image is relatively accurate. There is a corresponding relationship between the area ratio of the ventricle area to the brain parenchyma area of ​​the slice image and the template image in the template image group corresponding to the patient's age. Based on the area ratio of the ventricle area to the brain parenchyma area of ​​the typical slice image, the template image selected from the template image group corresponding to the patient's age has a high degree of matching with the three-dimensional brain CT image, thereby reducing the difficulty of subsequent registration of the brain CT image and the template image.

[0080] It should be noted that the method for determining the template image of the brain CT image provided in the embodiment of the present application involves using the ventricular region segmentation model to divide the ventricular region in the brain CT image. The ventricular region segmentation model is obtained through training, and the embodiment of the present application provides a training method for the ventricular region segmentation model. In order to facilitate understanding of the method for determining the template image of the brain CT image provided in the embodiment of the present application, the training method of the ventricular region segmentation model provided in the embodiment of the present application is first described below.

[0081] Combine first Figure 2 The scene example shown illustrates the training method of the ventricular region segmentation model provided in the embodiment of the present application. Figure 2 A schematic diagram of a training method for a ventricular region segmentation model provided in an embodiment of the present application.

[0082] In practical applications, ventricular region segmentation models include Figure 2The first encoding branch, the second encoding branch and the first decoding branch are shown. The slice image to be trained is input into the first encoding branch to obtain the first image feature of the slice image to be trained. The slice image to be trained is a slice image in a three-dimensional brain CT image.

[0083] In order to improve the segmentation accuracy of the ventricular region segmentation model, it is necessary to integrate the ventricular structure information in the adjacent slice images of the slice image to be trained. Specifically, the adjacent slice images of the slice image to be trained and the ventricular region segmentation annotation images of the adjacent slice images of the slice image to be trained are input into the second encoding branch to obtain the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricular region segmentation annotation images of the adjacent slice images of the slice image to be trained.

[0084] Further, the first image feature, the second image feature and the third image feature are fused to obtain a first image fusion feature. The fused first image fusion feature is input into the first decoding branch of the ventricular region segmentation model to obtain a ventricular region segmentation prediction image of the slice image to be trained. In order to train the ventricular region segmentation model, a first loss value is calculated based on the ventricular region segmentation prediction image of the slice image to be trained and the ventricular region segmentation annotation image of the slice image to be trained. Then, the ventricular region segmentation model is trained using the first loss value, and the candidate slice image to be trained is re-input into the first encoding branch and subsequent steps until the preset condition for stopping the training of the ventricular region segmentation model is reached, and the trained ventricular region segmentation model can be obtained.

[0085] In order to more clearly understand the training method of the ventricular region segmentation model provided in the embodiment of the present application, a training method of the ventricular region segmentation model provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0086] See also Figure 3 , which is a flow chart of a training method for a ventricular region segmentation model provided in an embodiment of the present application. The ventricular region segmentation model includes a first encoding branch, a second encoding branch, and a first decoding branch. In a possible implementation, the ventricular region segmentation model is a Unet network structure.

[0087] Based on this, the training method of the ventricle region segmentation model includes steps S301-S306:

[0088] S301: Inputting a slice image to be trained into a first encoding branch to obtain a first image feature of the slice image to be trained, where the slice image to be trained is a slice image in a three-dimensional brain CT image.

[0089] The three-dimensional brain CT image is composed of multiple layers of brain CT slice images, and each brain CT slice image has a different layer position in the three-dimensional brain CT image. In this step, the slice image to be trained is a slice image in the three-dimensional brain CT image. It can be understood that the number of slice images to be trained is not limited, and the number of slice images to be trained can be determined according to actual needs.

[0090] The first encoding branch is used to extract the image feature of the input slice image to be trained, and output the first image feature of the slice image to be trained.

[0091] S302: Input the adjacent slice images of the slice image to be trained and the ventricular region segmentation and annotation images of the adjacent slice images of the slice image to be trained into the second encoding branch, and obtain the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricular region segmentation and annotation images of the adjacent slice images of the slice image to be trained.

[0092] The adjacent slice images of the slice image to be trained are slice images adjacent to the slice image to be trained in the three-dimensional brain CT image. It is understandable that the number of adjacent slice images of the slice image to be trained is not limited, and the adjacent slice images of the slice image to be trained may be the slice image of the upper layer of the slice image to be trained, the upper two slice images of the slice image to be trained, the lower layer of the slice image to be trained, the lower two slice images of the slice image to be trained, the upper layer of the slice image and the lower layer of the slice image to be trained, or the upper two slice images and the upper and lower two slice images of the slice image to be trained, etc. The position and number of the slice images to be trained may be determined according to actual needs.

[0093] It should be noted that the ventricular structures displayed in different slice images in a three-dimensional brain CT image are different. For example, the ventricular structures displayed in slice images with farther layer positions and slice images with more layer positions are quite different. Generally speaking, when segmenting the ventricular region of each slice image in a three-dimensional brain CT image, the differences in the ventricular structures in different slice images will increase the difficulty of segmenting the ventricular region in the slice image by the ventricular region segmentation model and make the accuracy of the ventricular region segmentation prediction image output by the ventricular region segmentation model low. Based on this, considering that the ventricular structures of adjacent slice images in a three-dimensional brain CT image are relatively similar, the embodiment of the present application incorporates the ventricular structure information of adjacent slice images of the slice image to be trained into the input of the ventricular region segmentation model.

[0094] In specific implementation, when training the ventricular region segmentation model, the adjacent slice images of the slice image to be trained and the ventricular region segmentation annotation images of the adjacent slice images of the slice image to be trained are input into the second encoding branch to obtain the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricular region segmentation annotation images of the adjacent slice images of the slice image to be trained.

[0095] Based on this, the ventricular region segmentation prediction image of the slice image to be trained output by the subsequent ventricular region segmentation model depends not only on the ventricular structure information of the slice image to be trained, but also on the ventricular structure information in the adjacent slice image, so that the continuity characteristics of the ventricular structure between the slice image to be trained and the adjacent slice image are fully considered, which helps to improve the accuracy of the ventricular region segmentation prediction image output by the ventricular region segmentation model.

[0096] In addition, if the adjacent slice image of the slice image to be trained does not have a corresponding ventricular region segmentation annotation image, an empty annotation image is used instead.

[0097] S303: Fusing the first image feature, the second image feature, and the third image feature to obtain a first image fusion feature.

[0098] The first image feature obtained by the first encoding branch, the second image feature obtained by the second encoding branch, and the third image feature are fused to obtain a first image fusion feature.

[0099] The first image fusion feature fuses the image features of the slice image to be trained, the image features of the slice images adjacent to the slice image to be trained, and the image features of the ventricular region segmentation annotation image of the slice images adjacent to the slice image to be trained.

[0100] S304: Inputting the first image fusion feature into the first decoding branch to obtain a ventricle region segmentation prediction image of the slice image to be trained.

[0101] The ventricular region segmentation prediction image of the slice image to be trained is obtained by inputting the first image fusion feature into the first decoding branch. Since the first image fusion feature fuses the first image feature of the slice image to be trained, the second image feature of the adjacent slice image to be trained, and the third image feature of the ventricular region segmentation annotation image of the adjacent slice image to be trained, the ventricular region segmentation prediction image of the slice image to be trained is obtained by combining the continuity feature obtained by the ventricular structure between the slice image to be trained and the adjacent slice image. The feature diversity of the first image fusion feature helps to improve the accuracy of the ventricular region segmentation prediction image output by the ventricular region segmentation model.

[0102] In a possible implementation, when the ventricle region segmentation model is a Unet structure, the first decoding branch is used to obtain a ventricle region segmentation prediction image of the slice image to be trained by upsampling.

[0103] S305: Calculate a first loss value according to the ventricle region segmentation prediction image of the slice image to be trained and the ventricle region segmentation annotation image of the slice image to be trained.

[0104] The ventricular region segmentation annotation image of the slice image to be trained is a standard image of the ventricular region segmentation prediction image. A first loss function is constructed based on the ventricular region segmentation prediction image of the slice image to be trained output by the ventricular region segmentation model and the ventricular region segmentation annotation image of the slice image to be trained. The ventricular region segmentation model is trained using a first loss value of the first loss function, and finally the first loss value reaches a preset threshold.

[0105] The first loss value of the first loss function is used as a similarity measure between the predicted image of the ventricular region segmentation of the slice image to be trained and the labeled image of the ventricular region segmentation of the slice image to be trained. The smaller the first loss value, the greater the similarity measure between the predicted image of the ventricular region segmentation of the slice image to be trained and the labeled image of the ventricular region segmentation of the slice image to be trained, and the greater the degree of similarity.

[0106] S306: Using the first loss value to train the ventricular region segmentation model, repeatedly inputting the candidate slice image to be trained into the first encoding branch and subsequent steps until a preset condition is met.

[0107] The ventricular region segmentation model is trained using the first loss value to determine whether a preset condition is met. The preset condition can be used to determine whether the training of the ventricular region segmentation model meets the requirements. The preset condition may be that the first loss value reaches a threshold or the number of training times reaches a threshold.

[0108] When the preset conditions are not met, it means that the training of the ventricle region segmentation model has not met the requirements, and it is necessary to continue training, that is, repeat S301 and subsequent steps.

[0109] Based on the contents of S301-S306, it can be known that the continuity of the ventricular structure in the candidate slice image to be trained and the adjacent slice images of the candidate slice image to be trained is fully considered, so that the input feature of the ventricular region segmentation model is the first image fusion feature that integrates multiple features, which helps to improve the accuracy of the ventricular region segmentation prediction image output by the ventricular region segmentation model.

[0110] In order to improve the robustness and generalization ability of the ventricular region segmentation model, the present application embodiment provides another training method for the ventricular region segmentation model. Figure 4 The example scenario shown illustrates the approach. Figure 4 A schematic diagram of another method for training a ventricular region segmentation model provided in an embodiment of the present application.

[0111] In practical applications, the ventricular region segmentation prediction image of the slice image to be trained obtained by the first decoding branch of the ventricular region segmentation model is input into the shape reconstruction model to obtain a first reconstructed image. Then, the ventricular region segmentation annotation image of the slice image to be trained is input into the shape reconstruction model to obtain a second reconstructed image. If the ventricular region segmentation annotation image of the slice image to be trained is the standard image of the ventricular region segmentation prediction image of the slice image to be trained, then the second reconstructed image can be regarded as the standard image of the first reconstructed image. According to the first reconstructed image and the second reconstructed image, a second loss value is calculated. The ventricular region segmentation model is trained using the first loss value obtained from the ventricular region segmentation prediction image of the slice image to be trained and the ventricular region segmentation annotation image of the slice image to be trained, and the second loss value obtained from the first reconstructed image and the second reconstructed image.

[0112] In order to more clearly understand another training method for the ventricular region segmentation model provided in the embodiment of the present application, Figure 5 Another training method for the ventricular region segmentation model provided in the embodiment of the present application is described in detail. Figure 5 A flowchart of another method for training a ventricular region segmentation model provided in an embodiment of the present application.

[0113] like Figure 5 As shown, in addition to the above S301-S305, another training method for a ventricle region segmentation model provided in an embodiment of the present application further includes steps S501-S504:

[0114] S501: Inputting the ventricular region segmentation prediction image of the slice image to be trained into a shape reconstruction model to obtain a first reconstructed image.

[0115] The ventricular region segmentation prediction image of the slice image to be trained outputted in S304 is inputted into the shape reconstruction model to obtain a first reconstructed image. The first reconstructed image is an image obtained by re-expressing the ventricular region segmentation prediction image of the slice image to be trained using the shape reconstruction model.

[0116] In a possible implementation, the shape reconstruction model is a Unet network structure.

[0117] It should be noted that the shape reconstruction model in the embodiment of the present application is a pre-trained model, which has been trained before the ventricle segmentation model is trained. In the process of training the ventricle segmentation model, it can be directly used.

[0118] S502: Inputting the segmented and annotated image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image.

[0119] S503: Calculate a second loss value according to the first reconstructed image and the second reconstructed image.

[0120] Since the ventricular region segmentation annotation image of the slice image to be trained is the standard image of the ventricular region segmentation prediction image of the slice image to be trained, the second reconstructed image obtained from the ventricular region segmentation annotation image can be regarded as the standard image of the first reconstructed image obtained from the ventricular region segmentation prediction image.

[0121] Based on this, a second loss function is constructed according to the first reconstructed image and the second reconstructed image, and a second loss value is calculated. The second loss function is used as a similarity measure between the first reconstructed image and the second reconstructed image. The smaller the difference second loss value, the greater the similarity measure between the first reconstructed image and the second reconstructed image, and the greater the degree of similarity.

[0122] S504: Train a ventricle region segmentation model using the first loss value and the second loss value.

[0123] The first loss value obtained in S305 and the second loss value obtained in S503 are used to train the ventricle region segmentation model. It can be understood that S504 is a specific implementation of using the first loss value in S306 to train the ventricle region segmentation model.

[0124] In a possible implementation, corresponding weight coefficients are set for the first loss value and the second loss value, and the first loss value and the second loss value are multiplied by their respective weight coefficients to form a final loss value of the ventricular region segmentation model.

[0125] Based on the contents of S501-S504, it can be known that the second loss value that can be used to train the ventricle region segmentation model is obtained through the shape reconstruction model. Using the first loss value and the second loss value to train the ventricle region segmentation model can make the ventricle result shape segmented in the ventricle region segmentation prediction image of the slice image to be trained output by the ventricle region segmentation model more realistic, thereby improving the robustness and generalization ability of the overall network.

[0126] In a possible implementation, the shape reconstruction model includes a third encoding branch and a second decoding branch. Based on this, the embodiment of the present application provides a specific implementation of inputting the ventricular region segmentation prediction image of the slice image to be trained into the shape reconstruction model in S501 to obtain a first reconstructed image, including:

[0127] The ventricular region segmentation prediction image of the slice image to be trained is input into the third encoding branch to obtain the fourth image feature of the ventricular region segmentation prediction image of the slice image to be trained; the fourth image feature is input into the second decoding branch to obtain the first reconstructed image.

[0128] The third encoding branch is used to extract the image features of the ventricular region segmentation prediction image of the input slice image to be trained. The second decoding branch is used to reconstruct the input fourth image features into an image.

[0129] In addition, the embodiment of the present application provides a specific implementation method of inputting the ventricular region segmentation and annotation image of the slice image to be trained into the shape reconstruction model in S502 to obtain the second reconstructed image, including:

[0130] The ventricular region segmentation and annotation image of the slice image to be trained is input into the third encoding branch to obtain the fifth image feature of the ventricular region segmentation and annotation image of the slice image to be trained; the fifth image feature is input into the second decoding branch to obtain the second reconstructed image.

[0131] The third encoding branch is also used to extract the image features of the ventricle region segmentation annotation image of the input slice image to be trained. The second decoding branch is used to reconstruct the input fifth image feature into an image.

[0132] Based on the above description of the process of training the ventricular region segmentation model, the present application embodiment provides a method for determining a template image of a brain CT image, in which the above trained ventricular region segmentation model is used. Figure 6 The example scenario shown illustrates the approach. Figure 6 A schematic diagram of a method for determining a template image of a brain CT image provided in an embodiment of the present application.

[0133] In practical applications, candidate slice images are determined from slice images in a three-dimensional brain CT image, and brain parenchyma regions in the candidate slice images are extracted.

[0134] Determine each of the candidate slice images as a target candidate slice image. Input the target candidate slice image, the adjacent slice images of the target candidate slice image, and the ventricular region segmentation annotation images of the adjacent slice images of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image. Among them, the ventricular region segmentation model is a model trained according to the training method of the ventricular region segmentation model described in any of the above embodiments. Furthermore, according to the ventricular region segmentation prediction image of the target candidate slice image, the ventricular region in the target candidate slice image can be determined.

[0135] After the brain parenchyma region and the ventricle region in the candidate slice images are determined, the area ratio of the ventricle region to the brain parenchyma region of each candidate slice image can be calculated, and the candidate slice image corresponding to the maximum value in the area ratio is determined as the typical slice image.

[0136] The typical slice image is used to determine the template image with high matching degree with the three-dimensional brain CT image. Different patient ages correspond to their own template image groups. From the template image group corresponding to the patient's age, a template image that matches the area ratio of the ventricle area to the brain parenchyma area of ​​the typical slice image is selected as the template image corresponding to the three-dimensional brain CT image.

[0137] In order to more clearly understand the method for determining the template image of the brain CT image provided in the embodiment of the present application, a training method for a ventricular region segmentation model provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0138] See also Figure 7 , Figure 7 A flowchart of a method for determining a template image of a brain CT image provided in an embodiment of the present application. The method includes steps S701-S706:

[0139] S701: Determine candidate slice images from a three-dimensional brain CT image.

[0140] In the embodiment of the present application, in order to reduce the difficulty of subsequent registration of the brain CT image and the template image, it is necessary to select a template image with a high degree of matching with the brain CT image from a plurality of available template images. Based on this, the embodiment of the present application provides a specific implementation method of selecting a template image with a high degree of matching with the brain CT image from a plurality of available template images, that is, determining a slice image with high clarity from the three-dimensional brain CT image as a typical slice image, and then determining a template image corresponding to the degree of matching with the brain CT image based on the typical slice image.

[0141] Based on this, it is necessary to determine a typical slice image from each slice image in the three-dimensional brain CT image. The method of determining a typical slice image is to take the slice image corresponding to the maximum area ratio of the ventricle region to the brain parenchyma region in the slice image as the typical slice image.

[0142] In the specific implementation, candidate slice images are first determined from the three-dimensional brain CT image. The candidate slice images are all slice images or part of the slice images in the three-dimensional brain CT image. If it is all slice images, the efficiency of determining typical slice images from all slice images is relatively low. To this end, the embodiment of the present application provides a specific implementation method for determining candidate slice images from a three-dimensional brain CT image, including:

[0143] A1: Binarize the three-dimensional brain CT image according to the CT threshold to obtain the brain region, and determine the slice image with the largest brain region area among the slice images of the three-dimensional brain CT image as the central slice image.

[0144] The three-dimensional brain CT image is binarized, and the background area and the brain area in the three-dimensional brain CT image are divided by the CT threshold. The background area is the area in the three-dimensional brain CT image except the brain imaging part, and the brain area includes the skull area and the brain parenchyma area. The specific binarization process can be to set the CT value of the background area to 0 and the CT value of other areas to 1.

[0145] It is understandable that the area of ​​the brain region in each slice image of the three-dimensional brain CT image is different. The ventricle region in the slice image with a larger brain area is more complete and clear. The slice image with the largest brain area in each slice image is determined as the central slice image.

[0146] A2: Determine a slice image whose slice index value is within a preset range of the slice index value of the central slice image as a candidate slice image.

[0147] Each slice image of the three-dimensional brain CT image has a corresponding slice index value, and the slice index value is determined according to the layer position of the slice image in the three-dimensional brain CT image. The ventricle area in the slice image adjacent to the central slice image is also relatively clear, and the slice image whose slice index value is within the preset range of the slice index value of the central slice image is used as a candidate slice image. For example, if the slice index value of the central slice image is 10 and the preset range of the slice index value is 3, then 7 slice images with slice index values ​​of 7 to 13 are used as candidate slice images. Among them, the preset range of the slice index value can be pre-set, and the preset range of the slice index value can be set according to the specific type of the three-dimensional brain CT image.

[0148] It is understandable that the candidate slice images obtained by A1-A2 are mostly located in the middle layer of the slice image in the three-dimensional brain CT image. The ventricular structure displayed by the candidate slice images obtained by A1-A2 is relatively clear and complete, and is easy to analyze and compare different three-dimensional brain CT images. In addition, due to the ventricular region segmentation prediction image of the target candidate slice image obtained based on the ventricular region segmentation model in S703 of the present application embodiment. In general, the ventricular region segmentation model is implemented using the Unet network structure, and the Unet network structure is a neural network. The structure of the neural network makes the ventricular region segmentation model have higher requirements for the input image. Since the ventricular region in some slice images is displayed intermittently and fuzzy, and the consistency of the candidate slice images obtained by A1-A2 is high, the segmentation accuracy of the ventricular region segmentation model can be improved. In addition, compared to determining all slice images in the three-dimensional brain CT image as candidate slice images, determining the slice images obtained based on A1-A2 as candidate slice images can shorten the processing time when the candidate slice images are segmented in the ventricular region in S703, thereby improving the speed of determining the template image of the brain CT image.

[0149] S702: Extracting the brain parenchyma region in the candidate slice image.

[0150] The candidate slice image contains a skull region and a brain parenchyma region, and the brain parenchyma region contains a ventricle region. The skull region in the candidate slice image has a higher CT value and a clearer edge. The skull region in the three-dimensional brain CT image can be removed first to achieve recognition of the brain parenchyma image in the candidate slice image, thereby narrowing the recognition range of the ventricle region and improving the accuracy of recognition of the ventricle region.

[0151] The embodiment of the present application does not limit the method for identifying the brain parenchyma region in the candidate slice image. A geodesic level set contour extraction algorithm based on an implicit function may be used, specifically comprising the following steps:

[0152] B1: Perform threshold segmentation on the candidate slice image to be processed to obtain the threshold segmentation result. Specifically, the threshold can be selected from [0-100], and the pixel values ​​within the threshold range are set to 1, and the pixel values ​​outside the threshold range are set to 0.

[0153] B2: Perform maximum connected domain analysis layer by layer along the z-axis.

[0154] Specifically, each slice image of the candidate slice images is traversed in turn, and the maximum connected domain area in each candidate slice image is calculated.

[0155] B3: Determine the initial segmentation slice index.

[0156] The candidate slice image corresponding to the maximum connected domain area in step B2 is used as the initial segmentation slice image, and the index value corresponding to the initial segmentation slice image is used as the initial segmentation slice index.

[0157] B4: Perform image segmentation on the initial segmented slice image and generate the foreground and background grayscale probability density functions of the initial segmented slice image respectively.

[0158] Calculate the grayscale probability density function of the foreground and background of the initial segmented slice image. The initial segmented slice image is the candidate slice image corresponding to the maximum connected domain area determined in step B3.

[0159] The threshold segmentation result is used as the initial contour, and the brain parenchyma contour corresponding to the initial segmented slice image is generated based on the temporally hidden geodesic level set active contour algorithm.

[0160] B5: Based on the initial segmented slice image, the brain parenchyma contour is generated layer by layer upward and layer by layer downward respectively using the temporally hidden geodesic level set active contour algorithm according to the slice order of the multi-layer candidate slice images.

[0161] B6: Post-processing of 3D data such as filling holes and removing isolated points.

[0162] The generated brain parenchyma contour is processed by filling holes and removing isolated points using three-dimensional data, making the obtained brain parenchyma contour more accurate.

[0163] B7: Output the brain parenchyma segmentation results of the candidate slice image.

[0164] Thus, the brain parenchyma region in the candidate slice image can be identified more accurately. The above process of identifying the brain parenchyma region in the candidate slice image can be implemented independently and is the basis for the subsequent ventricle region segmentation step.

[0165] S703: Input the target candidate slice image, the adjacent slice images of the target candidate slice image, and the ventricular region segmentation annotation images of the adjacent slice images of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image; the ventricular region segmentation model is trained according to the above-mentioned ventricular region segmentation model training method; the target candidate slice images are each of the candidate slice images.

[0166] Determine each of the candidate slice images as a target candidate slice image. Input the target candidate slice image, the adjacent slice images of the target candidate slice image, and the ventricular region segmentation annotation images of the adjacent slice images of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image. The ventricular region segmentation model is trained by the ventricular region segmentation model training method described in any of the above embodiments.

[0167] Wherein, the description of the adjacent slice images of the target candidate slice image may refer to that described in S302. The ventricular region segmentation annotation image of the adjacent slice images of the target candidate slice image is obtained according to the ventricular region segmentation prediction image of the adjacent slice images of the target candidate slice image. After obtaining the ventricular region segmentation prediction image, the ventricular region may be set to 1 and other regions may be set to 0 to obtain the corresponding ventricular region segmentation annotation image.

[0168] The ventricular region segmentation prediction image of the adjacent slice image of the target candidate slice image is the ventricular region segmentation prediction image obtained when the adjacent slice image is used as the target candidate slice image. For example, after obtaining the ventricular region segmentation prediction image of candidate slice image 1, when performing ventricular region segmentation of candidate slice image 2, the candidate slice image 2, the candidate slice image 1, and the ventricular region segmentation prediction image of candidate slice image 1 can be used to obtain the ventricular region segmentation prediction image of candidate slice image 2. It can be understood that when the adjacent slice image of the target candidate slice image does not have a corresponding ventricular region segmentation prediction image, an empty annotation map can be used instead.

[0169] S704: Determine the ventricle region in the target candidate slice image according to the ventricle region segmentation prediction image of the target candidate slice image.

[0170] After obtaining the ventricle region segmentation prediction image of the target candidate slice image, the ventricle region in the target candidate slice image can be determined.

[0171] It should be noted that the embodiment of the present application does not limit the order between S702 and S703-S704, that is, after executing S701, S702 and S703-S704 can be executed in parallel, or S702 can be executed first and then S703-S704, or S703-S704 can be executed first and then S702.

[0172] S705: Calculate the area ratio of the ventricle region to the brain parenchyma region of each candidate slice image, and determine the candidate slice image corresponding to the maximum value of the area ratio as the typical slice image.

[0173] After obtaining the brain parenchyma region and the ventricle region of each candidate slice image, the area ratio of the ventricle region to the brain parenchyma region of each candidate slice image is calculated, and the candidate slice image corresponding to the maximum value in the area ratio is determined as the typical slice image.

[0174] It can be understood that the typical slice image is a relatively complete and clear slice image of the ventricle region in the candidate slice image. The area ratio of the ventricle region to the brain parenchyma region in the typical slice image is an important reference indicator for determining the template image corresponding to the matching degree of the brain CT image.

[0175] S706: Selecting a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age as a template image corresponding to the three-dimensional brain CT image.

[0176] It is understandable that human brain development is affected by factors such as age, and the shape and size of brain tissue vary with age. In addition, the characteristics of the ventricular area in the three-dimensional brain CT image are more obvious, see Figure 8 As shown, Figure 8 The following is a typical schematic diagram of different ventricular morphology and nucleus levels provided in the embodiments of this application. The ventricular area in the brain CT image is Figure 8 Dark areas in a 3D brain CT image. Figure 8 Shown are schematic cross-sectional views of plain scan CT scans of the brain at the nucleus level in three situations: small, medium, and large ventricles. It can be seen that the anatomical structures such as the insula and nuclei are quite different. Patients with very different anatomical morphologies of brain tissue can be effectively distinguished based on the relative size of the ventricular area and the brain parenchyma area. Based on this, an embodiment of the present application provides a method for determining a template image corresponding to a three-dimensional brain CT image based on the patient's age and the area ratio of the ventricular area to the brain parenchyma area. In this way, the template image corresponding to the selected three-dimensional brain CT image has a high degree of match with the patient's three-dimensional brain CT image.

[0177] Based on this, according to the patient's age, a template image group corresponding to the patient's age is obtained. For example, according to the different age groups [20,50], (50,60], (60,70], (70, +∞], it is divided into four groups, and each group of patient age corresponds to a template image group. The template image group corresponding to each group of patient age is specifically divided into three categories, namely, a template image group with a relatively large area between the ventricular region and the brain parenchyma region, a template image group with a medium area ratio between the ventricular region and the brain parenchyma region, and a template image group with a relatively small area between the ventricular region and the brain parenchyma region. Generally speaking, the larger the area ratio of the ventricular region to the brain parenchyma region, the larger the area of ​​the ventricular region. Furthermore, based on the area ratio of the ventricular region to the brain parenchyma region in the typical slice image, a template image that matches the area ratio of the ventricular region to the brain parenchyma region of the typical slice image is selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0178] For example, if the patient's age belongs to the (60,70] group, the template image group corresponding to the (60,70] group is determined. If the area ratio of the ventricle region to the brain parenchyma region of the typical slice image in the patient's three-dimensional brain CT image is less than or equal to 0.063, the template image group corresponding to the smaller area ratio is matched. If the area ratio of the ventricle region to the brain parenchyma region of the typical slice image is greater than 0.063 and less than or equal to 0.118, the template image group with a medium area ratio is matched. If the area ratio of the ventricle region to the brain parenchyma region of the typical slice image is greater than 0.118, the template image group with a larger area ratio is matched. It can be understood that 0.063 and 0.118 are the thresholds required to divide the area ratio segmentation threshold interval. The area ratio segmentation threshold intervals are (0,0.063], (0.063,0.118] and (0.118,1].

[0179] In a possible implementation, the embodiment of the present application provides a specific implementation of selecting a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age in S706 as a template image corresponding to the three-dimensional brain CT image, including:

[0180] C1: Obtain the segmentation threshold interval of the area ratio of the ventricular area to the brain parenchyma area corresponding to the patient's age.

[0181] In specific implementation, the three types of template image groups correspond to different area ratio segmentation threshold intervals, such as (0, 0.063], (0.063, 0.118] and (0.118, 1] described in S706.

[0182] As an optional example, the process of obtaining the threshold required for dividing the area ratio segmentation threshold interval is:

[0183] The 203 collected three-dimensional brain CT images were divided into four groups according to age range, and the determination process of each group was the same and independent of each other. Taking any one of the groups as an example, the area ratio of the ventricular area to the brain parenchyma area in the three-dimensional brain CT images of this group, the mean CT value of the ventricular area in the typical slice image, and the variance of the CT value of the ventricular area were calculated in turn. Furthermore, the area ratio of the ventricular area to the brain parenchyma area was classified into three categories using the K-means classification algorithm, and the classification threshold of the area ratio of the ventricular area to the brain parenchyma area was output, that is, the threshold required to divide the area ratio segmentation threshold interval.

[0184] In order to verify the accuracy of the threshold, the three indicators of the ratio of the area of ​​the ventricular region to the brain parenchyma region, the mean CT value of the ventricular region of the typical slice image, and the variance of the CT value of the ventricular region of the typical slice image were analyzed by variance analysis between groups. If the P-value of each indicator in the result is much less than 0.05, it means that the above three classification results are statistically significant, and the threshold is determined to be accurate.

[0185] C2: Determine the segmentation threshold interval to which the area ratio of the ventricular region to the brain parenchyma region of a typical slice image belongs.

[0186] After obtaining the area ratio of the ventricle region to the brain parenchyma region of the typical slice image, the segmentation threshold interval to which the area ratio of the ventricle region to the brain parenchyma region of the typical slice image belongs is determined, for example, (0, 0.063].

[0187] C3: Select a template image corresponding to a matching segmentation threshold interval from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0188] If the patient's age belongs to the (60,70] group, determine the template image group corresponding to the (60,70] group. If the area ratio of the ventricle region to the brain parenchyma region of the typical slice image in the patient's three-dimensional brain CT image belongs to (0,0.063], then match the template image group with a smaller ventricle region area. In specific implementation, select a suitable template image from the acquired template image group as the template image corresponding to the three-dimensional brain CT image. For example, select the template image whose area ratio is closest to the area ratio of the ventricle region to the brain parenchyma region of the typical slice image in the template image group corresponding to the (0,0.063] group in (60,70] as the template image corresponding to the three-dimensional brain CT image.

[0189] Based on C1-C3, it can be seen that according to the area ratio of the ventricular area to the brain parenchyma area in the typical slice image, the template image corresponding to the three-dimensional brain CT image with the highest matching degree is screened from the template image group corresponding to the patient's age, which improves the brain parenchymal anatomical similarity between the template image corresponding to the three-dimensional brain CT image and the three-dimensional brain CT image, thereby achieving the purpose of reducing the difficulty of registration in the subsequent ASPECTS process and improving the registration accuracy.

[0190] Based on the contents of S701-S706, it can be known that the embodiment of the present application provides a method for determining a template image of a brain CT image. Determine a candidate slice image from a three-dimensional brain CT image of a patient. Determine the brain parenchyma area and the ventricle area of ​​the candidate slice image. Calculate the area ratio of the ventricle area to the brain parenchyma area of ​​each candidate slice image. Determine the candidate slice image corresponding to the maximum value in the area ratio as a typical slice image. A template image group corresponding to the patient's age is provided according to the patient's age. Based on the acquired typical slice image, a template image that matches the area ratio of the ventricle area to the brain parenchyma area of ​​the typical slice image can be selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image. Based on the area ratio of the ventricle area to the brain parenchyma area of ​​the typical slice image, the template image selected from the template image group corresponding to the patient's age has a high degree of matching with the three-dimensional brain CT image, thereby reducing the difficulty of subsequent registration of the brain CT image and the template image.

[0191] It should be noted that the Dice coefficient can be used to quantitatively analyze the degree of overlap of the MCA blood supply area after the three-dimensional brain CT image and the corresponding template image are registered. It has been verified that the average Dice coefficient of the MCA blood supply area after the three-dimensional brain CT image and the corresponding template image are configured in the case of single template image registration is 0.89±0.12, and the template image obtained based on the patient's age and the area ratio of the ventricular area to the brain parenchyma area of ​​the typical slice image is registered with the three-dimensional brain CT image, and the average Dice coefficient is 0.94±0.11. It can be obtained that the overlapping area of ​​the MCA blood supply area obtained by the method provided in the embodiment of the present application is increased, and the mapping contours of each MCA blood supply area are more accurate, that is, the method for obtaining the template image corresponding to the brain CT image provided in the embodiment of the present application can reduce the difficulty of registration and improve the accuracy of ASPECTS.

[0192] In addition, the ventricular region segmentation model includes a first encoding branch, a second encoding branch, and a first decoding branch. Based on this, in a possible implementation, the present application embodiment provides a method of inputting a target candidate slice image, an adjacent slice image of the target candidate slice image, and a ventricular region segmentation annotation image of an adjacent slice image of the target candidate slice image into the ventricular region segmentation model in S703 to obtain a ventricular region segmentation prediction image of the target candidate slice image, including:

[0193] Inputting the target candidate slice image into the first encoding branch to obtain a sixth image feature of the target candidate slice image;

[0194] Inputting the adjacent slice images of the target candidate slice image and the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image into the second encoding branch, obtaining the seventh image feature of the adjacent slice images of the target candidate slice image and the eighth image feature of the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image;

[0195] The sixth image feature, the seventh image feature and the eighth image feature are fused to obtain a second image fusion feature;

[0196] The second image fusion feature is input into the first decoding branch to obtain a ventricular region segmentation prediction image of the target candidate slice image.

[0197] It can be understood that the above process of obtaining the ventricular region segmentation prediction image of the target candidate slice image can refer to the technical details of the training process of the ventricular region segmentation model. It is only necessary to replace the slice image to be trained with the target candidate slice image, and replace the adjacent slice images of the slice image to be trained and the ventricular region segmentation annotation images of the adjacent slice images of the target candidate slice image and the ventricular region segmentation annotation images of the adjacent slice images of the target candidate slice image. No further details will be given here.

[0198] Based on the training method of the ventricular region segmentation model provided by the above method embodiment, the embodiment of the present application also provides a training device for the ventricular region segmentation model. The training device for the ventricular region segmentation model will be described below in conjunction with the accompanying drawings.

[0199] See also Fig. 9 , which is a schematic diagram of the structure of a training device for a ventricular region segmentation model provided in an embodiment of the present application. The ventricular region segmentation model includes a first encoding branch, a second encoding branch, and a first decoding branch. Fig. 9 As shown, the training device of the ventricle region segmentation model includes:

[0200] A first input unit 901 is used to input a slice image to be trained into the first encoding branch to obtain a first image feature of the slice image to be trained, wherein the slice image to be trained is a slice image in a three-dimensional brain CT image;

[0201] The second input unit 902 is used to input the adjacent slice images of the slice image to be trained and the ventricle region segmentation annotation image of the adjacent slice images of the slice image to be trained into the second encoding branch, and obtain the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricle region segmentation annotation image of the adjacent slice images of the slice image to be trained;

[0202] A fusion unit 903, configured to fuse the first image feature, the second image feature and the third image feature to obtain a first image fusion feature;

[0203] A third input unit 904 is used to input the first image fusion feature into the first decoding branch to obtain a ventricle region segmentation prediction image of the slice image to be trained;

[0204] A first calculation unit 905 is used to calculate a first loss value according to the ventricle region segmentation prediction image of the slice image to be trained and the ventricle region segmentation annotation image of the slice image to be trained;

[0205] The execution unit 906 is used to train the ventricular region segmentation model by using the first loss value, and repeatedly input the candidate slice image to be trained into the first encoding branch and subsequent steps until a preset condition is met.

[0206] In a possible implementation manner, the device further includes:

[0207] A fourth input unit, used for inputting the ventricular region segmentation prediction image of the slice image to be trained into the shape reconstruction model to obtain a first reconstructed image;

[0208] A fifth input unit, used for inputting the segmented and annotated image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image;

[0209] A second calculation unit, configured to calculate a second loss value according to the first reconstructed image and the second reconstructed image;

[0210] The execution unit 906 is specifically used for:

[0211] The first loss value and the second loss value are used to train the ventricular region segmentation model.

[0212] In a possible implementation, the shape reconstruction model includes a third encoding branch and a second decoding branch;

[0213] The fourth input unit is specifically used for:

[0214] Inputting the ventricular region segmentation prediction image of the slice image to be trained into the third encoding branch to obtain a fourth image feature of the ventricular region segmentation prediction image of the slice image to be trained; inputting the fourth image feature into the second decoding branch to obtain a first reconstructed image;

[0215] The fifth input unit is specifically used for:

[0216] The ventricular region segmentation and annotation image of the slice image to be trained is input into the third encoding branch to obtain the fifth image feature of the ventricular region segmentation and annotation image of the slice image to be trained; the fifth image feature is input into the second decoding branch to obtain a second reconstructed image.

[0217] Based on the training method of the ventricular region segmentation model provided by the above method embodiment, the embodiment of the present application also provides a training device for the ventricular region segmentation model. The training device for the ventricular region segmentation model will be described below in conjunction with the accompanying drawings.

[0218] See also Fig.10 , which is a schematic diagram of the structure of a device for determining a template image of a brain CT image provided by an embodiment of the present application. Fig.10 As shown, the device for determining a template image of a brain CT image comprises:

[0219] A first determining unit 1001 is used to determine a candidate slice image from a three-dimensional brain CT image;

[0220] An extraction unit 1002 is used to extract the brain parenchyma region in the candidate slice image;

[0221] An acquisition unit 1003 is used to input a target candidate slice image, an adjacent slice image of the target candidate slice image, and a ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into a ventricular region segmentation model to acquire a ventricular region segmentation prediction image of the target candidate slice image; the ventricular region segmentation model is trained according to any of the above-mentioned training methods for the ventricular region segmentation model; and the target candidate slice images are each of the candidate slice images;

[0222] A second determining unit 1004 is configured to determine the ventricle region in the target candidate slice image according to the ventricle region segmentation prediction image of the target candidate slice image;

[0223] A calculation unit 1005 is used to calculate the area ratio of the ventricle region to the brain parenchyma region of each of the candidate slice images, and determine the candidate slice image corresponding to the maximum value of the area ratio as the typical slice image;

[0224] The selection unit 1006 is used to select a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0225] In a possible implementation manner, the first determining unit includes:

[0226] a processing subunit, configured to perform binarization processing on the three-dimensional brain CT image according to a CT threshold value to obtain a brain region, and determine a slice image having the largest area of ​​the brain region among slice images of the three-dimensional brain CT image as a central slice image;

[0227] The first determining subunit is configured to determine a slice image whose slice index value is within a preset range of the slice index value of the central slice image as a candidate slice image.

[0228] In a possible implementation, the ventricle region segmentation model includes a first encoding branch, a second encoding branch, and a first decoding branch, and the acquisition unit 1003 includes:

[0229] A first input subunit, configured to input the target candidate slice image into the first encoding branch to obtain a sixth image feature of the target candidate slice image;

[0230] A second input subunit is used to input the adjacent slice images of the target candidate slice image and the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image into the second encoding branch, and obtain the seventh image feature of the adjacent slice images of the target candidate slice image and the eighth image feature of the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image;

[0231] a fusion subunit, configured to fuse the sixth image feature, the seventh image feature and the eighth image feature to obtain a second image fusion feature;

[0232] The third input subunit is used to input the second image fusion feature into the first decoding branch to obtain the ventricular region segmentation prediction image of the target candidate slice image.

[0233] In a possible implementation, the selection unit 1006 includes:

[0234] An acquisition subunit is used to obtain a segmentation threshold interval of the area ratio of the ventricular region to the brain parenchyma region corresponding to the patient's age;

[0235] A second determination subunit is used to determine a segmentation threshold interval to which the area ratio of the ventricle region to the brain parenchyma region of the typical slice image belongs;

[0236] The selection subunit is used to select the template image corresponding to the matching segmentation threshold interval from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

[0237] In addition, an embodiment of the present application also provides a training device for a ventricular region segmentation model, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the training method for the ventricular region segmentation model as described in any one of the above embodiments is implemented.

[0238] In addition, an embodiment of the present application also provides a device for determining a template image of a brain CT image, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for determining a template image of a brain CT image as described in any one of the above embodiments is implemented.

[0239] In addition, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes a training method for a ventricular region segmentation model as described in any one of the above embodiments, or executes a method for determining a template image of a brain CT image as described in any one of the above embodiments.

[0240] The embodiments of the present application provide a training device for a ventricular region segmentation model, a device and equipment for determining a template image of a brain CT image. Determine a candidate slice image from a patient's three-dimensional brain CT image. Determine each image in the candidate slice image as a target candidate slice image. Input the target candidate slice image, the adjacent slice image of the target candidate slice image, and the ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into the ventricular region segmentation model to obtain the ventricular region segmentation prediction image of the target candidate slice image. Furthermore, the ventricular region in the target candidate slice image can be determined based on the ventricular region segmentation prediction image of the target candidate slice image. In addition, the brain parenchyma region in the candidate slice image is extracted. After determining the ventricular region and the brain parenchyma region in the target candidate slice image, the area ratio of the ventricular region to the brain parenchyma region of each candidate slice image is calculated. The candidate slice image corresponding to the maximum value in the area ratio is determined as a typical slice image. In the embodiments of the present application, a template image group corresponding to the patient's age is provided according to the patient's age. Based on the typical slice images obtained, a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image can be selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image. Due to different patient ages, the corresponding template images are different. The ventricle region in the typical slice image is relatively complete and clear. The area ratio of the ventricle region to the brain parenchyma region of the typical slice image is different, and the corresponding template images are different. According to the area ratio of the ventricle region to the brain parenchyma region of the typical slice image, the template image selected from the template image group corresponding to the patient's age has a high degree of matching with the three-dimensional brain CT image, thereby reducing the difficulty of subsequent registration of the brain CT image and the template image.

[0241] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0242] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0243] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0244] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

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

Claims

1. A training method for a ventricular region segmentation model, It is characterized in that The ventricle region segmentation model includes a first encoding branch, a second encoding branch and a first decoding branch, and the method includes: Inputting a slice image to be trained into the first encoding branch to obtain a first image feature of the slice image to be trained, wherein the slice image to be trained is a slice image in a three-dimensional brain CT image; Inputting the adjacent slice images of the slice image to be trained and the ventricle region segmentation and annotation images of the adjacent slice images of the slice image to be trained into the second encoding branch, acquiring the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricle region segmentation and annotation images of the adjacent slice images of the slice image to be trained; fusing the first image feature, the second image feature and the third image feature to obtain a first image fusion feature; Inputting the first image fusion feature into the first decoding branch to obtain a ventricle region segmentation prediction image of the slice image to be trained; Calculating a first loss value according to the ventricular region segmentation prediction image of the slice image to be trained and the ventricular region segmentation annotation image of the slice image to be trained; Inputting the ventricular region segmentation prediction image of the slice image to be trained into a shape reconstruction model to obtain a first reconstructed image; Inputting the segmented and annotated image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image; Calculating a second loss value according to the first reconstructed image and the second reconstructed image; The first loss value and the second loss value are used to train the ventricular area segmentation model, and the steps of inputting the slice image to be trained into the first encoding branch, obtaining the first image feature of the slice image to be trained, and training the ventricular area segmentation model using the first loss value and the second loss value are repeatedly executed until the preset conditions are met.

2. The method according to claim 1, It is characterized in that The shape reconstruction model includes a third encoding branch and a second decoding branch; The step of inputting the ventricular region segmentation prediction image of the slice image to be trained into a shape reconstruction model to obtain a first reconstructed image comprises: Inputting the ventricular region segmentation prediction image of the slice image to be trained into the third encoding branch to obtain a fourth image feature of the ventricular region segmentation prediction image of the slice image to be trained; inputting the fourth image feature into the second decoding branch to obtain a first reconstructed image; The step of inputting the segmented and labeled image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image comprises: The ventricular region segmentation and annotation image of the slice image to be trained is input into the third encoding branch to obtain the fifth image feature of the ventricular region segmentation and annotation image of the slice image to be trained; the fifth image feature is input into the second decoding branch to obtain a second reconstructed image.

3. A method for determining a template image of a brain CT image, It is characterized in that The method comprises: Determining candidate slice images from a three-dimensional brain CT image; Extracting a brain parenchyma region in the candidate slice image; Inputting a target candidate slice image, an adjacent slice image of the target candidate slice image, and a ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into a ventricular region segmentation model to obtain a ventricular region segmentation prediction image of the target candidate slice image; the ventricular region segmentation model is trained according to the ventricular region segmentation model training method according to any one of claims 1-2; the target candidate slice images are each of the candidate slice images; Determine the ventricle region in the target candidate slice image according to the ventricle region segmentation prediction image of the target candidate slice image; Calculating the area ratio of the ventricle region to the brain parenchyma region of each of the candidate slice images, and determining the candidate slice image corresponding to the maximum value of the area ratio as the typical slice image; A template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image is selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

4. The method according to claim 3, It is characterized in that The step of determining a candidate slice image from a three-dimensional brain CT image comprises: Binarizing the three-dimensional brain CT image according to a CT threshold to obtain a brain region, and determining a slice image with the largest area of ​​the brain region among slice images of the three-dimensional brain CT image as a central slice image; A slice image whose slice index value is within a preset range of the slice index value of the central slice image is determined as a candidate slice image.

5. The method according to claim 3, It is characterized in that The ventricular region segmentation model comprises a first encoding branch, a second encoding branch and a first decoding branch, and the step of inputting a target candidate slice image, an adjacent slice image of the target candidate slice image and an annotated image of the ventricular region segmentation of the adjacent slice image of the target candidate slice image into the ventricular region segmentation model to obtain a predicted image of the ventricular region segmentation of the target candidate slice image comprises: inputting the target candidate slice image into the first encoding branch to obtain a sixth image feature of the target candidate slice image; Inputting the adjacent slice images of the target candidate slice image and the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image into the second encoding branch, acquiring the seventh image feature of the adjacent slice images of the target candidate slice image and the eighth image feature of the ventricle region segmentation annotation image of the adjacent slice images of the target candidate slice image; fusing the sixth image feature, the seventh image feature and the eighth image feature to obtain a second image fusion feature; The second image fusion feature is input into the first decoding branch to obtain a ventricular region segmentation prediction image of the target candidate slice image.

6. The method according to claim 3, It is characterized in that The step of selecting a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image includes: Obtain the segmentation threshold interval of the area ratio of the ventricular area to the brain parenchyma area corresponding to the patient's age; Determine a segmentation threshold interval to which the area ratio of the ventricle region to the brain parenchyma region of the typical slice image belongs; A template image corresponding to the matching segmentation threshold interval is selected from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

7. A training device for a ventricular region segmentation model, It is characterized in that The ventricle region segmentation model includes a first encoding branch, a second encoding branch and a first decoding branch, and the device includes: A first input unit is used to input a slice image to be trained into the first encoding branch to obtain a first image feature of the slice image to be trained, wherein the slice image to be trained is a slice image in a three-dimensional brain CT image; A second input unit is used to input the adjacent slice images of the slice image to be trained and the ventricle region segmentation and annotation image of the adjacent slice images of the slice image to be trained into the second encoding branch, and obtain the second image features of the adjacent slice images of the slice image to be trained and the third image features of the ventricle region segmentation and annotation image of the adjacent slice images of the slice image to be trained; a fusion unit, configured to fuse the first image feature, the second image feature and the third image feature to obtain a first image fusion feature; A third input unit is used to input the first image fusion feature into the first decoding branch to obtain a ventricle region segmentation prediction image of the slice image to be trained; A first calculation unit, configured to calculate a first loss value according to the ventricular region segmentation prediction image of the slice image to be trained and the ventricular region segmentation annotation image of the slice image to be trained; A fourth input unit, used for inputting the ventricular region segmentation prediction image of the slice image to be trained into the shape reconstruction model to obtain a first reconstructed image; A fifth input unit, used for inputting the segmented and annotated image of the ventricle region of the slice image to be trained into the shape reconstruction model to obtain a second reconstructed image; A second calculation unit, configured to calculate a second loss value according to the first reconstructed image and the second reconstructed image; An execution unit is used to train the ventricular region segmentation model using the first loss value and the second loss value, and repeatedly execute the steps of inputting the slice image to be trained into the first encoding branch, obtaining the first image feature of the slice image to be trained, to training the ventricular region segmentation model using the first loss value and the second loss value, until a preset condition is met.

8. A device for determining a template image of a brain CT image, It is characterized in that The device comprises: A first determining unit, configured to determine a candidate slice image from a three-dimensional brain CT image; An extraction unit, used for extracting a brain parenchyma region in the candidate slice image; an acquisition unit, used for inputting a target candidate slice image, an adjacent slice image of the target candidate slice image, and a ventricular region segmentation annotation image of the adjacent slice image of the target candidate slice image into a ventricular region segmentation model, and acquiring a ventricular region segmentation prediction image of the target candidate slice image; the ventricular region segmentation model is trained according to the training method of the ventricular region segmentation model according to any one of claims 1-2; the target candidate slice images are each of the candidate slice images; A second determining unit, configured to determine the ventricle region in the target candidate slice image according to the ventricle region segmentation prediction image of the target candidate slice image; a calculation unit, configured to calculate the area ratio of the ventricle region to the brain parenchyma region of each of the candidate slice images, and determine the candidate slice image corresponding to the maximum value of the area ratio as the typical slice image; The selection unit is used to select a template image that matches the area ratio of the ventricle region to the brain parenchyma region of the typical slice image from the template image group corresponding to the patient's age as the template image corresponding to the three-dimensional brain CT image.

9. A training device for a ventricular region segmentation model, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the training method for the ventricular region segmentation model as described in any one of claims 1 to 2 is implemented.

10. A device for determining a template image of a brain CT image, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for determining a template image of a brain CT image as described in any one of claims 3 to 6 is implemented.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, which, when executed on a terminal device, cause the terminal device to execute the method for training a ventricular region segmentation model as described in any one of claims 1 to 2, or to execute the method for determining a template image of a brain CT image as described in any one of claims 3 to 6.