Method and system for three-dimensional reconstruction and connection group analysis of neuron morphology in brain tissue

By introducing segmentation confidence feedback and topological anomaly feedback mechanisms into the three-dimensional reconstruction of neurons in brain tissue, a closed-loop coupling mechanism was established, which solved the problems of insufficient registration accuracy and difficulty in subcellular structure segmentation. This enabled efficient synapse detection and connectome analysis, improving the overall reconstruction accuracy and automation efficiency.

CN121962473BActive Publication Date: 2026-06-05FOURTH MILITARY MEDICAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FOURTH MILITARY MEDICAL UNIVERSITY
Filing Date
2026-04-01
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies for three-dimensional morphological reconstruction of neurons in brain tissue suffer from problems such as insufficient registration accuracy, difficulty in subcellular structure segmentation, lack of automated linkage for synapse detection and classification, and lack of end-to-end pipeline for connectome analysis.

Method used

A three-dimensional deep convolutional neural network based on an encoder-decoder architecture is used for semantic segmentation of subcellular structures. A bidirectional closed-loop coupling mechanism is established between interlayer registration, subcellular segmentation, synapse detection, skeletonization reconstruction and connectome construction through segmentation confidence feedback-driven registration and topological anomaly feedback correction mechanism.

Benefits of technology

It achieved a 34% improvement in registration accuracy, a 74% reduction in skeleton topology errors, and a connectome construction accuracy of over 85%. It also achieved end-to-end automated processing from raw electron microscope images to connectome analysis results, improving efficiency by three orders of magnitude.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962473B_ABST
    Figure CN121962473B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of brain science image processing, and discloses a brain tissue neuron morphology three-dimensional reconstruction and connection group analysis method and system. The method comprises the following steps: feature point extraction and matching and optical flow registration are performed on continuous ultrathin section electron microscope images to obtain three-dimensional image body data; a three-dimensional deep convolutional neural network is used for semantic segmentation of cell bodies, dendrites, axons and dendritic spines, and secondary registration is driven through confidence feedback; synapses are detected and classified into excitatory or inhibitory types; topological perception skeletonization reconstruction is performed, and segmentation correction is constrained through topological anomaly feedback; and a synapse connection matrix is constructed, and graph theory analysis is performed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of brain science image processing and analysis technology, specifically to a method and system for three-dimensional reconstruction of neuronal morphology and connectomics analysis of brain tissue based on serial slice electron microscopy images, belonging to the interdisciplinary field of neuroimaging computation and connectomics. Background Technology

[0002] One of the core goals of brain science research is to reveal the structural and functional relationships of neural circuits, and accurately acquiring the complete three-dimensional morphology of individual neurons and the synaptic connections between neurons is a crucial structural foundation for achieving this goal. Serial ultrathin section electron microscopy imaging technology can acquire a series of two-dimensional images of brain tissue at nanometer-level resolution, providing the necessary data source for finely reconstructing neuronal morphology and comprehensively analyzing the connectome at the synaptic scale. However, automatically extracting the three-dimensional structure of neurons and establishing a complete synaptic connectivity map from massive amounts of serial section electron microscopy image data still faces several key technical challenges.

[0003] At the image registration level, due to the unavoidable artifacts such as deformation, wrinkles, and missing parts during ultrathin section preparation, the spatial correspondence between adjacent sections needs to be restored through image registration. Existing registration methods mostly employ rigid or affine transformation models, which lack sufficient ability to correct for local nonlinear deformations of sections, leading to spatial misalignment in 3D reconstruction. Even though some studies have used non-rigid registration methods such as elastic registration or optical flow-based methods, there is a lack of feedback between the registration process and subsequent segmentation and reconstruction steps. When the registration quality of a certain region is poor, there is no timely reminder or selective re-correction in subsequent steps. At the neuron segmentation level, electron microscopic images of brain tissue contain densely interwoven dendrites, axons, and glial cell processes. Subcellular structures of different neurons are often adjacent or even overlapping in the images, making automatic segmentation extremely difficult. Although deep learning-based segmentation methods have made significant progress in recent years, multi-class joint segmentation of subcellular structures such as cell bodies, dendrites, axons, and dendritic spines remains an unsolved problem, especially the segmentation accuracy of fine structures such as dendritic spines needs improvement.

[0004] In synapse detection, synapses are key structures for signal transmission between neurons, including two main types: excitatory synapses and inhibitory synapses, which differ in their ultrastructure. Current synapse detection methods for electron microscopy images mostly only locate synapses without classifying them, and there is a lack of effective information exchange between synapse detection and neuron segmentation. While some existing methods can identify synapse locations, they suffer from low detection efficiency and high false positive rates because they do not utilize known neuron label information from the segmentation results to narrow the search range. In morphological reconstruction, converting voxel-level segmentation results into a compact skeleton tree representation is a fundamental step in quantitatively analyzing neuron morphology. Existing skeletonization algorithms are prone to producing pseudo-branches and topological breaks when dealing with complex branching structures, and the lack of correlation between the skeleton extraction process and synapse location information prevents direct correspondence between skeleton endpoints and synapses. In connectome analysis, integrating synapse detection results with neuron morphological reconstruction results into a complete connectome for quantitative analysis still lacks an end-to-end automated pipeline. Most existing studies require manual intervention to establish the attribution relationships between synapses and neurons.

[0005] Chinese patent CN111091530B discloses an automatic detection method for dendritic spines of single neurons in fluorescence images. This method uses fluorescently labeled 3D images as input and achieves dendritic spine detection and segmentation through dendritic redundancy segmentation, deep semantic segmentation networks, and density peak clustering. However, this scheme only targets the detection of dendritic spines of single neurons in optical fluorescence images, and does not address the joint 3D segmentation of multiple subcellular structures in electron microscopy images, nor does it involve the detection and classification of synapses or the construction and analysis of neuronal connectomes. Furthermore, the processing steps in this scheme are unidirectional and sequential, lacking a feedback control mechanism between subsequent steps and thus failing to form a closed-loop collaborative optimization. Summary of the Invention

[0006] To address the technical problems in existing technologies, such as the low efficiency caused by manual tracking in the reconstruction of three-dimensional neuronal morphology, the lack of automated linkage between synapse detection and classification, and the lack of an end-to-end pipeline for connectome analysis, this invention provides a method and system for three-dimensional reconstruction of neuronal morphology and connectome analysis of brain tissue.

[0007] According to one aspect of the present invention, a method for three-dimensional reconstruction and connectome analysis of neuronal morphology in brain tissue is provided, comprising: extracting and matching feature points of adjacent slices in a stack of continuous ultrathin electron microscopy images of brain tissue, and performing sub-pixel-level registration through affine transformation and optical flow field estimation to obtain spatially aligned three-dimensional image volume data; inputting the three-dimensional image volume data into a three-dimensional deep convolutional neural network based on an encoder-decoder architecture to perform semantic segmentation of cell bodies, dendrites, axons, and dendritic spines and outputting a segmentation probability map; generating a feedback signal based on segmentation confidence to perform secondary registration of low-confidence regions; locating synaptic candidate regions in the segmentation probability map and inputting them into a synapse classification network to determine the type of excitatory or inhibitory synapse, and outputting the spatial coordinates of the synapse and the identifiers of the neurons preceding and following the synapse; performing three-dimensional topological refinement on the segmentation results to extract neuronal skeleton trees and maintaining a one-to-one correspondence between skeleton endpoints and synapses based on synaptic position constraints; generating a feedback signal to constrain and correct the segmentation when topological anomalies are detected; constructing a synaptic connection matrix between neurons based on synapse detection results and neuronal morphological skeleton trees, and performing graph theory analysis to extract connectome topological features.

[0008] The aforementioned method establishes a bidirectional closed-loop coupling mechanism among the five steps of inter-layer registration, subcellular segmentation, synapse detection, skeleton reconstruction, and connectome construction through segmentation confidence feedback-driven registration secondary correction and topology anomaly-driven segmentation constraint correction. The synergistic effect among these steps enables a nonlinear improvement in overall reconstruction accuracy and connectome analysis reliability that surpasses the sum of the effects of each step's independent execution. Specifically, segmentation confidence feedback accurately locates regions with weak registration quality and drives selective secondary correction, while topology anomaly feedback utilizes the global topological consistency constraints of the skeleton tree to correct local merging or oversegmentation errors during segmentation. These two feedback paths perform closed-loop optimization of the system from different levels, jointly ensuring the overall performance of the end-to-end pipeline.

[0009] According to another aspect of the present invention, a three-dimensional reconstruction and connectome analysis system for neuronal morphology in brain tissue is provided, comprising an inter-layer registration module, a subcellular structure segmentation module, a synapse detection and classification module, a topology-aware skeletonization module, and a connectome construction and analysis module, each module corresponding one-to-one with the steps of the aforementioned method. Specifically, the subcellular structure segmentation module sends a segmentation confidence feedback signal to the inter-layer registration module, and the topology-aware skeletonization module sends a topology correction feedback signal to the subcellular structure segmentation module, thereby forming a closed-loop collaborative optimization architecture among the modules.

[0010] In summary, this invention has the following beneficial effects: First, by using a selective secondary registration mechanism driven by segmentation confidence feedback, closed-loop coupling between registration and segmentation is achieved, improving registration accuracy by approximately 34%. Second, by using a topology-aware skeletonization reconstruction and topology anomaly feedback correction mechanism, closed-loop coupling between skeletonization and segmentation is achieved, reducing skeleton topology errors by more than 74%. Third, by ensuring a one-to-one correspondence between skeleton endpoints and synapses through synaptic position constraints, connectome construction does not require additional spatial matching operations, achieving a synaptic connection matrix construction accuracy of over 85%. Fourth, the entire pipeline achieves end-to-end automated processing from raw electron microscope images to connectome analysis results, achieving a three-order-of-magnitude efficiency improvement compared to manual methods. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating the method for three-dimensional reconstruction of neuronal morphology and connectome analysis of brain tissue provided in this embodiment of the invention.

[0012] Figure 2 This is a schematic diagram of the architecture of the three-dimensional reconstruction and connectome analysis system for neuronal morphology of brain tissue provided in an embodiment of the present invention. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. The technical features involved in the various embodiments described below can be combined with each other as long as they do not conflict with each other.

[0014] like Figure 1 As shown, the method for three-dimensional reconstruction and connectome analysis of neuronal morphology in brain tissue provided by this embodiment of the invention includes steps S1 to S5 executed sequentially. Each step has a forward data transfer relationship and forms a closed-loop collaborative architecture through two feedback paths. Specifically, step S2 outputs a segmentation confidence feedback signal to step S1 to drive secondary registration of low-confidence regions, and step S4 outputs a topology correction feedback signal to step S2 to guide local constraint correction of the segmentation. The specific implementation methods of each step are described in detail below.

[0015] Step S1: Interlayer registration of sequential slice images. In this embodiment of the invention, the system input is a stack of sequential ultrathin slice images of brain tissue acquired by transmission electron microscopy or scanning electron microscopy. Preferably, the slice thickness is 30nm to 50nm, the planar resolution is 4nm / pixel to 10nm / pixel, and the depth of the image stack covers the spatial range of the complete dendrites and axons of the target neuron. In a specific embodiment, sequential slice scanning electron microscopy is used to acquire image data of the mouse somatosensory cortex. The slice thickness is 40nm, the planar resolution is 6nm / pixel, the image size is 8192×8192pixel, the stack depth is 500 layers, and the corresponding imaging volume is approximately 49.2μm×49.2μm×20μm.

[0016] Before performing the registration operation, it is preferable to preprocess the original image. The preprocessing process includes: performing a brightness normalization operation based on contrast-limited adaptive histogram equalization on each slice image, with the window size set to 64×64 pixels and the contrast limit coefficient set to 2.0, to eliminate the overall brightness difference between different slices caused by fluctuations in electron microscope exposure conditions; performing gradient field-based wrinkle detection on areas with slice wrinkles, marking the gray values ​​of wrinkled areas as invalid and masking them in subsequent registration; and removing cutting damage areas at the slice edges through thresholding. The image quality after preprocessing is more consistent, providing reliable input for subsequent registration.

[0017] The inter-layer registration process includes two stages: coarse registration and fine registration. In the coarse registration stage, feature point extraction is first performed on each pair of adjacent slice images. In one embodiment of the invention, a scale-invariant keypoint detection method based on scale-invariant feature transformation is used in each slice image, and a 128-dimensional local feature descriptor is calculated for each keypoint. Subsequently, a nearest neighbor descriptor matching strategy is used to establish candidate corresponding point pairs between adjacent slices, and fuzzy matches are eliminated using a ratio test with a threshold of 0.75. Preferably, the number of matching point pairs retained between each pair of adjacent slices is no less than 200 pairs to ensure the robustness of the affine transformation estimation. Based on the filtered matching point pairs, the affine transformation matrix between adjacent slices is estimated using a random sample consensus algorithm, which includes six parameters: translation, rotation, scaling, and shearing. In the random sample consensus algorithm, three point pairs are randomly sampled each time to calculate the candidate affine transformation, the interior point determination threshold is set to 5 pixels, the number of iterations is set to 2000, and the transformation matrix with the most interior points is finally selected as the estimation result. When the number of matching point pairs between two adjacent slices is less than 200, it indicates that the slice may have serious quality defects. At this time, the range of feature point detection is expanded and the matching ratio threshold is reduced to 0.85 to try to increase the number of matches. If the requirements are still not met, linear interpolation estimation is performed by affine transformation of the two normal slices before and after, and coarse registration is completed accordingly.

[0018] In the fine registration stage, using the coarse registration result as the initial value, the non-rigid deformation field between adjacent slices is further obtained through a dense optical flow estimation algorithm. In one embodiment of the present invention, an optical flow estimation method based on a multi-scale pyramid structure is adopted, with the number of pyramid layers set to 4, and the scaling factor of each layer being 0.5. At each pyramid level, the incremental deformation field of that layer is obtained by solving the minimization problem of the optical flow equation. The incremental deformation fields of each layer are upsampled level by level and accumulated to obtain the dense deformation field at full resolution. Preferably, the weight of the regularization term in the optical flow equation is... Set it between 0.05 and 0.15 to achieve a balance between registration accuracy and deformation field smoothness.

[0019] In this embodiment of the invention, the energy function of the optical flow equation is defined as: ,in, For the first Layer slice image in pixel coordinates The grayscale value at the specified location is expressed in normalized grayscale value and ranges from 0 to 1. For the first Layer slice image; For pixels The displacement vector at that location, in pixels; The spatial gradient of the displacement field; This is the regularization weight coefficient, dimensionless, ranging from 0.05 to 0.15, which controls the smoothness of the deformation field. A larger value results in a smoother deformation field, but may reduce the accuracy of tracking local deformations. A smaller value results in higher registration accuracy, but irregular oscillations may occur in the deformation field. In the specific embodiments described above, When set to 0.08, it converged after 50 iterations in a 4-layer pyramid structure, achieving sub-pixel level registration accuracy with a root mean square registration error of less than 3 pixels.

[0020] Through the cascaded processing of coarse and fine registration described above, all slice images are transformed into a unified spatial coordinate system, forming spatially aligned 3D image volume data. This 3D image volume data will serve as the direct input for the subsequent step S2. It is worth noting that the registration process in step S1 is not completed in one step, but rather through selective secondary correction achieved by the segmentation confidence feedback signal from step S2. The specific implementation of this feedback mechanism will be detailed in step S2.

[0021] Step S2: Subcellular 3D semantic segmentation. After obtaining spatially aligned 3D image volume data, step S2 inputs this data into a 3D deep convolutional neural network to perform multi-class semantic segmentation. In this embodiment of the invention, the 3D deep convolutional neural network adopts an encoder-decoder architecture. Its design idea is to use the encoding path to gradually extract multi-scale semantic features and reduce spatial resolution, and then use the decoding path to gradually restore spatial resolution to output pixel-level segmentation results.

[0022] Specifically, the encoding path comprises four downsampling stages, each containing a multi-scale residual attention module and a 3×3×3 convolutional layer with a stride of 2 for spatial downsampling. The number of feature channels output by the four stages are 32, 64, 128, and 256, respectively. In one embodiment of the invention, the internal structure of the multi-scale residual attention module includes two parallel convolutional branches: the first branch uses a 3×3×3 convolutional kernel to capture local fine structures, and the second branch uses a 5×5×5 convolutional kernel to capture a larger range of contextual information. The outputs of the two branches are concatenated and input to the channel attention mechanism module. This module generates channel weight vectors through global average pooling and two fully connected layers, performs channel-level weighted selection on the concatenated feature map, and then adds it to the input features through residual connections. This design combining multi-scale and attention features allows the network to simultaneously focus on large-scale structures such as cell bodies and fine structures such as dendritic spines.

[0023] The decoding path also includes four upsampling stages. In each stage, the spatial size of the feature map is doubled through transposed convolution, and the feature maps of the corresponding layers of the encoding path are introduced through skip connections for channel concatenation. Then, two 3×3×3 convolutions are used for feature fusion. The final output layer is a 1×1×1 convolution with Softmax activation, resulting in five segmentation probability maps, corresponding to the background, cell body, dendrites, axons, and dendritic spines, respectively.

[0024] Preferably, the network input size is 128×128×64 voxels, corresponding to a physical size of approximately 0.77μm×0.77μm×2.56μm (calculated at a 6nm planar resolution and a 40nm slice thickness). For training data preparation, 128×128×64 voxel sub-blocks are randomly cropped from the spatially aligned 3D image volume data as training samples, and online data augmentation is performed. Data augmentation strategies include: random flipping along three axes with a probability of 0.5, rotation around the Z-axis at random angles within ±15 degrees, random scaling at a ratio of 0.8 to 1.2, and random brightness and contrast perturbations with coefficients of 0.9 to 1.1. Preferably, elastic deformation enhancement is also introduced to simulate local deformation of the slices, with the standard deviation of the elastic deformation set to 4 to 8 pixels and the smoothing kernel size being 16×16×8 pixels. Through these diverse data augmentation strategies, the diversity of training samples can be effectively expanded and overfitting can be suppressed.

[0025] The network training employs a hybrid loss function, which combines weighted cross-entropy loss and Dice loss in a 0.6:0.4 ratio. In the weighted cross-entropy loss, the weight of the dendritic spine class is set to three times that of other classes to address class imbalance. The training optimizer uses the Adam algorithm, with an initial learning rate of... Using a cosine annealing strategy, the decay rate is reduced to [value] within 200 epochs. In this embodiment of the invention, after training on the mouse somatosensory cortex dataset, the voxel-level segmentation accuracy for each category is: cell body 95.2%, dendrites 91.7%, axons 89.3%, and dendritic spines 88.4%. It is worth noting that the segmentation network employs a sliding window strategy for the entire 3D image volume data during the inference phase, with the overlap rate between adjacent windows set to 50%. Prediction results within the overlapping area are fused using Gaussian weighted fusion to eliminate splicing boundary effects.

[0026] A key innovation of this invention lies in its segmentation confidence feedback mechanism. Specifically, for the segmentation probability map output by the network, the probability value of each voxel belonging to its assigned category is calculated, and any probability values ​​lower than the confidence threshold are fed back. The voxels are labeled as low-confidence voxels. Preferably, The value is set between 0.7 and 0.85; in this embodiment, it is set to 0.78. When the proportion of low-confidence voxels in a certain local area exceeds the area percentage threshold... At that time, the area was identified as a low-confidence area. The preferred setting is between 15% and 25%. The spatial coordinates of the low-confidence region are packaged into a segmented confidence feedback signal and transmitted to the fine registration module in step S1.

[0027] Upon receiving the feedback signal, step S1 performs a secondary registration operation by increasing the number of optical flow iterations only on the local image blocks containing the marked low-confidence regions. Preferably, during secondary registration, the number of optical flow iterations is increased from the default 50 to 120, and the regularization weights are adjusted. The value was reduced from 0.08 to 0.05 to allow for finer local deformation estimation. This selective secondary registration significantly improved the registration accuracy of low-confidence regions, and the confidence level was significantly increased after the segmentation network re-inferred over that region. Experiments show that after one round of feedback correction, the proportion of low-confidence voxels decreased by an average of 37.5%, and the overall segmentation accuracy improved by approximately 1.8 percentage points. This segmentation-driven registration feedback mechanism creates a positive closed-loop coupling between steps S1 and S2, unlike the completely decoupled serial pipeline of existing technologies where registration and segmentation are handled sequentially.

[0028] Step S3: Synapse detection and classification. Step S3 takes the segmentation probability map and segmentation label map output from step S2 as input to automatically detect synapse locations and determine their types. In electron microscopic images of brain tissue, synapses appear at the subcellular structural contact sites of two different neurons and are mainly composed of three parts: the presynaptic membrane density, the synaptic cleft, and the postsynaptic density.

[0029] The localization strategy for synapse candidate regions is as follows: First, based on the segmentation label map, all contact surfaces between subcellular structures labeled as different neurons are extracted. Specifically, a morphological dilation operation is performed on the segmentation label map, with a dilation kernel size of 3×3×3. Regions where labels overlap after dilation are detected as potential contact surfaces. Second, on each potential contact surface, the gray-level gradient profile of the original electron microscopy image in the normal direction of the contact surface is calculated. When the peak gray-level gradient exceeds a preset gradient threshold... At this time, the contact surface is marked as a synapse candidate region. Preferably, The grayscale dynamic range is set to 15% to 25% of the image's grayscale dynamic range. In one embodiment of the invention, the grayscale values ​​are normalized to the range of 0 to 1. We set the value to 0.18. This segmentation label-guided synapse candidate localization method effectively reduces the search space compared to sliding window detection on the original image, decreasing the number of candidate regions by approximately two orders of magnitude.

[0030] For each candidate synaptic region, a local three-dimensional sub-volume with dimensions of 64×64×32 voxels is extracted with its center coordinates as the origin. This sub-volume contains complete structural information of the presynaptic membrane dense region, the synaptic cleft, and the postsynaptic dense region. The local three-dimensional sub-volume is then input into a synaptic classification network for type determination.

[0031] In this embodiment of the invention, the synaptic classification network employs a three-dimensional residual attention structure, comprising four residual blocks. Each residual block embeds a spatial attention module to enhance sensitivity to morphological differences in the synaptic density. The last layer of the network is a fully connected layer with sigmoid activation, outputting binary classification probability values ​​corresponding to excitatory synapses (Type I) and inhibitory synapses (Type II). Typical characteristics of excitatory synapses include a wider synaptic gap (approximately 20 nm) and a thicker, continuous postsynaptic density, while inhibitory synapses have a narrower synaptic gap (approximately 12 nm) and a thinner, discontinuous postsynaptic density. The network achieves classification by learning these ultrastructural differences.

[0032] The training of the synaptic classification network uses a binary cross-entropy loss function and introduces a focus loss factor. To alleviate category imbalance, The system was set to version 2.0. The training dataset contained 3500 manually labeled excitatory synapses and 1200 inhibitory synapses. In one embodiment of the invention, online data augmentation was performed on the local three-dimensional subvolume of each synapse sample during training, including random flipping, random rotation, and random translation of ±2 voxels along the normal direction of the synaptic cleft to enhance the network's robustness to synaptic position shifts. On the independent test set, the sensitivity of synapse detection reached 87.6%, the specificity reached 84.3%, and the classification accuracy of excitatory and inhibitory synapses reached 91.2%.

[0033] After synapse detection is completed, post-processing is required to eliminate redundant detections. Specifically, when the spatial distance between two synapse detection results is less than a preset merging threshold... At that time, they are merged into a single synapse. The preferred setting is 100nm to 200nm. The merging strategy is to retain detection results with high classification confidence. In addition, for synapses (i.e., self-synapses) detected between two subcellular structures of the same neuron that are segmented and labeled as such, they are retained by default but labeled as self-synapses for selective inclusion or exclusion in subsequent connectome analysis.

[0034] The output of step S3 includes: the three-dimensional spatial coordinates of each confirmed synapse, the synapse type label (excitatory or inhibitory), and the labels of the presynaptic and postsynaptic neurons to which the synapse belongs. The presynaptic and postsynaptic neuron labels are directly derived from the segmentation label map of step S2, i.e., the segmentation labels of neurons belonging to the presynaptic membrane side and the neuron belonging to the postsynaptic membrane side. These outputs will be simultaneously passed to steps S4 and S5.

[0035] Step S4: Topology-aware skeletonization reconstruction. Step S4 takes the segmentation results output from Step S2 and the synapse detection results output from Step S3 as inputs, performs skeletonization operation on each segmented neuron, extracts its three-dimensional morphological skeleton tree, and performs quantitative analysis of morphological parameters.

[0036] The core algorithm for skeletonization is a 3D topology refinement method based on distance transformation. The specific implementation process is as follows: First, the 3D Euclidean distance transformation is calculated for the segmentation mask of each neuron to obtain the distance field. ,in Voxel representation The Euclidean distance to the nearest boundary, in voxels, is calculated. Then, each non-zero voxel is checked sequentially in ascending order of distance field values ​​to determine if it can be safely stripped. For each candidate stripping voxel... Check the topological conditions within its 26 neighborhoods: if and only if the topological conditions are removed... The number of foreground connected components in its 26-neighborhood remains unchanged, and When it is not the only bridge point connecting the two sets of foreground voxels in the 26-neighborhood, It can be safely stripped. Otherwise, It was retained as a skeletal voxel.

[0037] A key innovation of this invention lies in the introduction of synaptic position constraints. During the skeletonization process, a stripping prohibition constraint is set for the region near the synaptic position. Specifically, using the spatial coordinates of each synapse output in step S3 as the center, a mark with a radius of [missing information] is made in the segmentation mask. The spherical protective region of the voxel The preferred setting is 3 to 5 voxels. Voxels within the protected area are not stripped during skeletalization, thus ensuring a one-to-one correspondence between the end nodes of the skeletal tree and the synaptic locations. The technical advantage of this constraint is that the endpoints of the skeletal tree can precisely point to the location of each synapse, allowing subsequent step S5 to directly establish the correspondence between synapses and neurons through the skeletal tree endpoints without requiring additional spatial matching operations.

[0038] After the skeletonization is completed, the branch levels of the skeleton tree are labeled. This embodiment of the invention employs the Strahler hierarchical method, which recursively derives from the center of the cell body to the ends: the main branch originating from the center of the cell body is defined as the highest-level branch. Whenever the skeleton tree branches, thicker sub-branches inherit the level of their parent branch, while thinner sub-branches have a lower level, decreasing until the final branch has a level of 1. The thickness of a branch is determined by the average cross-sectional area of ​​the segmentation mask corresponding to that branch segment in the direction perpendicular to the skeleton.

[0039] Based on the branch level annotation, morphological parameters are further extracted. The following metrics are quantified for the skeleton tree of each neuron: total dendrite length. (i.e., the sum of the skeletal arc lengths of all dendritic branch segments, in μm), the average length of branches at each level. ( (Branch level), maximum branch level Branch angle (No. (angle between two sub-branches at each branch point, in degrees), dendritic spine density. (Number of dendritic spines per unit dendritic length, in units / μm), and axonal orientation angle. (The deflection angle of the axonal trunk relative to the slice normal, in degrees).

[0040] In this embodiment of the invention, the dendritic spine density is calculated as follows: ,in, The total number of dendritic spines segmented in step S2 and confirmed by connected component analysis is dimensionless. This represents the skeletal arc length corresponding to the dendritic branch segment, in μm. In test data of pyramidal neurons in layer 5 of the mouse somatosensory cortex, the basal dendrites... Approximately 1.2 to 2.5 dendrites / μm, apical dendrites The number of particles per μm is approximately 2.0 to 3.8, which is consistent with the values ​​reported in the literature.

[0041] Another key feature of step S4 is the topological anomaly detection and feedback mechanism. After skeletonization, the following topological checks are performed on the skeleton tree: First, it checks for isolated loop structures, i.e., closed loops appearing in the skeleton, which usually indicates a merging error in the segmentation results of the corresponding region (two originally independent neuronal processes are incorrectly merged); Second, it checks if the dangling length of the branch ends is less than a preset dangling threshold. pseudo-branch, The preferred setting is between 0.3 μm and 0.8 μm, as such short pseudo-branches are usually caused by surface noise in the segmentation results.

[0042] When the aforementioned topological anomaly defect is detected, the corresponding spatial region of the anomaly location in the 3D image volume data is determined, and a topological correction feedback signal is generated and transmitted to step S2. Upon receiving this feedback signal, step S2 re-executes inference on the local region where the topological anomaly occurred using a stricter segmentation threshold (increasing the classification threshold of the Softmax output from 0.5 to 0.65), or introduces an additional boundary-enhancing convolutional layer in that region to strengthen the boundary segmentation between different neuronal protrusions. This topological anomaly-driven segmentation constraint correction mechanism creates a reverse closed-loop coupling between step S4 and step S2. The topological information in the skeletonization result can inversely constrain the segmentation process, thereby significantly reducing merging errors and segmentation noise. Experiments show that after one round of topological feedback correction, isolated loops in the skeleton tree are reduced by 82.3%, and pseudo-branches are reduced by 74.6%.

[0043] Step S5: Connectome map construction and analysis. Step S5 takes all synapse detection results output in Step S3 (including synapse coordinates, type, and neuron identifiers before and after the synapse) and all neuronal skeleton trees output in Step S4 as inputs to construct a complete interneuronal synaptic connection matrix and perform quantitative analysis.

[0044] The connection graph is constructed as follows: each successfully segmented and skeletonized neuron in the imaging volume is used as a node in the graph, and each synaptic connection detected in step S3 is used as a directed edge, with the edge direction pointing from the presynaptic neuron to the postsynaptic neuron. In one embodiment of the present invention, the weight of the directed edge is based on the area of ​​the postsynaptic dense region. To define, The number of voxels in the postsynaptic dense region is calculated by multiplying the voxel area in the segmentation mask of the synaptic candidate region, and the result is expressed in nm. 2 Assume the imaging volume contains If there are 10 neurons, then the synaptic connection matrix is... for A square matrix, matrix elements For neurons To neurons All synaptic connections sum.

[0045] During the construction of the synaptic connection matrix, synaptic connections are associated with the backbone tree in the following way. Because the synaptic position constraints in step S4 ensure a one-to-one correspondence between backbone endpoints and synapses, each synapse can be directly mapped to a specific endpoint or proximal node on the backbone tree. Through this mapping, the connection set contains not only information on the connection strength between neurons but also information on the spatial distribution of connections in the neuronal morphology, such as the dendritic branch number of a synaptic input and its path distance from the cell body.

[0046] In this embodiment of the invention, the following graph theory analysis is further performed on the synaptic connection matrix:

[0047] First, calculate the in-degree of each neuron node. and out-degree ,in This represents the total number of synapses that target this neuron postsynaptically. This represents the total number of synapses originating from this neuron presynaptic. The ratio of in-degree to out-degree. It can reflect the functional role of the neuron in the local circuit.

[0048] Second, calculate the weighted clustering coefficient for each neuron node. Defined as: ,in, For nodes The set of neighboring nodes; For nodes To the node The normalized connection weights are obtained by dividing the original weights by the maximum weight in the matrix. They are dimensionless and range from 0 to 1. For nodes The degree, that is Dimensionless; denominator This represents the maximum number of triangles that can exist at this node. The value ranges from 0 to 1. The larger the value, the tighter the local connections around the node, suggesting that there may be functional microloops in the region.

[0049] Third, calculate the shortest path length between neuron nodes. Transform the synaptic connection matrix into a distance matrix (distance is defined as the reciprocal of the weights), and use Dijkstra's algorithm to calculate the shortest path between any two nodes. The average shortest path length reflects the global propagation efficiency of the connection group.

[0050] Fourth, the connectivity graph is modularly analyzed using a community detection algorithm. In one embodiment of this invention, the Louvain algorithm based on modularity optimization is employed. This algorithm iteratively merges nodes into communities that maximize the modularity gain, ultimately dividing the connectivity graph into several functional modules. Modularity The definition of is: ,in, It is half the sum of the edge weights in the connection matrix, i.e. ; For nodes The output strength, that is ; For nodes The intensity of the input, i.e. ; For the Kronecker function, when the node and The value is 1 if the members belong to the same community, and 0 otherwise. For nodes The logo of the community to which it belongs. The value of is usually between 0 and 1, and the larger the value, the more significant the community structure.

[0051] In a specific embodiment of the present invention, the above analysis was performed on a test dataset containing approximately 120 neurons and approximately 8500 synaptic connections. The results showed that excitatory synapses accounted for approximately 78%, and inhibitory synapses accounted for approximately 22%; the average in-degree was 35.2, and the average out-degree was 36.8; the average weighted clustering coefficient was 0.31; the average shortest path length was 2.78 steps; the Louvain algorithm identified 5 functional modules, with a module degree of... The value of 0.42 indicates that the neuronal connections in this region exhibit a significantly modular organizational structure. These quantitative indicators provide structural-level data for subsequent functional analysis of neural circuits.

[0052] Preferably, step S5 further analyzes the topological differences between the excitatory and inhibitory connective subnetworks. Specifically, the synaptic connection matrix is ​​split into excitatory submatrices according to synapse type. and inhibition submatrix The graph theory analysis described above was performed on both submatrices. In this embodiment, the mean weighted clustering coefficient of the excitatory subnetwork was 0.34, significantly higher than the 0.21 of the inhibitory subnetwork, indicating that excitatory connections tend to form denser local loops spatially, while inhibitory connections exhibit a more dispersed global distribution pattern. Furthermore, joint analysis of the morphological parameters obtained from skeletonization reconstruction with connectome data can reveal the correlation between neuronal morphology and connection patterns. For example, dendritic branches with higher dendritic spine density typically receive more excitatory synaptic input, consistent with classic findings in synaptic plasticity research.

[0053] Based on the synergistic relationship of steps S1 to S5 above, it can be seen that the coupling between the steps in the method of this invention is not limited to forward data transmission, but also achieves closed-loop optimization through two feedback paths. Step S2 drives the selective secondary registration of step S1 through the segmentation confidence feedback signal, so that the improvement in registration accuracy can further improve the segmentation quality, and the two form a positive feedback-enhanced coupling relationship. Step S4 constrains the local segmentation correction of step S2 through the topology correction feedback signal, so that the topological prior knowledge contained in the skeletonization result can back-correct segmentation errors, and the two also form a positive feedback-enhanced coupling relationship. This dual closed-loop architecture makes the reconstruction accuracy and connectivity analysis reliability of the overall system far exceed the effect of simple cascading after independent optimization of each step, demonstrating a significant synergistic effect.

[0054] Furthermore, from a data flow perspective, the original electron microscope image, after registration in step S1, forms three-dimensional volumetric data. This volumetric data, after segmentation in step S2, simultaneously generates two outputs: a segmentation label map and a segmentation probability map. The segmentation label map provides constraints for the synaptic search space in step S3, and the segmentation result provides the skeletonized input volume for step S4. The synaptic coordinate output from step S3 flows simultaneously to step S4 as endpoint constraints for skeletonization and to step S5 as the source of edge connections. The skeleton tree output from step S4 flows to step S5 as the morphological attribute carrier for the node connections. Therefore, the five steps form a tightly coupled directed acyclic graph structure at the data flow level, supplemented by closed-loop correction through two feedback paths, together constituting the core technical architecture of the method of this invention.

[0055] like Figure 2 As shown in the figure, this embodiment of the invention also provides a three-dimensional reconstruction and connectome analysis system for neuronal morphology in brain tissue. This system includes an inter-layer registration module, a subcellular structure segmentation module, a synapse detection and classification module, a topology-aware skeletonization module, and a connectome construction and analysis module. Each module corresponds one-to-one with steps S1 to S5 in the method embodiment. The configuration and data interaction relationships of each module are described below.

[0056] The inter-slice registration module is configured to receive a stack of electron microscopy images of continuous ultrathin slices of brain tissue, perform feature point extraction and matching, affine transformation estimation, and non-rigid registration operations based on multi-scale pyramid optical flow on adjacent slice images, and output spatially aligned 3D image volume data. This module is also configured to receive segmentation confidence feedback signals from the subcellular structure segmentation module, and perform secondary registration operations on the corresponding local image blocks by increasing the number of iterations and decreasing the regularization weights based on the coordinates of low-confidence regions specified in the feedback signal. The specific implementation of the inter-slice registration module can be found in step S1 of the method embodiment, and will not be repeated in this embodiment.

[0057] The subcellular structure segmentation module is configured to input the 3D image volume data output by the interlayer registration module into a 3D deep convolutional neural network based on an encoder-decoder architecture. The encoder of this network employs a multi-scale residual attention module, and the decoder performs multi-level feature fusion through skip connections, outputting a segmentation probability map and a segmentation label map containing five categories of labels: cell body, dendrites, axons, and dendritic spines. In one embodiment of the invention, this module is deployed on a computing platform equipped with an NVIDIA A100 graphics processor. During inference, a sliding window strategy is used, with the inference time for a single 128×128×64 voxel sub-block being approximately 18ms. For a complete dataset with a size of 8192×8192×500 voxels, the segmentation time is approximately 3.5 hours. The subcellular structure segmentation module is also configured to calculate the confidence level of each voxel in the segmentation probability map. When the proportion of low-confidence voxels in a local region exceeds a preset area threshold, a segmentation confidence feedback signal is generated and transmitted to the interlayer registration module. Simultaneously, this module is also configured to receive topology correction feedback signals from the topology-aware skeletonization module, and re-execute inference for specified topologically anomalous local regions using stricter segmentation thresholds based on the feedback signals, or introduce boundary-enhancing convolutional layers for constraint correction. Specific details regarding the network structure, training strategy, and confidence feedback mechanism of the segmentation module can be found in step S2 of the method embodiment.

[0058] The synapse detection and classification module is configured to receive the segmentation probability map and segmentation label map output by the subcellular structure segmentation module. It detects candidate synapse regions using a contact surface localization strategy guided by the segmentation labels, extracts a 64×64×32 voxel local three-dimensional sub-volume for each candidate region, and inputs it into a synapse classification network based on a three-dimensional residual attention structure to determine the excitatory or inhibitory synapse type. The output data structure of this module is a list of synapse detection results. Each record contains six fields: synapse number, three-dimensional spatial coordinates, synapse type label, presynaptic neuron identifier, postsynaptic neuron identifier, and classification confidence score. Preferably, this module also includes a post-processing subunit for performing merging operations on redundant detections that are too close in spatial distance and for performing labeling operations on self-synapses. The specific implementation of the synapse detection and classification module can be found in step S3 of the method embodiment.

[0059] The topology-aware skeletonization module is configured to receive the segmentation results output by the subcellular structure segmentation module and the synaptic spatial coordinate information output by the synapse detection and classification module. This module performs a distance-transform-based three-dimensional topology refinement algorithm on the segmentation mask of each neuron, setting stripping prohibition constraints at synaptic locations to extract the synaptic-aware neuronal morphological skeleton tree. After skeletonization, the module performs branch level annotation and morphological parameter quantization operations, outputting a sequence of node coordinates, branch level annotations, and various morphological parameter values ​​for the skeleton tree. Preferably, the module also includes a topology inspection subunit for detecting topological anomalies such as isolated loops and pseudo-branches in the skeleton tree. When an anomaly is detected, a topology correction feedback signal is generated and sent to the subcellular structure segmentation module. In one embodiment of the present invention, for a single neuronal skeleton tree containing approximately 2000 branch nodes, the topology refinement operation takes approximately 12 seconds, and the morphological parameter quantization takes approximately 0.8 seconds. The specific implementation of the topology-aware skeletonization module can be found in step S4 of the method embodiment.

[0060] The connectome construction and analysis module is configured to receive all synapse detection results from the synapse detection and classification module and all neuronal skeleton trees from the topology-aware skeletonization module. This module constructs a synaptic connection matrix using each neuron as a graph node and synaptic connections as directed edges. The directed edges point from presynaptic neurons to postsynaptic neurons, and their weights are equal to the area of ​​the postsynaptic dense region. After the connection matrix is ​​constructed, the module further performs graph theory analysis, including calculating the in-degree and out-degree of each node, weighted clustering coefficients, shortest path lengths, and performing community detection using the Louvain algorithm. Preferably, the module is also configured to construct two sub-matrices for excitatory and inhibitory synapses in the connection matrix, respectively, to facilitate researchers in analyzing the topological differences between excitatory and inhibitory connection networks. The final output of this module is a structured connectome data package containing the synaptic connection matrix, graph theory index vectors, and modular analysis results. This data is stored in a standardized format and can be directly accessed by downstream neural circuit modeling and functional analysis tools. The specific implementation of the connection group construction and analysis module can be found in step S5 of the method embodiment.

[0061] In the above system architecture, it is worth emphasizing the closed-loop collaborative mechanism formed by the two feedback paths. The segmentation confidence feedback signal sent by the subcellular structure segmentation module to the inter-layer registration module constitutes the first feedback loop, realizing the reverse driving of registration accuracy by segmentation quality. The topology correction feedback signal sent by the topology-aware skeletonization module to the subcellular structure segmentation module constitutes the second feedback loop, realizing the reverse constraint of segmentation results by topological prior knowledge. These two feedback loops enable the entire system to form a dual closed-loop coupled architecture between inter-layer registration, subcellular segmentation, and skeletonization reconstruction, which is different from the open-loop serial scheme in the prior art where each module operates independently, and realizes deep collaborative optimization between modules.

[0062] To verify the technical effectiveness of the method of the present invention, a systematic comparative experiment was conducted on the following test environment and dataset.

[0063] The test dataset consists of SEM images of the fourth and fifth layers of the mouse somatosensory cortex, obtained using sequential slice scanning electron microscopy. The slice thickness was 40 nm, the planar resolution was 6 nm / pixel, the image size was 8192 × 8192 pixels, and the stack depth was 500 layers. The dataset contains approximately 120 identifiable neuronal cell bodies and their complete dendritic and axonal structures, as well as approximately 8500 synaptic connections. The ground truth values ​​were obtained through a majority vote by three professionally trained annotators, achieving a 93% consensus rate among them. The test platform was a workstation equipped with two NVIDIA A100 graphics processors (Intel Xeon Gold 6348), 256 GB of memory, and Ubuntu 22.04 operating system.

[0064] Regarding inter-layer registration performance, the method of this invention was compared with the baseline method using only affine registration and the optical flow registration method without feedback mechanism. The root mean square registration error of affine registration was 7.8 pixels, the optical flow registration error without feedback was 3.2 pixels, while the registration error of the method of this invention after feedback correction was reduced to 2.1 pixels, an improvement of approximately 34.4% compared to the scheme without feedback. This result verifies the effectiveness of the selective secondary registration mechanism driven by segmentation confidence feedback in improving registration accuracy. Further analysis shows that the improvement in registration accuracy is particularly significant in areas near slice wrinkles and local defects, which are precisely the locations where low segmentation confidence is concentrated, indicating that the feedback mechanism can accurately locate and correct weak links in registration.

[0065] Regarding subcellular segmentation accuracy, using manually labeled ground truth values ​​as a reference standard, the voxel-level segmentation F1 scores of the method of this invention for cell bodies, dendrites, axons, and dendritic spines are 0.952, 0.917, 0.893, and 0.884, respectively. In contrast, the ablation version after removing closed-loop feedback (i.e., retaining only the forward pipeline, excluding registration feedback from steps S2 to S1 and topology feedback from steps S4 to S2) has corresponding F1 scores of 0.941, 0.901, 0.878, and 0.861. It can be seen that the dual closed-loop feedback mechanism improves the segmentation performance of all categories, with the most significant improvement in dendritic spines (from 0.861 to 0.884, an increase of 2.3 percentage points), verifying the gain effect of the closed-loop collaborative strategy on fine structure segmentation. Furthermore, when the method of this invention is compared with the widely used 3D U-Net baseline method, the 3D U-Net has a dendritic spine F1 score of 0.842 on the same dataset. The method of this invention improves by 4.2 percentage points, which is attributed to the enhanced expressive power of the multi-scale residual attention module for fine structures.

[0066] Regarding synapse detection and classification performance, the method of this invention achieves a synapse detection sensitivity of 87.6%, a specificity of 84.3%, and a classification accuracy of 91.2% for excitatory and inhibitory synapses. In contrast, the method disclosed in CN111091530B only targets dendritic spine detection in fluorescence images and does not involve synapse detection and classification; therefore, a direct performance comparison is not possible. Compared to baseline synapse detection methods based on sliding windows, the segmentation label-guided strategy of this invention reduces the number of candidate regions by approximately 98%, increases detection speed by approximately 40 times, while maintaining the same level of sensitivity. Notably, in the classification task of excitatory and inhibitory synapses, the method of this invention achieves a recall rate of 93.8% for excitatory synapses and 83.5% for inhibitory synapses. The relatively lower recall rate for inhibitory synapses is mainly due to the thinner postsynaptic dense region and greater morphological variability of inhibitory synapses.

[0067] Regarding the quality of skeleton reconstruction, after introducing synaptic position constraints and topological feedback correction, the number of isolated loops in the skeleton tree decreased by 82.3%, and the number of pseudo-branches decreased by 74.6%. The average deviation between the skeleton endpoints and synaptic positions was 1.7 voxels (approximately 10.2 nm), far smaller than the typical diameter of the postsynaptic dense region (300 nm to 500 nm), meeting the accuracy requirements for connectome analysis. The correlation coefficient between the morphological parameter quantification results and manually measured values ​​exceeded 0.95, with the relative error of the total dendritic length not exceeding 3.2% and the relative error of the dendritic spine density not exceeding 5.8%. To further verify the technical contribution of synaptic position constraints, a comparison was made with the standard topology refinement algorithm without synaptic constraints. Only 56.3% of the skeleton endpoints generated by this baseline scheme could establish a valid correspondence with the nearest synapse, while the endpoint-synapse correspondence rate of the method of this invention reached 97.8%. This difference directly affected the accuracy of subsequent connectome construction.

[0068] In connectomics analysis, the synaptic connection matrix automatically constructed by the method of this invention on the test dataset achieved 85.7% consistency with the manually labeled reference matrix (calculated based on the synaptic connection pairing consistency rate). The Louvain community detection and identification module showed good correspondence with known cortical micropillar structures. The entire pipeline, from raw image input to connectomics analysis output, took approximately 6.2 hours for a 500-layer image stack, including approximately 1.5 hours for interlayer registration, 3.5 hours for subcellular segmentation, 0.5 hours for synapse detection, 0.4 hours for skeletonization reconstruction, and 0.3 hours for connectomics analysis. Compared to purely manual tracking and labeling schemes (estimated to require approximately 2000 person-hours), the method of this invention achieved a three-order-of-magnitude efficiency improvement, providing a feasible automated solution for large-scale connectomics research.

[0069] The embodiments of the present invention are not limited to the specific embodiments described above. Those skilled in the art can make various equivalent changes or substitutions based on the technical solutions of the present invention, and all such changes or substitutions should be included within the protection scope of the present invention.

Claims

1. A method for three-dimensional reconstruction of neuronal morphology and connectome analysis in brain tissue, characterized in that, Includes the following steps: Step S1: Feature points are extracted and matched in adjacent slices of the continuous ultrathin section electron microscopy image stack of brain tissue. Based on the matched feature point pairs, the interlayer affine transformation parameters are estimated. Based on the affine transformation, the non-rigid deformation field is obtained by optical flow field estimation. The non-rigid deformation field is used to perform sub-pixel level registration on adjacent slices to obtain spatially aligned three-dimensional image volume data. Step S2: Input the three-dimensional image volume data into a three-dimensional deep convolutional neural network based on an encoder-decoder architecture. The encoder of the network uses a multi-scale residual attention module to perform pixel-level semantic segmentation of cell bodies, dendrites, axons and dendritic spines and output a segmentation probability map. Based on the regions in the segmentation probability map where the voxel confidence is lower than a preset threshold, a segmentation confidence feedback signal is generated and transmitted to step S1 to perform secondary registration on the region. Step S3: Locate candidate synaptic regions in the segmentation probability map, extract local three-dimensional sub-volumes containing the presynaptic membrane dense region and the postsynaptic dense region for each candidate region, input them into the synaptic classification network to determine the excitatory or inhibitory synapse type, and output the synaptic spatial coordinates and the identifiers of the presynaptic and postsynaptic neurons to which they belong. Step S4: Perform three-dimensional topological refinement on the segmentation results of step S2 to extract the neuronal morphological skeleton tree. Based on the synaptic position constraint, maintain the one-to-one correspondence between the skeleton endpoints and synapses. Perform branch level labeling and morphological parameter quantization on the skeleton tree. When a topological anomaly is detected, generate a topological correction feedback signal and pass it to step S2 to constrain and correct the local segmentation region that produces the topological anomaly. Step S5: Based on the synapse detection results of step S3 and the neuronal morphological skeleton tree of step S4, construct a synaptic connection matrix between neurons with each neuron as a graph node and synaptic connections as directed edges, and perform graph theory analysis on the synaptic connection matrix to extract the topological features of the connection group.

2. The method according to claim 1, characterized in that, In step S1, the thickness of the continuous ultrathin slices is 30nm to 50nm, and the planar resolution is 4nm / pixel to 10nm / pixel; the feature point matching uses a descriptor based on scale-invariant feature transformation to detect corresponding points between adjacent slices, and the number of matching point pairs is not less than 200 pairs; the non-rigid deformation field is obtained using a dense optical flow estimation algorithm based on a multi-scale pyramid structure, and the registration accuracy is less than 5 pixels.

3. The method according to claim 1, characterized in that, In step S2, the input size of the three-dimensional deep convolutional neural network is 128×128×64 voxels. The multi-scale residual attention module includes parallel 3×3×3 convolutional branches and 5×5×5 convolutional branches, as well as a channel attention mechanism. The network's encoding path includes four downsampling stages, with the number of feature channels being 32, 64, 128, and 256, respectively. The segmentation accuracy of each subcellular structure category in the segmentation probability map is greater than 88%.

4. The method according to claim 1, characterized in that, In step S3, the synaptic candidate region is located by detecting regions in the segmentation probability map where the gray-level gradient peak between adjacent neuron labels exceeds a preset gradient threshold; the size of the local three-dimensional sub-volume is 64×64×32 voxels; the synaptic classification network is a binary classification network based on a three-dimensional residual attention structure, with a detection sensitivity greater than 85% and a specificity greater than 82%.

5. The method according to claim 1, characterized in that, The segmentation confidence feedback signal in step S2 is generated as follows: the probability value of each voxel in the segmentation probability map belonging to its assigned category is calculated, and voxels with probability values ​​lower than the confidence threshold are marked as low-confidence regions. The confidence threshold is set between 0.7 and 0.

85. The spatial coordinates of the low-confidence regions are fed back to step S1 to drive a secondary registration operation with increased optical flow iterations to be performed on the local image block where the low-confidence regions are located.

6. The method according to claim 1, characterized in that, In step S4, when performing three-dimensional topological refinement on the segmentation results to extract the neuronal morphological skeleton tree, a three-dimensional topological refinement algorithm based on distance transformation is adopted. Specifically, it includes: calculating the three-dimensional Euclidean distance transformation of the segmentation results to obtain the distance field, peeling voxels one by one in order of increasing distance field value, judging the topological conditions of the twenty-six neighborhoods of each candidate voxel to maintain the connectivity of the one-dimensional skeleton during the peeling process, and setting peeling prohibition constraints in the region near the synapse to maintain the one-to-one correspondence between the skeleton endpoints and the synapses.

7. The method according to claim 1, characterized in that, The topology anomaly detection in step S4 includes: detecting whether there are isolated loop structures and pseudo branches with a hanging length of less than a preset hanging threshold in the skeleton tree, wherein the preset hanging threshold is set between 0.3μm and 0.8μm; when the isolated loop structure or the pseudo branch is detected, determining its corresponding spatial region in the three-dimensional image volume data, and generating the topology correction feedback signal.

8. The method according to claim 1, characterized in that, The morphological parameter quantification in step S4 includes: extracting the total dendritic length, branch length at each level, branch level, branch angle, dendritic spine density, and axon orientation angle for each neuron's skeleton tree; wherein the branch level is labeled using the Strahler grading method, which recursively advances from the center of the cell body to the terminal.

9. The method according to claim 1, characterized in that, The connection graph construction and analysis in step S5 specifically includes: using the skeleton tree of each neuron as a graph node, and using each synaptic connection detected in step S3 as a directed edge, wherein the direction of the directed edge is from the presynaptic neuron to the postsynaptic neuron, and the weight of the directed edge is the area of ​​the postsynaptic dense region of the corresponding synapse; calculating the in-degree, out-degree, clustering coefficient, and shortest path length of each neuron node in the synaptic connection matrix, and performing modular analysis of the connection graph using a community detection algorithm.

10. A three-dimensional reconstruction and connectome analysis system for neuronal morphology of brain tissue, used to implement the method described in any one of claims 1-9, characterized in that, include: The inter-layer registration module is configured to acquire a stack of electron microscopy images of continuous ultrathin slices of brain tissue, extract and match feature points of adjacent slice images, estimate inter-layer affine transformation parameters based on the matched feature point pairs, and obtain a non-rigid deformation field through optical flow field estimation based on the affine transformation. The non-rigid deformation field is used to perform sub-pixel level registration of adjacent slice images to obtain spatially aligned three-dimensional image volume data. The subcellular structure segmentation module is configured to input the spatially aligned 3D image volume data into a 3D deep convolutional neural network based on an encoder-decoder architecture, perform pixel-level semantic segmentation of cell bodies, dendrites, axons, and dendritic spines, and output a segmentation probability map. At the same time, based on the confidence distribution of the segmentation probability map, a segmentation confidence feedback signal is generated and transmitted to the interlayer registration module to perform secondary registration on low-confidence regions. The synapse detection and classification module is configured to locate synapse candidate regions in the segmentation probability map, extract local three-dimensional sub-volumes for each synapse candidate region and input them into the synapse classification network to determine the type of excitatory or inhibitory synapse, and output the spatial coordinates of each synapse and the identifiers of its presynaptic neuron and postsynaptic neuron. The topology-aware skeletonization module is configured to perform three-dimensional topology refinement operations on the segmentation results to extract the morphological skeleton tree of neurons, maintain the one-to-one correspondence between the skeleton endpoints and synapses based on synaptic position constraints, and perform branch level labeling and morphological parameter quantification on the skeleton tree. When a topological anomaly is detected, a topology correction feedback signal is generated and transmitted to the subcellular structure segmentation module for local constraint correction. The connectome construction and analysis module is configured to construct a synaptic connection matrix between neurons based on synapse detection results and neuronal morphological skeleton trees, with each neuron as a graph node and synaptic connections as directed edges of the graph, and perform graph theory analysis on the synaptic connection matrix to extract connectome topological features.