Brain neuron segmentation method based on generative adversarial network

By combining generative adversarial networks with MSEG-iCNN, the problem of insufficient segmentation accuracy of dark and light neurons in whole-brain neuron segmentation was solved, achieving high-precision segmentation of whole-brain neurons, especially improving the segmentation performance of light neurons.

CN116310312BActive Publication Date: 2025-11-21XIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310060716.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-19
Publication Date
2025-11-21
Estimated Expiration
2043-01-19

AI Technical Summary

Technical Problem

Existing whole-brain neuron segmentation methods cannot simultaneously consider the segmentation performance of dark and light neurons, resulting in limited segmentation accuracy.

Method used

By combining a Generative Adversarial Network (GAN) with the MSEG-iCNN network, the segmentation results are optimized by constructing a generator and discriminator of the GAN and utilizing multi-layer convolutional operations and loss functions. This achieves the goal of maintaining the segmentation performance of dark neurons while improving the segmentation accuracy of light neurons.

Benefits of technology

While maintaining the segmentation performance of dark neurons, the segmentation accuracy of light neurons was significantly improved. Related experimental results show that the segmentation performance is superior to other methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310312B_ABST
    Figure CN116310312B_ABST
Patent Text Reader

Abstract

The application discloses a brain neuron segmentation method based on a generative adversarial network. First, a brain neuron segmentation database is established, data in the brain neuron segmentation database is randomly divided into a training set and a test set, neuron pixels are marked, and corresponding training set true value graphs and test set true value graphs are constructed. The training set and the test set are respectively preprocessed to obtain normalized training set images and test set images. A generative adversarial network is constructed, then the test set images are sent to an input end of a brain neuron segmentation model based on the trained generative adversarial network, and a segmentation result obtained by a generator is a predicted neuron probability graph in the test set. Pixels with a probability greater than 0 in the neuron probability graph are extracted, and neuron segmentation results are obtained. The application solves the problem of limited whole brain neuron segmentation precision in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of computer science and biomedical technology, and particularly relates to a brain neuron segmentation method based on a generative adversarial network. BACKGROUND

[0002] Neuron semantic segmentation is a key link to realize accurate instance segmentation of neurons. However, the brain structure is complex, the intra-class difference of neurons is large, the inter-class difference is small, and the neurons are unevenly distributed in different anatomical regions, which makes the automatic segmentation of whole brain neurons very challenging. The existing methods can effectively segment the dark neurons in the whole brain neurons, but cannot balance the segmentation performance of light neurons. Therefore, the brain neuron segmentation method based on the generative adversarial network can well solve the above problems, while ensuring the segmentation performance of dark neurons and effectively improving the segmentation accuracy of light neurons. SUMMARY

[0003] The purpose of the application is to provide a brain neuron segmentation method based on a generative adversarial network, which solves the problem of limited whole brain neuron segmentation accuracy in the prior art.

[0004] The technical scheme adopted by the application is that the brain neuron segmentation method based on the generative adversarial network is implemented according to the following steps:

[0005] Step 1, establishing a brain neuron segmentation database, randomly dividing the data in the brain neuron segmentation database into a training set and a test set, marking the neuron pixels, and constructing the corresponding training set ground truth map and test set ground truth map;

[0006] Step 2, preprocessing the training set and test set established in step 1 respectively to obtain normalized training set images and test set images;

[0007] Step 3, constructing a generative adversarial network, wherein the generator of the generative adversarial network adopts an MSEG-iCNN network, the discriminator of the generative adversarial network adopts a multi-layer convolution operation, the training set images of step 2 are used as the input of the generator of the generative adversarial network, the segmentation results generated by the generator and the training set ground truth map of step 1 are multiplied with the training set images of step 2 respectively as the two inputs of the discriminator of the generative adversarial network, the multi-scale feature difference of the two inputs, and the Dice loss, cross-entropy loss and error loss of the segmentation results generated by the generator and the training set ground truth map of step 1 are calculated to distinguish the segmentation results obtained by the generator and the training set ground truth map of step 1, the generator parameters are fixed during the training process, the discriminator parameters are updated, then the discriminator parameters are fixed, the generator parameters are updated, and the trained brain neuron segmentation model based on the generative adversarial network is obtained after Q times of training;

[0008] Step 4, the test set images of step 2 are sent to the input end of the brain neuron segmentation model based on the generative adversarial network trained in step 3, and the segmentation result obtained by the generator is the predicted probability map of neurons in the test set;

[0009] Step 5, the pixels with a probability greater than 0 in the neuron probability map of step 4 are extracted, that is, the obtained neuron segmentation result.

[0010] The application also has the characteristics that,

[0011] Step 1 is implemented according to the following steps:

[0012] 100 microscopic images with a size of 512*512 pixels in different anatomical regions are cut from 2 microscopic images of coronal sections of monkey brains to constitute a brain neuron segmentation database, N images are randomly selected from the 100 images as a training set, and the remaining 100-N images are used as a test set, and neuron pixels are manually labeled in the above 100 images to obtain a true value map of the brain neuron segmentation database.

[0013] Step 2 is implemented according to the following steps:

[0014] The training set and the test set established in step 1 are preprocessed to obtain a normalized image I:

[0015] I(x, y) = (0.299 * I R (x, y) + 0.587 * I G (x, y) + 0.114 * I B (x, y)) / 255

[0016] In the formula, I(x, y) is the normalized value of pixel (x, y) in image I, ranging from 0 to 1, and the database image of step 1 is a color image composed of R, G and B components, I R (x, y) is the gray level of pixel (x, y) in the R component, I G (x, y) is the gray level of pixel (x, y) in the G component, and I B (x, y) is the gray level of pixel (x, y) in the B component.

[0017] Step 3 is implemented according to the following steps:

[0018] Step 3.1, using MSEG-iCNN network as the generator of the generative adversarial network;

[0019] Step 3.2, constructing the discriminator of the generative adversarial network;

[0020] Step 3.3, calculating the loss function of the generative adversarial network;

[0021] Step 3.4, the learning rate of the generator and the discriminator of the generative adversarial network is set to 0.00001, and Adam is selected as the optimizer, the segmentation result generated by the generator of the generative adversarial network constructed in step 3.1 and the true value map of the training set in step 1 are multiplied with the image of the training set in step 2 respectively as the two inputs of the discriminator of the generative adversarial network in step 3.2, according to the loss function calculated in step 3.3, the loss function is minimized by using back propagation and stochastic gradient descent method, in the training process, the parameters of the generator are fixed first, the parameters of the discriminator are updated, then the parameters of the discriminator are fixed, the parameters of the generator are updated, and the model of the trained generative adversarial network is obtained after 5000 times of training.

[0022] Step 3.2 is implemented according to the following steps:

[0023] Step 3.2.1, the segmentation result I seg generated by the generator of the generative adversarial network constructed in step 3.1 and the true value map I gt of the training set in step 1 are multiplied with the image I of the training set obtained in step 2 respectively, to obtain I segm and I gtm , as the two input images of the discriminator of the generative adversarial network;

[0024] Step 3.2.2, 64 convolution kernels with the size of 7x7 pixels, the step of 2 pixels and the padding size of 3 pixels are used to perform convolution operation and activation operation on the two input images I segm and I gtm of the generator respectively, to obtain two feature maps, denoted as I and I m and n represent the length and width of the feature map, and d represents the dimension of the feature map, specifically, the two feature maps are I and I

[0025] Step 3.2.3, 128 convolution kernels with the size of 5x5 pixels, the step of 2 pixels and the padding size of 2 pixels are used to sequentially perform convolution operation, batch normalization and activation operation on the two feature maps I and I obtained in step 3.2.2, to obtain feature maps I and I

[0026] Step 3.2.4, 256 convolution kernels with the size of 4x4 pixels, the step of 2 pixels and the padding size of 1 pixel are used to sequentially perform convolution operation, batch normalization and activation operation on the two feature maps I and I obtained in step 3.2.3, to obtain feature maps I and I

[0027] Step 3.2.5, two feature maps obtained in step 3.2.4 are convolved and Convolution, batch normalization and activation operations are sequentially performed using 512 convolution kernels with a size of 4x4 pixels, a step of 2 pixels and a padding size of 1 pixel, respectively, to obtain feature maps and

[0028] Step 3.2.6, two feature maps obtained in step 3.2.5 are convolved and Convolution, batch normalization and activation operations are sequentially performed using 512 convolution kernels with a size of 4x4 pixels, a step of 2 pixels and a padding size of 1 pixel, respectively, to obtain feature maps and

[0029] Step 3.2.7, two feature maps obtained in step 3.2.6 are convolved and Convolution, batch normalization and activation operations are sequentially performed using 512 convolution kernels with a size of 3x3 pixels, a step of 2 pixels and a padding size of 1 pixel, respectively, to obtain feature maps and

[0030] Step 3.3 is implemented according to the following steps:

[0031] Step 3.3.1, calculate the Dice loss function

[0032]

[0033] In the formula, is the loss function, i corresponds to the number of layers of the encoding module in the MSEG-iCNN network, i={1, 2, 3, 4}, i=1, y i,n is the true value map of the training set, i>1 y i,n is the true value map of the training set after downsampling processing, p seg,i,n , p FN,i,n , p FP,i,n are the probabilities predicted by the three branches of the MSEG-iCNN network, respectively, the three branches are the segmentation branch, the false negative error branch and the false positive error branch, N is the number of pixels of the image,

[0034] Step 3.3.2, calculate the cross-entropy loss function

[0035]

[0036] In the formula, a is a hyperparameter, set to 0.01;

[0037] Step 3.3.3, calculating error loss function

[0038]

[0039] In the formula, β and γ are hyperparameters, which are respectively set to 1;

[0040] Step 3.3.4, calculating multi-scale loss function

[0041]

[0042]

[0043] In the formula, θ S , θ C respectively represent parameters of the generator and the discriminator, x n is the original input image, i.e. the training set image obtained in step 2, y n is the corresponding true value image, l MAE represents the mean absolute error, represents that the input image is multiplied by the result generated by the generator, represents that the input image is multiplied by the corresponding true value image, f C (x) represents the feature extracted from the image x by the discriminator, L is the number of layers of the discriminator, is the feature of the image x at the lth layer of the discriminator;

[0044] Step 3.3.5, calculating the loss function of the brain neuron segmentation model based on the generative adversarial network

[0045] The brain neuron segmentation method based on the generative adversarial network combines the MSEG-iCNN network and the GAN network, is a general algorithm for unified segmentation of macaque brain neurons, can effectively improve the segmentation performance of light-colored neurons while ensuring the segmentation performance of dark-colored neurons, and relevant experimental results and data analysis prove the generality and effectiveness of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 is a flowchart of the brain neuron segmentation method based on the generative adversarial network of the present application;

[0047] Figure 2 is a model based on the generative adversarial network constructed by the present application for segmenting brain neurons;

[0048] Fig. 3(a) is an experimental image used in the brain neuron segmentation method based on the generative adversarial network of the application;

[0049] Fig. 3(b) is a true value map of the experimental image used in the brain neuron segmentation method based on the generative adversarial network of the application;

[0050] Figure 4 is a comparison chart of neuron segmentation results obtained by applying U-Net, UNet++, MSEG-iCNN, GAN, and the method of the application. DETAILED DESCRIPTION

[0051] The application will be described in detail below in combination with the drawings and specific embodiments.

[0052] The brain neuron segmentation method based on the generative adversarial network of the application has a flowchart as shown in Figure 1 The method is implemented according to the following steps:

[0053] Step 1, establish a brain neuron segmentation database, randomly divide the data in the brain neuron segmentation database into a training set and a test set, mark the neuron pixels, and construct the corresponding training set true value map and test set true value map;

[0054] In combination with Fig. 3(a) and Fig. 3(b), step 1 is implemented according to the following steps:

[0055] 100 microscopic images with a size of 512x512 pixels in different anatomical regions are cut from 2 microscopic images of monkey brain coronal sections to constitute the brain neuron segmentation database, N images are randomly selected from the 100 images as the training set, the remaining 100-N images are used as the test set, and the neuron pixels are manually marked in the above 100 images to obtain the true value map of the brain neuron segmentation database.

[0056] Step 2, pre-process the training set and test set established in step 1 respectively to obtain normalized training set images and test set images;

[0057] Step 2 is implemented according to the following steps:

[0058] The training set and test set established in step 1 are pre-processed to obtain normalized images I:

[0059] I(x, y) = (0.299 * I R (x, y) + 0.587 * I G (x, y) + 0.114 * I B (x, y)) / 255

[0060] wherein I(x, y) is the normalized value of pixel (x, y) in image I, ranging from 0 to 1, the database image of step 1 is a color image composed of R, G, B components, I R (x, y) is the gray level of pixel (x, y) in the R component, I G (x, y) is the gray level of pixel (x, y) in the G component, I B (x, y) is the gray level of pixel (x, y) in the B component.

[0061] Step 3, construct a generative adversarial network, wherein the generator of the generative adversarial network adopts the MSEG-iCNN network (document [1]), the discriminator of the generative adversarial network adopts a multi-layer convolution operation, uses the training set image of step 2 as the input of the generator of the generative adversarial network, multiplies the segmentation result generated by the generator and the true value image of step 1 training set respectively with the training set image of step 2, as the two inputs of the discriminator of the generative adversarial network, and through the calculation of the multi-scale feature difference of the two inputs, the Dice loss, the cross-entropy loss and the error loss of the segmentation result generated by the generator and the true value image of step 1 training set, the segmentation result obtained by the generator is distinguished from the true value image of step 1 training set, and the parameters of the generator are fixed in the training process, and the parameters of the discriminator are updated, then the parameters of the discriminator are fixed, and the parameters of the generator are updated, and the trained brain neuron segmentation model based on the generative adversarial network is obtained after Q times of training, as shown in Figure 2 .

[0062] Step 3 is implemented according to the following steps:

[0063] Step 3.1, using the MSEG-iCNN network (document [1]) as the generator of the generative adversarial network;

[0064] Step 3.2, construct the discriminator of the generative adversarial network;

[0065] Step 3.3, calculate the loss function of the generative adversarial network;

[0066] Step 3.4, the learning rate of the generator and the discriminator of the generative adversarial network is set to 0.00001, and Adam is selected as the optimizer, the segmentation result generated by the generator of the generative adversarial network constructed in step 3.1 and the true value image of step 1 training set are multiplied with the training set image of step 2 respectively, as the two inputs of the discriminator of the generative adversarial network of step 3.2, according to the loss function calculated in step 3.3, the loss function is minimized by using back propagation and stochastic gradient descent method, the parameters of the generator are fixed in the training process, and the parameters of the discriminator are updated, then the parameters of the discriminator are fixed, and the parameters of the generator are updated, and the trained generative adversarial network model is obtained after 5000 times of training.

[0067] Step 3.2 is implemented according to the following steps:

[0068] Step 3.2.1, the segmentation result I generated by the generator of the generative adversarial network constructed in step 3.1 seg and the ground truth map I of the training set in step 1 gt are respectively multiplied with the training set image I obtained in step 2 to obtain I segm and I gtm as the two input images of the discriminator of the generative adversarial network;

[0069] Step 3.2.2, the two input images I segm and I gtm of the generator are respectively subjected to convolution operation and activation operation using 64 convolution kernels with a size of 7x7 pixels, a step of 2 pixels and a padding size of 3 pixels to obtain two feature maps, denoted as and where m and n represent the length and width of the feature map, and d represents the dimension of the feature map. Specifically, the two feature maps are and

[0070] Step 3.2.3, the two feature maps and obtained in step 3.2.2 are sequentially subjected to convolution operation, batch normalization and activation operation using 128 convolution kernels with a size of 5x5 pixels, a step of 2 pixels and a padding size of 2 pixels to obtain feature maps and

[0071] Step 3.2.4, the two feature maps and obtained in step 3.2.3 are sequentially subjected to convolution operation, batch normalization and activation operation using 256 convolution kernels with a size of 4x4 pixels, a step of 2 pixels and a padding size of 1 pixel to obtain feature maps and

[0072] Step 3.2.5, the two feature maps and obtained in step 3.2.4 are sequentially subjected to convolution operation, batch normalization and activation operation using 512 convolution kernels with a size of 4x4 pixels, a step of 2 pixels and a padding size of 1 pixel to obtain feature maps and

[0073] Step 3.2.6, the two feature maps and The convolution operation, batch normalization and activation operation are sequentially performed using 512 convolution kernels with a size of 4*4 pixels, a step of 2 pixels and a padding size of 1 pixel, respectively, to obtain feature maps and

[0074] Step 3.2.7, two feature maps obtained in step 3.2.6 are processed and The convolution operation, batch normalization and activation operation are sequentially performed using 512 convolution kernels with a size of 3*3 pixels, a step of 2 pixels and a padding size of 1 pixel, respectively, to obtain feature maps and

[0075] Step 3.3 is implemented according to the following steps:

[0076] Step 3.3.1, calculating the Dice loss function

[0077]

[0078] In the formula, is the loss function, i corresponds to the number of layers of the encoding module in the MSEG-iCNN network, i={1, 2, 3, 4}, i=1, y i,n is the true value map of the training set, i>1 y i,n is the true value map of the training set after downsampling processing, p seg,i,n , p FN,i,n , p FP,i,n are the probabilities predicted by the three branches of the MSEG-iCNN network, respectively, the three branches are the segmentation branch, the false negative error branch and the false positive error branch, N is the number of pixels of the image,

[0079] Step 3.3.2, calculating the cross-entropy loss function

[0080]

[0081] In the formula, α is a hyperparameter, which is set to 0.01 in the experiment;

[0082] Step 3.3.3, calculating the error loss function

[0083]

[0084] In the formula, β and γ are hyperparameters, which are set to 1 respectively in the experiment;

[0085] Step 3.3.4, calculating the multi-scale loss function

[0086]

[0087]

[0088] where, θ S , θ C represent the parameters of the generator and the discriminator respectively, x n is the original input image, i.e., the training set image obtained in step 2, y n is the corresponding true value map, l MAE represents the mean absolute error, represents the multiplication of the input image and the result generated by the generator (the segmentation result I seg generated by the generator of the generative adversarial network constructed in step 3.1), represents the multiplication of the input image and the corresponding true value map, f C (x) represents the features extracted by the discriminator from the image x, L is the number of layers of the discriminator, is the feature of the image x at the lth layer of the discriminator;

[0089] Step 3.3.5, calculating the loss function of the brain neuron segmentation model based on the generative adversarial network

[0090] Step 4, the test set image of step 2 is input into the input end of the brain neuron segmentation model based on the generative adversarial network trained in step 3, and the segmentation result obtained by the generator is the predicted probability map of the neurons in the test set.

[0091] Step 5, extracting the pixels with a probability greater than 0 in the probability map of the neurons in step 4, i.e., obtaining the neuron segmentation result.

[0092] The brain neuron segmentation method based on the generative adversarial network, the MSEG-iCNN[1] network is used as the generator of the generative adversarial network to generate the neuron segmentation result, and the generated segmentation result and the expert labeled true value map are multiplied by the original image respectively as two inputs of the discriminator of the generative adversarial network, the multi-scale feature difference of the two inputs is calculated through multi-layer convolution operation, which is used to distinguish the segmentation result obtained by the generator and the expert labeled true value map, so that the segmentation result generated by the generator is constantly approximated to the expert labeled true value map. The present application can effectively segment the whole brain neurons, and lay a foundation for further neuron instance segmentation, morphological analysis and the like.

[0093] The database used in the present application is from the cooperation unit French Atomic and Alternative Energy Commission, and there are 100 images.

[0094] Figure 2 The present application constructs a brain neuron segmentation method based on a generative adversarial network.

[0095] In combination Figure 4 , the brain neuron segmentation method based on the generative adversarial network constructed by the present application verifies the accuracy of the segmentation result of the test set image. The test set image of step 2 is sent into the generator of the generative adversarial network, and the neuron automatic segmentation result is obtained by using the trained brain neuron segmentation model based on the generative adversarial network. According to the true value map marked by the expert, the performance of the present application is evaluated by using Recall (R), Precision (P) and F value (formula 1).

[0096] R = TP / (TP + FN); P = TP / (TP + FP); F = 2R x P / (R + P) (1)

[0097] In the formula, TP is the number of pixels at the same position in the prediction result and the true value map, FN is the number of pixels at the same position, the prediction result is non-neuron and the true value map is neuron, and FP is the number of pixels at the same position, the prediction result is neuron and the true value map is non-neuron. The greater the F value, the better the performance of the automatic segmentation method, such as Figure 4 As shown in Table 1, the average F value obtained by applying the present application to the test set is greater than the result obtained by the reference method, and the F standard deviation value is less than the result obtained by the reference method.

[0098] Table 1. Average F value and standard deviation obtained by applying U-Net, UNet++, MSEG-iCNN, GAN and the method of the present application to the test set

[0099]

[0100] As can be seen from Table 1, the average F value obtained by applying the present application to segment neurons is the largest, and compared with U-Net, UNet++, MSEG-iCN and GAN, the correct segmentation rate of whole brain neurons is increased by 2.0%, 1.6%, 0.5% and 15.8%, respectively, especially for light-colored neurons, the correct segmentation rate is increased by 16.1%, 11.5%, 4.5% and 150.2%, respectively, and the accuracy of dark-colored neuron segmentation is maintained. In addition, the standard deviation of the F value obtained by applying the present application to segment neurons is also the smallest, which proves that for different types of neuron tissue microscopic images in the data set with uneven distribution and limited quantity, the present application is more robust than the other three reference methods.

[0101] Reference method:

[0102] [1] Z. You et al., “Multiscale segmentation-and error-guided iterative convolutional neural network for cerebral neuron segmentation in microscopic images,” Microsc. Res. Tech., vol. 85, no. 11, pp. 3541-3552, 2022, doi: 10.1002 / jemt.24206.

[0103] [2] T. Falk et al., “U-Net: deep learning for cell counting, detection, and morphometry,” Nat. Methods, vol. 16, no. 1, pp. 67-70, Jan. 2019, doi: 10.1038 / s41592-018-0261-2.

[0104] [3] J. Long, E. Shelhamer, and T. Darrell, “Fully convolutional networks for semantic segmentation,” in 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2015, pp. 3431-3440. doi: 10.1109 / CVPR.2015.7298965.

[0105] [4] P. Luc, C. Couprie, S. Chintala, and J. Verbeek, “Semantic Segmentation using Adversarial Networks,” presented at the NIPS Workshop on Adversarial Training, Barcelona, Spain, Dec. 2016.

Claims

1. A method for brain neuron segmentation based on a generative adversarial network, characterized in that, Specifically, the following steps are implemented: Step 1, a brain neuron segmentation database is established, the data in the brain neuron segmentation database is randomly divided into a training set and a test set, and the neuron pixels are labeled to construct the corresponding training set and test set true value maps; Step 2, the training set and test set established in step 1 are preprocessed respectively to obtain normalized training set images and test set images; Step 3, a generative adversarial network is constructed, wherein the generator of the generative adversarial network adopts an MSEG-iCNN network, the discriminator of the generative adversarial network adopts a multi-layer convolution operation, the training set images of step 2 are used as the input of the generator of the generative adversarial network, the segmentation results generated by the generator and the training set true value map of step 1 are multiplied with the training set images of step 2 respectively as the two inputs of the discriminator of the generative adversarial network, the multi-scale feature difference of the two inputs, and the Dice loss, cross-entropy loss and error loss of the segmentation results generated by the generator and the training set true value map of step 1 are calculated to distinguish the segmentation results obtained by the generator and the training set true value map of step 1, the generator parameters are fixed during the training process, the discriminator parameters are updated, then the discriminator parameters are fixed, the generator parameters are updated, and the trained brain neuron segmentation model based on the generative adversarial network is obtained after Q times of training; The step 3 is implemented according to the following steps: Step 3.1, the MSEG-iCNN network is used as the generator of the generative adversarial network; Step 3.2, the discriminator of the generative adversarial network is constructed; The step 3.2 is implemented according to the following steps: Step 3.2.1, the segmentation result generated by the generator of the generative adversarial network constructed in step 3.1 I seg and the step 1 training set label truth map I gt respectively multiplied by the training set image obtained in step 2 I I segm and I gtm , as two input images of the generative adversarial network discriminator;​ Step 3.2.

2. Convolution operation on the two input images of the generator using 64 convolution kernels with a size of 7x7 pixels, a step of 2 pixels, and a padding size of 3 pixels I segm and I gtm respectively, to obtain two feature maps, denoted as and , where m and n represent the length and width of the feature map, and d represents the dimension of the feature map. Specifically, the two feature maps are and ; Step 3.2.3.

2. Perform convolution, batch normalization and activation operations on the two feature maps obtained in step 3.2.3.1 in sequence using 128 convolution kernels with a size of 5x5 pixels, a step of 2 pixels and a padding size of 2 pixels, respectively, to obtain feature maps and ; Step 3.2.3.

3. Perform convolution, batch normalization and activation operations on the two feature maps obtained in step 3.2.3.2 in sequence using 128 convolution kernels with a size of 5x5 pixels, a step of 2 pixels and a padding size of 2 pixels, respectively, to obtain feature maps and ; Step 3.2.4.2.4, performing convolution, batch normalization and activation operations on the two feature maps obtained in step 3.2.4.2.3 and respectively using 256 convolution kernels with a size of 4x4 pixels, a step of 2 pixels and a padding size of 1 pixel to sequentially perform convolution operations, batch normalization and activation operations to obtain a feature map and ; Step 3.2.5.2.5, two feature maps obtained in step 3.2.5.2.4 are respectively sequentially subjected to a convolution operation using 512 convolution kernels with a size of 4x4 pixels, a step of 2 pixels, and a padding size of 1 pixel, a batch normalization operation, and an activation operation to obtain feature maps and ; and and ; Step 3.2.

6. Two feature maps obtained in step 3.2.5 are respectively convolved using 512 convolution kernels with a size of 4x4 pixels, a step of 2 pixels, and a padding size of 1 pixel, and batch normalization and activation operations are sequentially performed to obtain feature maps and respectively and ; Step 3.2.

7. Two feature maps obtained in step 3.2.6 are convolved and respectively using 512 convolution kernels with size 3x3 pixels, stride 2 pixels, and padding size 1 pixel to sequentially perform convolution operation, batch normalization and activation operation to obtain feature maps and ; Step 3.3, the loss function of the generative adversarial network is calculated; The step 3.3 is implemented according to the following steps: Step 3.3.1, Computing the Dice loss function : In the formula, is a loss function, i corresponds to the number of layers of the encoding module in the MSEG-iCNN network, i ={1, 2, 3, 4}, i =1, is a true value map of the training set, i>1 is a true value map of the training set after down-sampling processing, are probabilities predicted by three branches of the MSEG-iCNN network respectively, the three branches are a segmentation branch, a false negative error branch and a false positive error branch, N is the number of pixels of the image, Step 3.3.2, computing the cross-entropy loss function : wherein is a hyperparameter, set to 0.01; Step 3.3.3, computing error loss function : In the formula, , are hyperparameters, respectively set to 1; Step 3.3.4, computing the multi-scale loss function : In the formula, respectively represent the parameters of the generator and the discriminator, is the original input image, that is, the training set image obtained in step 2, is the corresponding true value map, represents the mean absolute error, represents that the input image is multiplied by the result generated by the generator, represents that the input image is multiplied by the corresponding true value map, represents the features extracted by the discriminator from the image x , is the number of layers of the discriminator, is the image at the first layer of the discriminator; Step 3.3.5, calculating a loss function of the brain neuron segmentation model based on the generative adversarial network : ; Step 3.4, the learning rate of the generator and the discriminator of the generative adversarial network is set to 0.00001, Adam is selected as the optimizer, the segmentation results generated by the generator of the generative adversarial network constructed in step 3.1 and the training set true value map of step 1 are multiplied with the training set images of step 2 respectively as the two inputs of the discriminator of the generative adversarial network of step 3.2, the loss function calculated in step 3.3 is used to minimize the loss function by using the back propagation and stochastic gradient descent method, the generator parameters are fixed during the training process, the discriminator parameters are updated, then the discriminator parameters are fixed, the generator parameters are updated, and the trained model of the generative adversarial network is obtained after 5000 times of training; Step 4, the test set images of step 2 are input into the input end of the brain neuron segmentation model based on the generative adversarial network trained in step 3, and the segmentation results obtained by the generator are the predicted probability maps of the neurons in the test set; Step 5, the pixels with a probability greater than 0 in the neuron probability map of step 4 are extracted, and the neuron segmentation results are obtained. 2.The brain neuron segmentation method based on a generative adversarial network according to claim 1, wherein, The step 1 is implemented according to the following steps: 100 micrographs of different anatomical regions with size of 512*512 pixels are cut from 2 micrographs of coronal sections of monkey brain to constitute a brain neuron segmentation database. N images are randomly selected from the 100 images as a training set, and the remaining 100-N images are used as a test set. The neuron pixels in the above 100 images are manually labeled to obtain the ground truth of the brain neuron segmentation database. 3.The brain neuron segmentation method based on a generative adversarial network according to claim 2, characterized in that, The step 2 is specifically implemented according to the following steps: Preprocessing the training set and test set established in step 1 to obtain normalized images : wherein is the normalized value of the pixel in the image ranging from 0 to 1, the database image of step 1 is a color image composed of components, is the gray level of the pixel in the component, is the gray level of the pixel in the component, is the gray level of the pixel in the component.

Citation Information

Patent Citations

  • Image segmentation method and device and storage medium

    CN111340819A

  • Brain neuron iterative segmentation method based on segmentation and error guidance

    CN113920124A