Mode animal brain stereotactic system with automatic leveling function, automatic leveling method and target brain region positioning method
By automatically identifying and adjusting the posture of the mouse skull using a multi-view vision module and an electric leveling drive module, the problems of inconsistent surgical procedures and long operating times in existing technologies have been solved, enabling efficient and accurate stereotactic brain surgery.
Patent Information
- Application Number
- CN202611393583.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-27
AI Technical Summary
In stereotactic surgery of model animals, especially mouse brain stereotactic surgery, existing technologies have difficulty ensuring the consistency and precision of surgical procedures. The leveling process relies on manual operation, which is time-consuming and prone to errors.
By combining a multi-view vision module and an electric leveling drive module with a computer controller, the system automatically identifies key anatomical structures of the skull, adjusts the skull posture by driving three fixed rods to achieve automatic leveling, and uses a multi-degree-of-freedom motion mechanism to locate the target brain region.
It significantly reduces reliance on operator experience, shortens preoperative preparation time, improves surgical accuracy and consistency, reduces manual annotation workload, and improves the efficiency of identifying mouse brain anatomical structures.
Smart Images

Figure CN123166804A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided medical technology, specifically to a stereotactic system for the brain of a model animal with automatic leveling function, an automatic leveling method, and a method for locating the target brain region, used in basic medical research experiments. Background Technology
[0002] In the clinical field, neurosurgical robots have significantly enhanced surgeons' ability to precisely locate and orient the brain. However, in basic medical science, most brain surgeries performed on model animals still rely on manual techniques. Typically, in stereotactic brain surgery on mice, the small size of the mice and their correspondingly smaller tissue structures make the surgery even more challenging. Furthermore, to obtain statistically significant results, model animal surgeries usually need to be performed multiple times under identical conditions. Maintaining consistent procedures across multiple experiments is challenging even for researchers performing purely manual procedures, requiring long-term, continuous training. For mouse stereotactic brain surgery, a skilled operator can handle one mouse in 1-2 hours; for beginners, the time required is even longer, and there is a risk of mouse death. Ensuring consistency in surgical procedures is also more difficult.
[0003] Currently, stereotactic brain surgery in model animals (mice) mainly consists of five steps: retrieving brain atlases to determine the injection target, fixation, craniotomy, leveling, and stereotactic injection. Among these, accurately placing drugs or electrodes into the mouse brain requires leveling the mouse to ensure that the brain's pose in physical space matches the pose of the brain region in the standard atlas. Leveling is performed under a microscope. First, the anterior fontanelle is set as the reference zero point. Then, using the anterior fontanelle as the origin, the needle is moved equidistantly to the left and right, and the Z-axis coordinate is read to check if the difference is within a specified range (typically 0.03 mm). If not, the left and right ear rods need to be adjusted, and the needle is read again until the error is within a reasonable range. The leveling process is the same for both ends, and each operator has their own leveling standard, making consistency difficult to guarantee. Furthermore, the leveling process is tedious, and even slight deviations require re-zeroing.
[0004] Existing technologies have provided various mouse positioning injection devices. Patent application (CN121845793A) discloses a multi-needle mouse positioning injection device. Patent application (CN121774675A) discloses a modular operating table device for animal electrode implantation, enabling automated implantation of intracranial implants in small rodents. Patent application (CN120458767A) discloses a stereotaxic instrument with automatically adjustable XYZ axes, which achieves automatic adjustment of the three-dimensional position of surgical tools through an XYZ axis motor-driven tool clamping assembly. The aforementioned existing technologies primarily rely on manual observation and operation for adjusting the mouse brain posture, making it difficult to guarantee consistent surgical precision.
[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] Purpose of the invention: The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a stereotactic system for the brain of a model animal with automatic leveling function, an automatic leveling method, and a method for locating the target brain region.
[0007] To address the aforementioned technical problems, this invention discloses a stereotactic system for the brain of a model animal with an automatic leveling function. The system includes:
[0008] A multi-view vision module is used to acquire images of the skulls of model animals;
[0009] An animal brain leveling device includes an animal brain fixation bed and an electric leveling drive module. The animal brain fixation bed includes a fixation bed base and three fixation rods. One end of each of the three fixation rods is used to contact the head of a model animal to form three non-collinear support contact points. Two of the support contact points are opposite each other in the sagittal plane of the skull, and the other contact point is positioned in front. The other ends are connected to the fixation bed base through a fixation rod adjustment mechanism. The electric leveling drive module is configured to correspond one-to-one with each of the fixation rods and is driven and connected one-to-one with the fixation rod adjustment mechanism of each fixation rod. It is used to independently drive the corresponding fixation rod to move vertically to adjust the posture of the model animal's skull.
[0010] The computer controller is connected to the multi-view vision module and the electric leveling drive module. The computer controller has a built-in trained network model for detecting key anatomical structures of the skull and stores a set of 3D coordinates of key anatomical structures in the world coordinate system under a preset reference pose.
[0011] The computer controller is configured to: calculate the roll angle deviation, pitch angle deviation, and height deviation between the current skull pose and the preset reference pose based on the two-dimensional coordinates of the key anatomical structure points of the skull output by the key anatomical structure point detection network model of the skull, and according to the decoupling relationship of mapping the roll angle deviation to the opposite displacement of the two relative fixed rods, the pitch angle deviation to the displacement of the front fixed rod, and the height deviation to the same direction displacement of the three fixed rods, and to control the three electric leveling drive modules in a closed loop to drive the three fixed rods to move only in the vertical direction, and to iteratively execute image acquisition, key point recognition, deviation calculation, and fixed rod driving until each deviation converges, so as to automatically adjust the skull of the model animal to the preset reference pose.
[0012] Furthermore, the system also includes a surgical execution module and a multi-degree-of-freedom motion mechanism. The surgical execution module is installed at the motion output end of the multi-degree-of-freedom motion mechanism, which is communicatively connected to the computer controller and is used to adjust the position of the surgical execution module under the control of the computer controller.
[0013] Specifically, the animal brain fixation bed has three fixation rods, with the ends of the two opposite fixation rods being pointed, which are used to fix the left and right ear openings of the model animal, respectively; the end of the front fixation rod is provided with a nose clip, which is used to fix the upper palate of the model animal.
[0014] Specifically, the multi-view vision module includes at least two microscope cameras and at least two global cameras. The at least two microscope cameras are fixedly spaced apart to form a first binocular stereo imaging system, and the at least two global cameras are fixedly spaced apart to form a second binocular stereo imaging system. The imaging axes of all cameras intersect at the same point.
[0015] Specifically, the fixed rod adjustment mechanism includes a screw-slider mechanism, the fixed rod is connected to the fixed bed base through the screw-slider mechanism, the screw-slider mechanism is provided with a second adjustment knob, when the second adjustment knob is rotated the fixed rod moves in the vertical direction, the electric leveling drive module includes a drive motor and a transmission mechanism, the drive motor is detachably coupled to the second adjustment knob through the transmission mechanism; the drive motor is equipped with an encoder, the encoder records the lifting displacement of the fixed rod, or the drive motor records the lifting displacement of the fixed rod by recording the number of movement steps;
[0016] Specifically, the surgical execution module includes a module base, a high-precision closed-loop linear motion slide, and a quick-release flange. One end of the high-precision closed-loop linear motion slide is mounted on the module base, and the other end is mounted on the quick-release flange. The quick-release flange is used to install surgical tools, which are selected from any one or a combination of two or more of electric drills, brain electrodes, probes, and injection needles.
[0017] The present invention also provides an automatic leveling method for the aforementioned model animal brain stereotactic system, the method comprising the following steps:
[0018] S110, The head of the model animal is placed on the animal brain fixation bed of the animal brain leveling device, and the head is fixed by contacting the head of the model animal with three fixing rods.
[0019] S120, use the multi-view vision module to acquire images of the skull of the model animal;
[0020] S130, The trained skull key anatomical structure point detection network model receives the image and outputs the two-dimensional coordinates of at least three non-collinear key anatomical structure points of the model animal skull in the image.
[0021] S140, the computer controller calculates the 3D coordinates of each key anatomical structure point in the camera coordinate system according to the two-dimensional coordinates using a binocular stereo vision reconstruction algorithm, and transforms the 3D coordinates to a preset world coordinate system based on the skull anatomy of the model animal, thereby obtaining the set of 3D coordinates of the key anatomical structure points in the world coordinate system under the current skull pose.
[0022] S150, the computer controller decenters the 3D coordinate set of the key anatomical structure points in the world coordinate system under the current pose and the 3D coordinate set of the key anatomical structure points in the world coordinate system under the preset reference pose, respectively. Based on the two decentered point sets, it solves the optimal rotation matrix and translation vector from the current pose to the preset reference pose. The roll angle deviation and pitch angle deviation are obtained by decomposing the optimal rotation matrix, and the height deviation is extracted from the translation vector. The height deviation is the component of the translation vector in the vertical direction of the world coordinate system.
[0023] S160, the computer controller maps the roll angle deviation to the opposite displacement of the two opposite fixed rods in the vertical direction, maps the pitch angle deviation to the displacement of the front fixed rod in the vertical direction, and maps the height deviation to the same displacement of the three fixed rods in the vertical direction. Based on each displacement, the electric leveling drive module is controlled to drive the corresponding fixed rod to move.
[0024] S170, repeat S120 to S160 until the roll angle deviation, the pitch angle deviation and the altitude deviation all converge to their respective preset threshold ranges.
[0025] Specifically, there are 14 key anatomical points, including the anterior fontanelle, posterior fontanelle, anterior left fontanelle, anterior right fontanelle, top point, coronal left middle, coronal right middle, posterior left fontanelle, posterior right fontanelle, left occipital suture, right occipital suture, bottom point, left edge middle, and right edge middle.
[0026] Specifically, the training process of the skull key anatomical structure point detection network model includes:
[0027] S210. Obtain the original multi-view image sample dataset of the skull of the model animal;
[0028] S220. Perform feature extraction and matching, sparse reconstruction and dense reconstruction on the original multi-view image sample dataset to obtain camera parameters and projection matrix;
[0029] S230. Select a portion of images from the original multi-view image sample dataset for manual annotation to obtain the multi-view two-dimensional observation coordinates of key anatomical structures of the skull. Combine the camera parameters and projection matrix, calculate the optimal 3D coordinates of the key anatomical structures of the skull by fusing the geometric constraints of different views and minimizing the reprojection error using the linear least squares method.
[0030] S240. Based on the optimal 3D coordinates of the key anatomical structures of the skull and the projection matrix, the remaining images in the original multi-view image sample dataset are automatically labeled using the back projection principle to obtain the two-dimensional coordinates of each key anatomical structure point of the skull in all view images, and a 2D key anatomical structure point labeled dataset is constructed.
[0031] S250. Perform data augmentation processing on the original images of the 2D key anatomical structure point annotation dataset to generate corresponding augmented images; group the original images and their augmented images into training set, validation set and test set according to the source of the original images;
[0032] S260. The partitioned dataset is fed into the improved YOLOv8-pose model for training. At the same time, rigid registration constraints are added during the model training stage to finally obtain the trained skull key anatomical structure point detection network model.
[0033] The construction process of the improved YOLOv8-pose model is as follows: using YOLOv8-pose as the base network, the number of keypoints in the model output is set to 14, and each keypoint includes the horizontal coordinate, the vertical coordinate, and the visibility parameter; based on YOLOv8-pose, an improved cross-channel interactive efficient channel attention module based on ECA and a variable content guided attention module including SE and CBAM are introduced to obtain the improved YOLOv8-pose model; the cross-channel interactive efficient channel attention module is set after the SPPF module of the YOLOv8-pose model backbone network, and the three variable content guided attention modules are respectively set in the three feature branches of the neck network of the YOLOv8-pose model at different scales.
[0034] Specifically, the origin of the world coordinate system is defined as the anterior fontanelle, the X-axis of the world coordinate system is the direction from the anterior fontanelle to the posterior fontanelle, the Z-axis of the world coordinate system is the direction from the left anterior fontanelle to the right anterior fontanelle after orthogonalization and normalization, and the Y-axis of the world coordinate system is determined according to the definition of the right-hand coordinate system.
[0035] Specifically, in S160, the method of mapping each of the deviations to a displacement and controlling the electric leveling drive module according to each of the displacements includes:
[0036] Multiplying the roll angle deviation by the length of the rotating arm corresponding to one of the two opposing fixed rods yields the first vertical displacement of that fixed rod; multiplying the roll angle deviation by the length of the rotating arm corresponding to the other of the two opposing fixed rods yields the second vertical displacement of that fixed rod, wherein the first displacement is in the opposite direction to the second displacement; multiplying the pitch angle deviation by the length of the rotating arm corresponding to the front fixed rod yields the third vertical displacement of that fixed rod; wherein the length of the rotating arm corresponding to each fixed rod is the distance from the rotation center of the model animal's head to the contact point between the fixed rod and the model animal's head;
[0037] Each displacement is converted into the corresponding driving amount of the electric leveling drive module, and a proportional control or incremental PID control algorithm is used to determine the actual output of the electric leveling drive module in each adjustment cycle based on the driving amount.
[0038] In S170, when the roll angle deviation, the pitch angle deviation, and the height deviation all fall within the corresponding preset threshold range, the leveling is determined to be complete.
[0039] In one embodiment, in S170, when the absolute values of the roll angle deviation and the pitch angle deviation are both less than 0.5° and the absolute value of the height deviation is less than 0.15mm, the leveling is determined to be complete.
[0040] This invention also provides a method for locating a target brain region using a stereotactic system for model animals. The method employs the aforementioned stereotactic system for model animals and is executed after the skull of the model animal reaches the preset reference pose. The method includes the following steps:
[0041] A world coordinate system is established with the anterior fontanelle as the origin among the key anatomical structures, and the target coordinates of the target brain region in the world coordinate system are determined based on stereotactic brain atlas data or personalized imaging data.
[0042] The multi-degree-of-freedom motion mechanism of the system drives the surgical execution module to move to the target coordinates.
[0043] Beneficial effects:
[0044] 1. Existing stereotactic devices for mouse brains primarily rely on manual operation throughout the entire process, requiring repeated measurements of key anatomical structures and adjustments to the mouse's cranial posture. This is cumbersome, time-consuming, and demands a high level of operator experience and precision. The automatic leveling method provided by this invention achieves automatic correction of the skull posture solely through the vertical raising and lowering of three fixed rods: the system reconstructs the three-dimensional coordinates of key anatomical points of the skull using binocular vision, solves for posture deviations through decentralized registration (the solution process does not require calibration of the rotation center); then, the deviations in the roll, pitch, and height directions are converted into opposite displacements of the left and right fixed rods, unidirectional displacement of the bite rod, and unidirectional displacements of the three fixed rods, respectively, driven by a motor; after each adjustment, the system re-images and re-measures, iterating in a closed loop until the skull posture reaches the preset reference posture. The entire leveling process requires no manual intervention, significantly reducing reliance on operator experience, shortening preoperative preparation time, and can be modified from existing stereotactic devices, directly adapting to routine mouse stereotactic surgery scenarios, greatly reducing the operational threshold and training costs.
[0045] 2. The target brain region localization method of the stereotactic system for model animals provided by this invention is implemented using the stereotactic system for model animals. It is executed after the automatic leveling method is completed. At this point, the skull pose is matched with the spatial orientation of the acquired stereotactic brain map, allowing direct extraction of the map coordinates of the target brain region without manual map lookup, conversion, or repeated alignment. Then, the multi-degree-of-freedom motion mechanism and surgical execution module automatically complete drilling, electrode implantation, and other operations. This eliminates coordinate transformation errors introduced by inconsistent manual leveling, improves the accuracy, consistency, and repeatability of target brain region localization among different experimental animals, and shortens the surgical time.
[0046] 3. In the test, the method of this invention captured images of more than 70 mice. After extracting frames from the video of each mouse, an average of more than 100 valid images were generated. Traditional manual annotation requires annotating key points of each image, which takes about 2 minutes per image. In the automatic identification method of mouse brain anatomy proposed in this invention, a pre-trained skull key anatomical structure point detection network model is used to determine the target key anatomical structure points and output the corresponding image coordinates. At the same time, this invention uses annotation software independently developed based on MATLAB to achieve batch automatic annotation of key anatomical structure points in other multi-view images through a small amount of manual annotation (only 5-8 images per mouse), 3D coordinate calculation and back projection. This reduces the workload of manual annotation and significantly improves the efficiency of annotating key anatomical structure points of mice, thereby quickly and effectively identifying mouse brain anatomy. Attached Figure Description
[0047] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0048] Figure 1 A stereoscopic structural diagram of a model animal brain stereotactic system with automatic leveling function provided for the first embodiment of the present invention. Figure 1 .
[0049] Figure 2 for Figure 1 The diagram shows a stereoscopic structure of a model animal brain stereotactic system with automatic leveling function. Figure 2 .
[0050] Figure 3 for Figure 1 The diagram shows a stereoscopic structure of a model animal brain stereotactic system with automatic leveling function. Figure 3 .
[0051] Figure 4 for Figure 1 The diagram shows a computer controller for a stereotactic system for the brain of a model animal with automatic leveling function.
[0052] Figure 5 for Figure 4 The UI interface of the computer controller is shown.
[0053] Figure 6 This is a schematic diagram of the structure of the animal brain leveling device provided in the first embodiment of the present invention.
[0054] Figure 7 This is a schematic diagram of the electric leveling drive module structure provided in the first embodiment of the present invention.
[0055] Figure 8 This is a schematic diagram of the surgical execution module provided in the first embodiment of the present invention.
[0056] Figure 9 for Figure 8 The diagram shows the movement of the surgical execution module driving the surgical tools, where (a) is the translational movement along the X-axis, (b) is the translational movement along the Y-axis, and (c) is the translational movement along the Z-axis.
[0057] Figure 10 The flowchart of the animal brain balancing algorithm provided for the first embodiment of the present invention is shown.
[0058] Figure 11 Description of key anatomical points of the mouse brain provided for the first embodiment of the present invention.
[0059] Figure 12This is a schematic diagram of a mouse mounted on an animal brain leveling device according to the first embodiment of the present invention.
[0060] Figure 13 This is a schematic diagram of the principle of the animal brain leveling control mechanism provided in the first embodiment of the present invention.
[0061] Figure 14 The convergence plot of animal brain pose leveling error: (a) is the angular error of the current position from the reference position, and (b) is the number of rotations required for each wheel of the drive motor.
[0062] Figure 15 This is a schematic diagram of the training of a key anatomical structure point detection network model provided for the first embodiment of the present invention.
[0063] Figure 16 The diagram shows the improved model architecture provided in the first embodiment of the present invention, wherein (a) is the improved YOLOv8-pose model structure diagram, (b) is the schematic diagram of the principle of the cross-channel interactive high-efficiency channel attention module, and (c) is the structure diagram of the variable content guided attention module.
[0064] Figure 17 This is a schematic diagram of the model training results provided in the first embodiment of the present invention.
[0065] Figure 18 A physical diagram of the system provided for the first embodiment of the present invention. Detailed Implementation
[0066] The reference numerals in the accompanying drawings of this invention are explained as follows: 100, multi-view vision module; 110, microscope camera; 120, global camera; 130, camera angle adjustment device; 131, sliding sleeve; 132, cylindrical camera support frame; 133, camera bracket; 140, vertical support rod; 200, animal brain leveling device; 210, animal brain fixing bed; 211, fixing bed base; 212, fixing rod; 212a, left ear rod; 212b, right ear rod; 212c, biting rod; 213, fixing rod adjustment mechanism; 220, electric leveling drive module; 221, drive motor. 222, Transmission mechanism; 2221, Driving gear; 2222, Driven gear; 300, Multi-degree-of-freedom motion mechanism; 310, Base; 320, Z-axis surgical tool lifting mechanism; 330, X-axis surgical tool transverse movement mechanism; 340, Y-axis animal bed longitudinal movement mechanism; 400, Surgical execution module; 410, Module base; 420, Closed-loop linear motion slide; 430, Quick-release flange; 440, Surgical tool; 500, Computer controller; 510, UI interface; 2131, Slider; 2132, Screw; 2133, Second adjustment knob.
[0067] Example 1 (Automatic Leveling)
[0068] Part 1: System Structure
[0069] The mouse in this embodiment corresponds to the model animal of the present invention, and the mouse brain corresponds to the model animal brain of the present invention; the X-axis direction of the multi-degree-of-freedom motion mechanism refers to the direction parallel to the left / right ear rod, the Y-axis direction refers to the direction parallel to the biting rod, and the Z-axis direction refers to the direction perpendicular to the fixed bed base.
[0070] Most related technologies obtain the spatial location of key anatomical structures in the mouse brain through contact measurements. This requires manually rotating multiple knobs to adjust the mouse's cranial posture, and the measurement and adjustment process needs to be repeated multiple times, which is time-consuming, labor-intensive, and makes it difficult to ensure consistency during the surgical procedure. While related technology CN118845252A utilizes laser ranging to automate height measurement and leveling, it still relies on the experimenter's visual observation or manual rotation of the mounting bracket to align the laser with the Bregma / Lambda, failing to achieve fully automated execution of the entire process.
[0071] Based on this, embodiments of the present invention provide a stereotactic system for the brain of a model animal with automatic leveling function. For example... Figures 1 to 5 As shown, the system includes a multi-view vision module 100, an animal brain leveling device 200, a multi-degree-of-freedom motion mechanism 300, and a computer controller 500.
[0072] The multi-view vision module 100 is used to acquire images of the skull of the model animal.
[0073] The animal brain leveling device 200 includes an animal brain fixation bed 210 and an electric leveling drive module 220. The animal brain fixation bed 210 includes a fixation bed base 211 and three fixation rods 212. The fixation bed base 211 is used to support the model animal. One end of each of the three fixation rods 212 is used to contact the head of the model animal to form three non-collinear support contact points. Two of the support contact points are opposite each other on the left and right sides of the sagittal plane of the model animal's skull, and the other contact point is in front. The other end is connected to the fixation bed base 211 through a fixation rod adjustment mechanism 213. The electric leveling drive module 220 is arranged one-to-one with the fixation rods 212 and is driven and connected one-to-one with the fixation rod adjustment mechanism 213 of each fixation rod 212. It is used to independently drive the corresponding fixation rod 212 to move in the vertical direction to adjust the posture of the model animal's skull.
[0074] The multi-degree-of-freedom motion mechanism 300 is used to adjust the position of the surgical execution module 400.
[0075] The computer controller 500 is communicatively connected to the multi-view vision module 100, the electric leveling drive module 220, the multi-degree-of-freedom motion mechanism 300, and the surgical execution module 400. The computer controller 500 has a built-in trained network model for detecting key anatomical structures of the skull and stores a set of 3D coordinates of key anatomical structures in the world coordinate system under a preset reference pose.
[0076] The computer controller 500 is configured to: calculate the roll angle deviation, pitch angle deviation, and height deviation between the current skull pose and the preset reference pose based on the two-dimensional coordinates of the key anatomical structure points of the skull output by the key anatomical structure point detection network model of the skull. According to the decoupling relationship of mapping the roll angle deviation to the opposite displacement of the two relative fixed rods, the pitch angle deviation to the displacement of the front fixed rod, and the height deviation to the same direction displacement of the three fixed rods, the three electric leveling drive modules 220 are closed-loop controlled to drive the three fixed rods 212 to move only in the vertical direction. The image acquisition, key point recognition, deviation calculation and fixed rod driving are iteratively executed until each deviation converges, and the skull of the model animal is automatically adjusted to the preset reference pose.
[0077] like Figure 1 As shown, the multi-degree-of-freedom motion mechanism 300 consists of several components with translational and / or rotational degrees of freedom, having at least three degrees of freedom (X, Y, Z), and can also be composed of more degrees of freedom. The multi-degree-of-freedom motion mechanism 300 includes a base 310 and a motion end effector. The animal brain leveling device 200 is mounted on the base 310 of the multi-degree-of-freedom motion mechanism 300, and the surgical execution module 400 is mounted on the motion end effector of the multi-degree-of-freedom motion mechanism 300, thereby enabling the pose movement and setting of the surgical execution module 400 relative to the animal brain leveling device 200. The multi-view vision module 100 is also mounted on the base 310 of the multi-degree-of-freedom motion mechanism 300. Its position and orientation can be adjusted by rotation or translation mechanisms to obtain the optimal measurement angle while avoiding collisions with other mechanisms. The computer controller 500 is electrically connected to the multi-degree-of-freedom motion mechanism 300, the multi-view vision module 100, the animal brain leveling device 200, and the surgical execution module 400, respectively.
[0078] like Figure 1As shown, the multi-view vision module 100 consists of two microscopic cameras 110 and two global cameras 120. The two microscopic cameras 110 are used to acquire high-resolution local images of key anatomical structures in the mouse skull, which are then used for key anatomical structure identification and 3D coordinate reconstruction. The two global cameras 120 are used to acquire global scene images including the mouse head, the animal brain fixation bed 210, and the surgical instruments 440, to monitor the relative position of the mouse head and the surgical instruments, and to assist in adjusting the camera angle when the microscopic camera's field of view is obstructed or deviates from the target area. They do not participate in the quantitative reconstruction of the 3D coordinates of key anatomical structures. The positions of the two microscopic cameras 110 and the two global cameras 120 are kept fixed, forming a stereoscopic imaging system. A vertical support rod 140 is fixed on the base 310 of the multi-degree-of-freedom motion mechanism 300. Four cameras are fixed on the vertical support rod 140 via a camera angle adjustment device 130. The camera angle adjustment device 130 can adjust the camera angles of the four cameras to ensure that the imaging axes of all cameras intersect at a single point, guaranteeing that all four cameras can simultaneously and clearly observe the scene near the intersection of the imaging axes. Specifically, in this embodiment, the two microscopic cameras 110 are electronic digital microscopes of the SuperEye B013 model with L-100 magnification 100x lenses, and the two global cameras 120 are industrial global cameras of the XW800 model. All four cameras are connected to the computer controller 500 via USB cables to transmit mouse skull images to the computer controller 500 in real time. The positions of the two microscopic cameras 110 and the two global cameras 120 are also kept relatively fixed.
[0079] Specifically, such as Figure 2 As shown, the camera angle adjustment device 130 includes a sliding sleeve 131, a cylindrical camera support frame 132, and a camera bracket 133. The sliding sleeve 131 is nested on a vertical support rod 140 and can move up and down along the vertical support rod 140 and is locked by fastening screws. The cylindrical camera support frame 132 is fixedly connected to the sliding sleeve 131 along a direction parallel to the left / right lugs, serving as the mounting base for the camera bracket 133. The camera bracket 133 is fitted onto the cylindrical camera support frame 132 and can rotate around the cylindrical camera support frame 132 and is locked by fastening screws. Two microscopic cameras 110 are fixed on one side of the camera bracket 133, and two global cameras 120 are fixed on the other side of the camera bracket 133. It can be understood that the cylindrical camera support frame 132 and the camera bracket 133 constitute the aforementioned rotation mechanism; the sliding sleeve 131 and the vertical support rod 140 constitute the aforementioned translation mechanism.
[0080] like Figure 6 and Figure 7As shown, the fixed rod adjustment mechanism 213 is a screw-slider mechanism and is installed on the fixed bed base 211. The fixed rod 212 is locked to the slider 2131 of the screw-slider mechanism by a first adjustment knob. The first adjustment knob is used to adjust the extension length of the fixed rod 212. A second adjustment knob 2133 is coaxially fixed to the top of the screw 2132 of the screw-slider mechanism. When the second adjustment knob 2133 is rotated, the screw 2132 of the screw-slider mechanism rotates, driving the slider 2131 to move vertically along the screw 2132. The fixed rod 212 and the slider 2131 move synchronously in the vertical direction. The electric leveling drive module 220 includes a drive motor 221 and a transmission mechanism 222. The drive motor 221 is detachably coupled to the second adjustment knob 2133 through the transmission mechanism 222. The drive motor 221 is equipped with an encoder for recording the lifting displacement of the fixed rod 212.
[0081] As one optional embodiment of the transmission mechanism 222, the transmission mechanism 222 includes a driving gear 2221 fixed to the output shaft of the drive motor 221 and a driven gear 2222 coaxially fixed to the second adjusting knob 2133. The driving gear 2221 and the driven gear 2222 can be controllably engaged or disengaged; when engaged, the drive motor 221 drives the second adjusting knob 2133 and the screw 2132 to rotate, thereby driving the fixed rod 212 to rise and fall. The controllable engagement or disengagement of the driving gear 2221 and the driven gear 2222 can be achieved using existing technologies and is not a major improvement of this invention, therefore it will not be described in detail here.
[0082] In use, the height adjustment of the fixed rod 212 can be done manually or electrically. In manual mode, the second adjustment knob 2133 is rotated to drive the screw 2132 to rotate, which in turn drives the slider 2131 and the fixed rod 212 to move vertically. In electric mode, the drive motor 221 of the electric leveling drive module 220 drives the second adjustment knob 2133 and the screw 2132 to rotate via the transmission mechanism 222, thereby driving the fixed rod 212 to rise and fall.
[0083] The electric leveling drive module 220 is a drive motor rotation mechanism that can generate a fixed amount of rotational motion. This module can be detachably coupled with the second adjustment knob 2133 on the animal brain fixation bed 210 for adjusting the raising and lowering of the fixation rod 212. In the coupled state, the second adjustment knob 2133 is driven to rotate electrically to raise and lower the individual fixation rod 212. In the detached state, manual adjustment can be performed.
[0084] For the drive motor 221 containing a rotation angle measuring encoder, in the coupled state, the adjusted height can be obtained by measuring the encoder of the drive motor 221 regardless of whether the adjustment is manual or electric; for the stepper motor, the lifting displacement of the fixed rod 212 can also be calculated by recording the number of movement steps. The drive motor 221 can be an open-loop stepper motor or a closed-loop motor.
[0085] Thus, the animal brain fixation bed 210 and the electric leveling drive module 220 form a small animal brain fixation and leveling device. The posture angle of the mouse's skull can be adjusted simply by adjusting the height of the fixing rod 212.
[0086] like Figure 8 and Figure 9 As shown, the surgical execution module 400 includes a module base 410, a high-precision closed-loop linear motion slide 420, a quick-release flange 430, and a surgical tool 440. The surgical tool 440 can be an electric drill, brain electrodes, probes, or other surgical instruments, depending on the needs. One end of the high-precision closed-loop linear motion slide 420 is mounted on the module base 410, and the other end is mounted on the quick-release flange 430; the surgical tool 440 is mounted on the quick-release flange 430. The surgical execution module 400 is mounted entirely on the multi-degree-of-freedom motion mechanism 300, enabling multi-degree-of-freedom spatial motion. Simultaneously, the built-in high-precision closed-loop linear motion slide 420 can drive the surgical tool 440 to perform precise linear movements. The distance traveled by the high-precision closed-loop linear motion slide 420 can be measured by its built-in closed-loop system. Therefore, when the surgical tool 440 is replaced with an instrument with measurement and control feedback functions, such as a probe, the device can also determine the height of the target through the contact of the probe.
[0087] In this embodiment of the invention, the surgical tool 440 is selected from any one of an electric drill, brain electrodes, probes, and injection needles. A high-precision closed-loop linear motion slide 420 is used to drive the surgical tool 440 to move linearly along the Z-axis.
[0088] In this embodiment of the invention, the multi-degree-of-freedom motion mechanism 300 includes a Z-axis surgical tool lifting mechanism 320, an X-axis surgical tool lateral movement mechanism 330, and a Y-axis animal bed longitudinal movement mechanism 340. The Z-axis surgical tool lifting mechanism 320 is mounted on the base 310 of the multi-degree-of-freedom motion mechanism 300. The X-axis surgical tool lateral movement mechanism 330 is mounted on the output portion of the Z-axis surgical tool lifting mechanism 320, and is used to drive the X-axis surgical tool lateral movement mechanism 330 to move up and down in the Z-axis direction. The output portion of the X-axis surgical tool lateral movement mechanism 330 serves as the motion end of the multi-degree-of-freedom motion mechanism 300. The surgical execution module 400 is mounted on the output portion of the X-axis surgical tool lateral movement mechanism 330, and is used to drive the surgical execution module 400 to move left and right in the X-axis direction. The Y-axis animal bed longitudinal movement mechanism is mounted on the base 310 of the multi-degree-of-freedom motion mechanism 300. The fixation bed base 211 of the animal brain fixation bed 210 is mounted on the output part of the Y-axis animal bed longitudinal movement mechanism 340. The Y-axis animal bed longitudinal movement mechanism 340 is used to drive the animal brain fixation bed 210 to move back and forth in the Y-axis direction. The movements in the X, Y, and Z axes cooperate with each other to achieve three-dimensional adjustment of the relative position between the surgical tool 440 and the model animal's head.
[0089] In this embodiment of the invention, the computer controller 500 is provided with a UI interface 510 for interaction with the operator, such as... Figure 5 As shown. The UI interface 510 includes at least a "Set Reference Position" button, which is used to trigger the setting and recording process of the preset reference pose (see Part 5 for details); it also includes a real-time display area for the leveling process, which is used to display the recognition results of each key anatomical structure point, the roll angle deviation, pitch angle deviation and height deviation between the current pose and the preset reference pose, as well as the operating status of each electric leveling drive module.
[0090] Part Two: Automatic Leveling Method
[0091] This invention also provides an automatic leveling method S100 for the above-mentioned model animal brain stereotactic system, such as... Figure 10 As shown, it includes the following steps:
[0092] S110, the head of the model animal is placed on the animal brain fixation bed 210 of the animal brain leveling device 200, and the head is fixed by contacting the head of the model animal with three fixing rods 212.
[0093] S120, uses multi-view vision module 100 to acquire images of the skull of model animals;
[0094] S130, the trained network model for detecting key anatomical points of the skull receives an image and outputs the two-dimensional coordinates of at least three non-collinear key anatomical points of the skull of the model animal in the image.
[0095] S140, the computer controller 500 calculates the 3D coordinates of each key anatomical structure point in the camera coordinate system based on the two-dimensional coordinates using a binocular stereo vision reconstruction algorithm, and transforms the 3D coordinates of each key anatomical structure point in the camera coordinate system to the world coordinate system based on the skull anatomical structure of the model animal, thereby obtaining the set of 3D coordinates of the key anatomical structure points in the world coordinate system under the current skull pose.
[0096] S150, the computer controller 500 decenters the 3D coordinate set of the key anatomical structure points in the world coordinate system under the current pose and the 3D coordinate set of the key anatomical structure points in the world coordinate system under the preset reference pose, respectively. Based on the two decentered point sets, the optimal rotation matrix and translation vector from the current pose to the preset reference pose are solved. The roll angle deviation and pitch angle deviation are obtained by decomposing the optimal rotation matrix, and the height deviation is extracted from the translation vector.
[0097] S160, the computer controller 500 maps the roll angle deviation to the opposite vertical displacement of the two fixed rods 212 fixing the left and right ear holes, maps the pitch angle deviation to the vertical displacement of the fixed rod 212 fixing the upper jaw, and maps the height deviation to the same vertical displacement of the three fixed rods 212. Based on each displacement, the electric leveling drive module 220 drives the corresponding fixed rod 212 to move.
[0098] S170, repeat steps S120 to S160 until the roll angle deviation, pitch angle deviation, and height deviation all converge to their respective preset threshold ranges. This indicates that the current spatial posture of the skull has achieved spatial matching with the posture acquired from the standard brain stereotactic atlas or personalized imaging data. In this matching state, a surgical world coordinate system is established with a specified anatomical reference point, such as the anterior fontanelle, as the origin. At this time, the axis of this coordinate system is consistent with the coordinate system of the atlas / image, and the mapping coordinates of the target brain region can be directly extracted. The multi-degree-of-freedom motion mechanism 300 carries the surgical execution module 400 to perform subsequent stereotactic surgery tasks.
[0099] The implementation of this method relies on three preparatory tasks: (1) training of the network model for detecting key anatomical structures of the skull, used in step S130; (2) camera calibration of the multi-view vision module 100, used for the three-dimensional reconstruction in step S140; and (3) setting of the preset reference pose, recording of the 3D coordinate set of key anatomical structures under the preset reference pose in the world coordinate system, and solving of the world coordinate system transformation matrix, used for the coordinate transformation in step S140 and the deviation calculation in step S150. Among them, (1) and (2) are completed before the system is put into use, and (3) is completed before the start of each batch of surgery, which will be described in detail later.
[0100] like Figure 11 As shown in the embodiment of the present invention, the model animal is the mouse.
[0101] like Figure 12 As shown, in step S110, the ends of the two opposing fixing rods 212 are fixed to the left and right ear openings of the model animal, respectively. The end of the other front fixing rod 212 is equipped with a nose clip and is fixed to the upper jaw of the model animal through the nose clip. For ease of explanation, the fixing rod that fixes the left ear opening of the model animal is referred to as the left ear rod 212a, the fixing rod that fixes the right ear opening of the model animal is referred to as the right ear rod 212b, and the fixing rod with the nose clip is referred to as the biting rod 212c.
[0102] In step S130, the trained skull key anatomical structure point detection network model receives the image and outputs the two-dimensional coordinates of at least three non-collinear key anatomical structure points of the model animal skull in the image. The specific implementation is as follows:
[0103] Two images of the surgical area skull, one on the left and one on the right, acquired by two microscope cameras 110 in S120, are input into the trained skull key anatomical structure point detection network model. The model processes each image independently and outputs the two-dimensional coordinates of the mouse skull region and n key anatomical structure points in the image. The output of each key anatomical structure point includes the horizontal coordinate, the vertical coordinate, and the visibility parameter. The visibility parameter is used to mark whether the key point is visible in the current image. Key points marked as invisible do not participate in subsequent three-dimensional reconstruction and pose calculation.
[0104] In this embodiment, the total number of key anatomical points is 14, namely the anterior fontanelle, posterior fontanelle, anterior left fontanelle, anterior right fontanelle, top point, coronal left and right midpoint, posterior left fontanelle, posterior right fontanelle, left occipital suture, right occipital suture, bottom point, left edge midpoint, and right edge midpoint, as shown below. Figure 11As shown in the diagram. In this invention, the apex point is located on the interfrontal suture anterior to the anterior fontanelle, and is a stable and identifiable feature point in the anterior part of the interfrontal suture within the skull region shown in the acquired image. This point is used to characterize the position of the midline suture in the anterior part of the skull. The anterior left fontanelle is located at the end region of the left coronal suture extending to the left lateral side of the skull, and is a feature point of the suture where the left coronal suture intersects with the left marginal suture. The left midline coronal suture is located in the middle of the left coronal suture between the anterior fontanelle and the anterior left fontanelle, and is a stable and identifiable feature point in the middle segment of the left coronal suture. The right midline coronal suture is located in the middle of the right coronal suture between the anterior fontanelle and the anterior right fontanelle, and is a stable and identifiable feature point in the middle segment of the right coronal suture. The left midline suture is located on the left marginal suture, and is a feature point in the middle of the left marginal suture between the anterior left fontanelle and the posterior left fontanelle, used to characterize the position of the left lateral margin suture of the skull. The right edge point, located on the right lateral suture, is a characteristic point in the middle of the right lateral suture between the anterior and posterior right fontanelles, used to characterize the position of the right lateral suture of the skull. The posterior left fontanelle is located in the lateral end region of the left occipital suture extending to the left and posterolaterally, a characteristic point where the left occipital suture intersects with the left lateral suture. The posterior right fontanelle is located in the lateral end region of the right occipital suture extending to the right and posterolaterally, a characteristic point where the right occipital suture intersects with the right lateral suture. The left occipital suture is located in the middle of the left occipital suture between the posterior and posterior left fontanelles, a stable and identifiable characteristic point in the middle segment of the left occipital suture. The right occipital suture is located in the middle of the right occipital suture between the posterior and posterior right fontanelles, a stable and identifiable characteristic point in the middle segment of the right occipital suture. The bottom point is located on the posterior midline suture extending along the midline of the skull behind the posterior fontanelle, a stable and identifiable characteristic point in the posterior part of this suture within the skull region shown in the acquired image. This point is used to characterize the location of the midline suture at the back of the skull.
[0105] Furthermore, to facilitate manual verification of the model's recognition results, the computer controller 500 marks each key anatomical structure point with solid dots of different colors, superimposing them onto the acquired images. It also connects these key anatomical structure points, dividing the mouse brain into five regions to observe whether the identified locations are approximately correct. Figure 11 As shown.
[0106] In step S140, "calculating the 3D coordinates of each key anatomical structure point in the camera coordinate system based on the two-dimensional coordinates using a binocular stereo vision reconstruction algorithm" is achieved based on the camera parameters pre-calibrated in the subsequent fourth part. The camera parameters include the intrinsic parameter matrix of the left camera. Left camera distortion parameters Right camera intrinsic parameter matrix Right camera distortion parameters And the rotation matrix of the right camera relative to the left camera Translation vector The specific implementation includes the following steps:
[0107] Let the intrinsic parameter matrix of the left camera be set. The form is Right camera intrinsic parameter matrix The form is ,in , These represent the pixel focal lengths of the left camera in the horizontal and vertical directions of the image, respectively. That is, the x and y coordinates of the principal point of the left camera in the image pixel coordinate system. The principal point is the intersection of the camera's optical axis and the imaging plane. and These represent the pixel focal lengths of the right camera in the horizontal and vertical directions of the image, respectively. These represent the horizontal and vertical pixel coordinates of the principal point of the right camera. The principal point is the intersection of the camera's optical axis and the imaging plane.
[0108] The left camera coordinate system is used as the reference coordinate system for 3D reconstruction. Let the 3D coordinates of the key anatomical structures to be reconstructed in the left camera coordinate system be... , , and These represent the coordinate components of the key anatomical structures of the skull to be reconstructed along the X, Y, and Z axes in the left camera coordinate system.
[0109] Let the pixel coordinates of the key anatomical structure points in the original image from the left camera be... The image pixel coordinates are back-projected onto the normalized imaging plane:
[0110] , ;
[0111] in, and These represent the normalized x and y coordinates of the distorted image from the left camera, respectively. Left camera distortion parameters. Includes three radial distortion coefficients , , and two tangential distortion parameters , Let the normalized coordinates of the left camera after distortion correction be... and define: ,in This represents the radial distance from the point to the center of the normalized imaging plane of the left camera. The coordinates before and after correction satisfy:
[0112] ;
[0113] ;
[0114] The above equations are solved iteratively to obtain the distortion-corrected normalized coordinates of the left camera. The corresponding corrected image pixel coordinates are , .
[0115] Similarly, for the right camera, let the pixel coordinates of the key anatomical structure points in the original image of the right camera be... The image pixel coordinates are back-projected onto the normalized imaging plane:
[0116] , ;
[0117] in, and These represent the normalized x and y coordinates of the distorted image from the right camera, respectively. Right camera distortion parameters. Includes three radial distortion coefficients , , and two tangential distortion parameters , Let the normalized coordinates of the right camera after distortion correction be... and define: ,in This represents the radial distance from the point to the center of the normalized imaging plane of the right camera. The coordinates before and after correction satisfy:
[0118] ;
[0119] ;
[0120] The above equations are solved iteratively to obtain the distortion-corrected normalized coordinates of the right camera. The corresponding corrected image pixel coordinates are , .
[0121] Using the left camera coordinate system as the reference coordinate system, with the left camera's rotation matrix being a third-order identity matrix and its translation vector being a three-dimensional zero vector, the left camera's projection matrix is: :
[0122] ;
[0123] The projection matrix of the right camera relative to the left camera is :
[0124] ;
[0125] When using distortion-corrected normalized coordinates, the projection matrix of the left camera and the projection matrix of the right camera relative to the left camera are simplified as follows:
[0126] ;
[0127] ;
[0128] Define the homogeneous three-dimensional coordinates of key anatomical points as follows: Then the normalized projection relation of the left camera is: The projection relationship of the right camera is as follows ,in, and Let represent the non-zero scale factors in the projection relationship between the left and right cameras, respectively. Based on the normalized projection relationship between the left and right cameras, construct a linear equation:
[0129] ;
[0130] Solve the above equations using the linear least squares method: ,in The coefficient matrix, It is a constant vector.
[0131] By combining the projection equations of the left and right cameras, we can obtain:
[0132] ;
[0133] ;
[0134] Solving the equation will yield the result. Thus, the 3D coordinates of this key anatomical structure point in the camera coordinate system are obtained.
[0135] The above process is performed on each key anatomical structure point output by S130 to obtain the 3D coordinates of all key anatomical structure points in the camera coordinate system.
[0136] This system uses a checkerboard calibration board to verify the accuracy of 3D reconstruction. As shown in Table 1, the known side length of the checkerboard is used as the true value. The binocular reconstruction obtains the 3D coordinates of adjacent corner points of the checkerboard in the camera coordinate system, and calculates the 3D spatial distance between adjacent corner points. This 3D spatial distance is used as the reconstructed measurement value of the side length of the checkerboard. The difference between the two is calculated as the reconstruction error, and the mean, variance and RMSE of the error are statistically analyzed. As shown in Table 1, the results show that the reconstruction accuracy is high.
[0137] Table 1. Statistical results of 3D reconstruction errors based on checkerboard pattern
[0138]
[0139] During each automatic leveling process, the 3D coordinates of each key anatomical point in the mouse's current mounting position are recorded using the methods described in steps S120 to S140 above. This serves as the 3D coordinate set of the key anatomical points in the world coordinate system under the current pose. , where n is the total number of key anatomical structures.
[0140] In step S150, "the computer controller 500 decenters the 3D coordinate sets of key anatomical points in the world coordinate system under the current pose and the 3D coordinate sets of key anatomical points in the world coordinate system under the preset reference pose, respectively. Based on the decentered two point sets, it solves for the optimal rotation matrix and translation vector from the current pose to the preset reference pose. The roll angle deviation and pitch angle deviation are obtained by decomposing the optimal rotation matrix, and the height deviation is extracted from the translation vector." This is achieved using a rigid body registration method based on singular value decomposition (SVD), and the specific implementation is as follows:
[0141] The number of key anatomical points, n, involved in pose calculation can be set according to the required level of localization precision and computational speed. However, at least three non-collinear valid key points should be selected, including the anterior fontanelle, posterior fontanelle, and at least one lateral key point. A higher number of key points results in a more detailed description of the skull structure, but also increases the amount of annotation and computation. In this embodiment, considering both localization accuracy and computational efficiency, n is set to 14.
[0142] Let the 3D coordinate set of key anatomical points in the world coordinate system under the current pose be... The 3D coordinate set of key anatomical points in the world coordinate system under the preset reference pose is: The 3D coordinate set of key anatomical points in the world coordinate system at the current pose. 3D coordinate set of key anatomical points in the world coordinate system under the preset reference pose There is a rigid body transformation relationship between them:
[0143] ;
[0144] in, Let be a rotation matrix. Let S be the translation vector. The goal of step S150 is to find the optimal translation vector from the current pose to the preset reference pose. and This minimizes the registration error. The calculation method is as follows:
[0145] First, calculate the centroid of the reference point set separately. and the current point set centroid :
[0146] ;
[0147] ;
[0148] In the formula, This represents the total number of key anatomical structures.
[0149] Then, the reference point set and the current measurement point set are decentered respectively, that is, the coordinates of each point are subtracted from the centroid of its corresponding point set to obtain the coordinates of each point relative to the corresponding centroid:
[0150] ;
[0151] ;
[0152] Minimize the objective function, i.e. And satisfy , equivalent to ,in, ;
[0153] Define the cross-covariance matrix :
[0154] ;
[0155] For cross-covariance matrix Perform singular value decomposition:
[0156] ;
[0157] Therefore, the optimal rotation matrix for the deviation of the current pose from the target pose can be calculated:
[0158] .
[0159] Since the singular value decomposition described above may produce a reflection matrix, it is necessary to examine the determinant value of the obtained matrix. If the determinant value of the obtained matrix... ,but , Represents a matrix The matrix after reflection correction. Otherwise, keep the original state. .
[0160] It should be noted that, from the perspective of rigid body kinematics, the error between the current pose and the preset reference pose is essentially the rotational transformation of the mouse skull around its center of rotation. When the left and right ear rods of the stereotaxic instrument are adjusted in different directions, the mouse skull rotates around a spatial center of rotation; the spatial position of this center of rotation is difficult to directly calibrate. In this embodiment, the coordinate system of the center of rotation is parallel to the coordinate axes of the defined world coordinate system, and there is only a difference in the translation of the origin between the two coordinate systems; since the two point sets have been decentered before registration, the translation components are separated, and the solution of the rotation components is independent of the spatial position of the center of rotation. Therefore, the error can be directly calculated based on the world coordinate system with the mouse's anterior fontanelle as the origin. The three-dimensional coordinates of 14 key anatomical structure points can be directly substituted into the world coordinate system for SVD calculation to obtain the rotational error of the current pose relative to the preset reference pose, without explicitly determining the spatial position of the center of rotation.
[0161] From rotation matrix Calculate the Euler angle deviation of the attitude, and define the relative rotation about the X-axis as the roll angle deviation. That is, the left and right lugs move in opposite directions simultaneously to control the pitch angle deviation, and the relative rotation around the Z-axis is the pitch angle deviation. Controlled by bite lever 212c, the relative rotation around the Y-axis is the yaw angle deviation. .
[0162] By rotation matrix The Euler angles are obtained by decomposition, and the XZY internal rotation order is adopted, i.e. ,in:
[0163] .
[0164] Therefore, the rotation matrix is obtained. The relationship between the internal Euler angles and the internal rotation is as follows:
[0165] ;
[0166] ;
[0167] .
[0168] In actual leveling, only the roll angle deviation was used. and pitch angle deviation Yaw angle deviation For monitoring purposes only, not for leveling purposes.
[0169] Calculate the translation vector between the current pose and the preset reference pose. The translation vector is directly given by the centroid relation. The translation vector Translation of the y-axis in It participates in balancing to determine whether the overall mouse brain is too high or too low on the y-axis; other components do not participate in balancing.
[0170] It should be noted that this embodiment uses a rotation matrix. The roll, pitch, and yaw angles are decomposed into Euler angles in the XZY rotation sequence, yielding the roll, pitch, and yaw angle deviations around the X-axis, respectively. The roll and pitch angle deviations are used for leveling control in subsequent S160 steps, while the yaw angle deviation is only used for monitoring and does not participate in leveling. Simultaneously, from the translation vector... The height deviation in the Y-axis direction is extracted and used for subsequent height correction. The translation amounts in the X-axis and Z-axis directions are not involved in the leveling.
[0171] The roll angle deviation is obtained through step S150. Pitch angle deviation Y-axis height deviation Then, the control operation of step S160 is executed. In this embodiment, step S160 includes the following sub-steps:
[0172] S161, such as Figure 12 As shown, the roll angle deviation is mapped to the opposite displacement of the left and right fixed rods 212, the pitch angle deviation is mapped to the displacement of the fixed rod 212 used to fix the upper jaw, and the height deviation is mapped to the same displacement of all fixed rods 212.
[0173] Specifically, see Figure 13 The height adjustment displacement of the left ear rod 212a is The height adjustment displacement of the right ear rod 212b is... The height adjustment displacement of the bite lever 212c corresponding to the pitch angle is... .
[0174] In the above formula, The length of the rotation arm of the left ear rod 212a as it rotates around the mouse ear canal. The length of the rotation arm of the right ear rod 212b as it rotates around the mouse ear canal. This refers to the length of the rotation arm of the bite bar 212c around the mouse's upper jaw. (The above refers to the rotation arm length.) , , The contact points are approximately determined as follows: the contact point between the left ear rod 212a and the left external auditory canal of the mouse is defined as the left ear contact point; the contact point between the right ear rod 212b and the right external auditory canal of the mouse is defined as the right ear contact point; and the contact point between the bite rod 212c and the upper palate of the mouse is defined as the mouth contact point. After the left ear rod 212a, right ear rod 212b, and bite rod 212c fix the mouse's head, the left ear contact point, right ear contact point, and mouth contact point are three non-collinear contact points. These three contact points together define a fixing plane, which is defined as the head fixing reference plane. Within the head fixing reference plane, the midpoint of the line segment formed by the left ear contact point and the right ear contact point is used as the rotation center during the mouse's head posture adjustment process. The straight-line distances from the rotation center to the three contact points are measured as the lengths of each rotation arm. Since this system uses closed-loop iterative control, the initial setting error of the rotation arm length can be gradually corrected by pose feedback in subsequent iterations. Therefore, reasonable estimation errors are allowed for the above-mentioned rotation arm lengths, and precise measurement is not required. For mice of the same strain and with the same fixation method, the length of the rotating arm can be reused after one calibration.
[0175] S162. Convert each displacement amount into the rotation amount of the drive motor 221 of each electric leveling drive module 220.
[0176] In this embodiment, the drive motor 221 in the electric leveling drive module 220 can be a stepper motor. The displacement generated in the vertical direction by the stepper motor driving the corresponding fixed rod 212 through the transmission mechanism 222 for each step is defined as the step displacement. In this embodiment, the three drive motors 221 are calibrated so that they can drive the corresponding fixed rod 212 to move 2mm vertically every 17,500 steps. Therefore, the step displacement is... The typical value is approximately 0.000114 mm / step.
[0177] The number of steps required for the right ear rod adjustment module motor to execute is: The number of steps required for the left ear rod adjustment module motor to execute is: The number of steps required for the bite adjustment module motor to execute is: .
[0178] Then, the drive motor of the electric leveling drive module 220 in the animal brain leveling device 200 is adjusted to the target angle to compensate for the measurement deviation. Here, an incremental PID algorithm is used for discretization to avoid accumulating historical errors. The standard form of the incremental PID is:
[0179] ;
[0180] ;
[0181] The output is the increment. Here... The actual angle that each motor needs to rotate. This is the initial rotation angle calculated theoretically for each round. This embodiment uses an experimental tuning method to determine the control parameters. Under the same load and sampling period, the proportional coefficient is gradually increased starting from a smaller value. The convergence time, overshoot, and oscillations of the system under different values were compared, and the parameters that enable stable convergence without significant oscillations were finally selected. The integral coefficients were determined experimentally. and differential coefficients All are set to 0, proportionality coefficient Let's set it to 0.5. Therefore, the incremental PID control in this embodiment is simplified to proportional control.
[0182] After completing the above round of adjustments, the deviation is observed again for compensation calculation. The above steps are repeated to calculate the error of the current mouse brain pose relative to the preset reference pose in real time, and the required rotation angle of each motor is calculated. The three motors move simultaneously, and the left and right ear rod adjustment module motors adjust the roll angle deviation. The bite adjustment module motor adjusts the pitch angle deviation. .
[0183] After each round of adjustment, the required rotation angle for the next round is determined based on the current pose. If the angle error reaches a threshold, but the overall height difference has not yet reached the threshold, all three motors move simultaneously in the same direction, approaching the reference pose along the y-axis until the threshold is reached. If the roll angle deviation, pitch angle deviation, and height deviation all fall within the preset threshold range, the leveling is complete; otherwise, the next round of leveling continues. In this embodiment, leveling is considered complete when the absolute values of the roll angle deviation and pitch angle deviation are both less than 0.5° and the absolute value of the height deviation is less than 0.15mm.
[0184] The computer controller 500 includes an upper-level computing unit and a lower-level driving unit. The upper-level computing unit has a built-in trained network model for detecting key anatomical structures of the skull, performing image processing, pose calculation, deviation calculation, and incremental PID operation. The lower-level driving unit integrates signal processing and power amplification circuits, receives control commands output from the upper-level computing unit, and drives the three drive motors in the electric leveling drive module 220 and the three drive motors in the multi-degree-of-freedom motion mechanism 300 for the X-axis surgical tool lateral movement mechanism, the Z-axis surgical tool lifting mechanism, and the Y-axis animal bed longitudinal movement mechanism. In this embodiment, the lower-level driving unit is selected from... Platform implementation, main control board selected Motor driver chip selected Chip. To enable rapid system response, this invention controls the simultaneous movement of three motors, achieving asynchronous independent movement of the three motors through the MY instruction. The instruction format is "MY{motor1}{direction1}{step1}{speed1}J{motor2}{direction2}{step2}{speed2}J{motor3}{direction3}{step3}{speed3}". The system identifies the separator position through a dynamic parsing algorithm, independently extracting the control parameters of each motor. Pulse generation uses a polling method to maintain an independent timestamp and pulse counter for each motor, achieving asynchronous movement at different speeds and in different directions. This supports complex multi-degree-of-freedom motion scenarios, and the three high-precision stepper motors work in concert, replacing traditional manual operation and greatly improving the efficiency of leveling operations. The left and right ear rod motors control the left and right ear rods to move in opposite directions with the same displacement simultaneously, adjusting the roll angle deviation. Adjusting the pitch angle deviation of the bite bar 212c motor After each round of adjustment, the motors are given a buffer period. Then, based on the current pose, the number of rotation steps required for the next round is calculated. If the angle error reaches a threshold, but the height deviation has not yet reached the threshold, all three motors move simultaneously in the same direction, approaching the preset reference pose in the vertical direction until the threshold is reached. If both the angle and displacement reach the threshold, the leveling is complete; otherwise, the next round of leveling continues, thus achieving closed-loop control. This application measured the convergence curves of angle and motor steps during the actual leveling process, such as... Figure 14 (a) and Figure 14 As shown in (b), the data used for plotting are the values of angle error and the number of steps the motor moves, which are collected and recorded in real time during the automatic leveling process of the mouse brain. Figure 14 (a) shows the change of the angle error between the current position and the preset reference pose over time. Only one leveling process is shown here. The vertical axis is the angle error between the current position and the reference position, and the horizontal axis is time (in seconds). Figure 14 (b) represents the number of rotations required by the drive motor in each round during the leveling process. Only one leveling process is shown here. The vertical axis represents the number of rotations required by the three motors in each round. The circular markers indicate the motor controlling bit 212c, the square markers indicate the motor controlling the left lug 212a, and the triangle markers indicate the motor controlling the right lug 212b. Figure 14 (a) and Figure 14 (b) It can be seen that both the angle and the number of steps show good convergence, and the system converges stably. The physical embodiment of this system is shown below. Figure 18 As shown.
[0185] This concludes the explanation of the automatic leveling process.
[0186] Part 3: Training the Detection Network Model
[0187] The following is combined Figure 15 This section describes the training process of the skull key anatomical structure point detection network model used in step 130 above. The training addresses three issues sequentially: first, manual annotation is costly, so automatic annotation is performed based on SFM and 3D back-projection algorithms (S210–S250); second, key anatomical structure points in the mouse skull are small in size and easily affected by lighting and reflections, so a cross-channel interactive efficient channel attention module and a variable content-guided attention mechanism are introduced; third, point-by-point independent localization can easily distort the relative positions of key points, so a rigid registration constraint S260 is added during the training phase. The specific steps are as follows:
[0188] S210. Obtain the original multi-view image sample dataset of the model animal skull. A certain number of videos of mouse skulls during stereotactic surgery are collected from multiple different perspectives. After frame segmentation, invalid data is removed to obtain the original image sample dataset from different perspectives; the invalid data specifically refers to occluded or incomplete photos. Specifically, this invention filmed more than 70 mice, and an average of 170 valid images were generated after frame segmentation of the video from each mouse.
[0189] S220. Perform feature extraction and matching, sparse reconstruction and dense reconstruction on the original multi-view image sample dataset to obtain camera parameters and projection matrix, including S221 to S223:
[0190] S221. Feature Extraction and Feature Matching. For each mouse, SFM-related software (such as VisualSFM) is used to read the original images from different perspectives and convert them into grayscale images. Then, the SIFT (Scale-invariant feature transform) algorithm is used to extract image feature points and feature descriptors. By comparing the feature descriptors of different images, matching feature pairs are found in images from different perspectives.
[0191] S222, Sparse Reconstruction. Using the aforementioned SFM-related software, the camera's intrinsic parameters and pose are estimated based on each matched feature point pair. The positions of the feature points in 3D space are calculated based on geometric relationships and triangulation principles. The initial 3D point cloud generated in this step is a sparse 3D point cloud. Since this method uses its camera parameter file and projection matrix, further dense reconstruction is required before it can be exported.
[0192] S223, Dense Reconstruction. Using the aforementioned SFM-related software, a more detailed and complete 3D model of the mouse skull surface was obtained, and the camera parameter file and projection matrix were directly exported.
[0193] S230. Select a portion of images from the original multi-view image sample dataset for manual annotation to obtain the multi-view two-dimensional observation coordinates of key anatomical structures of the skull. Combine the camera parameters and projection matrix, calculate the optimal 3D coordinates of the key anatomical structures of the skull by fusing geometric constraints from different perspectives and minimizing reprojection errors using the linear least squares method, including S231 to S232:
[0194] S231. Sparse Manual Sampling and Annotation. Key anatomical structure points in the mouse skull were annotated using image-based key anatomical structure point annotation software. To more quickly and accurately locate and identify individuals, this method expanded the total number of key anatomical structure points to 14 points: anterior fontanelle, posterior fontanelle, left anterior fontanelle, right anterior fontanelle, top point, left and right coronal midpoints, left and right coronal midpoints, left and right posterior fontanelles, left and right occipital sutures, bottom point, left and right edge midpoints. Connecting these key anatomical structure points generates the mouse brain outline and partitions, allowing for visual verification of the numbering and relative position of each key anatomical structure point, and timely detection of missed, mislabeled, or significant positional shifts. Simultaneously, it provides skull shape and key point topological constraints for model training, improving the consistency of key point recognition results. For each mouse, 5-8 suitable, easily observable photographs were selected for manual annotation, generating multi-view two-dimensional observation coordinates for the key anatomical structure points of the skull.
[0195] S232. Based on the camera parameter file and projection matrix obtained from the above-mentioned SFM related software, the optimal 3D coordinates of each key anatomical structure point are solved by fusing the geometric constraints of different perspectives and minimizing the reprojection error using the linear least squares method.
[0196] S240. Based on the optimal 3D coordinates of the key anatomical structures of the skull and the projection matrix, the remaining images in the original multi-view image sample dataset of each mouse are automatically labeled using the back projection principle to obtain the two-dimensional coordinates of each key anatomical structure point of the skull in all view images, and a 2D key anatomical structure point labeled dataset is constructed.
[0197] Specifically, the image key anatomical structure point annotation software of this invention is an automatic annotation software independently developed based on Matlab, including image import, key point selection, coordinate recording, annotation verification, 3D coordinate calculation, and batch backprojection annotation functions. The operator sequentially annotates n key anatomical structure points in the selected photograph, and the software records their two-dimensional coordinates; then, combining camera parameters and the projection matrix, the three-dimensional coordinates are calculated, and the three-dimensional coordinates are backprojected onto images from other viewpoints to generate corresponding two-dimensional key point annotations.
[0198] S250. Perform data augmentation processing on the original images of the 2D key anatomical structure point annotation dataset to generate corresponding augmented images; group the original images and their augmented images into training set, validation set and test set according to the source of the original images.
[0199] S251. Data Augmentation: To simulate various environmental conditions, the 2D key anatomical structure point annotation dataset obtained in step seven is augmented to expand the dataset. Specifically, in this embodiment, three augmented images are generated for each original image. The first augmented image is generated using a brightness adjustment method, the second augmented image is generated using a rotation method, and the third augmented image is generated using a Gaussian noise addition method, as detailed below:
[0200] (1) Brightness adjustment: The original image is converted to the HSV color space, the brightness component is multiplied by the brightness adjustment coefficient, and then converted back to the original color space. The brightness adjustment coefficient is randomly selected from a uniform distribution in the range of 0.6 to 1.4.
[0201] (2) Rotation: Using the center point of the original image as the rotation center, rotate the original image by a preset angle, wherein the preset angle is randomly selected from a uniform distribution within the range of -30° to 30°;
[0202] (3) Gaussian noise addition: Gaussian noise with a mean of 0 is added to each pixel value of the original image. The standard deviation of the Gaussian noise is randomly selected from a uniform distribution in the range of 5 to 15.
[0203] For brightness adjustment and Gaussian noise addition operations, the coordinates of key anatomical points remain unchanged before and after enhancement. For rotation operations, the coordinates of each key anatomical point are synchronously transformed according to the same rotation center and rotation angle as the image; key anatomical points that exceed the image boundary after rotation are marked as invisible, and the target bounding box is re-determined based on the coordinates of the key anatomical points that remain valid after rotation. This ensures that the image and the corresponding key anatomical point annotation information are consistent.
[0204] S252. After enhancement, the original image and its enhanced image are grouped into training, validation, and test sets according to their original source to avoid the same original image and its enhanced image being assigned to different datasets. The training set is used for learning and updating model parameters; the validation set is used to evaluate model performance, adjust training parameters, and select the optimal model during training; the test set does not participate in model training or parameter adjustment, but is only used to evaluate the recognition performance and generalization ability of the final model after training is completed.
[0205] The dataset was augmented to increase its diversity. In this example, the augmented dataset contains more than 40,000 photos.
[0206] S260. The partitioned dataset is fed into the improved YOLOv8-pose model for training. During the model training phase, rigid registration constraints of key anatomical structure points are further added to constrain the overall shape and relative positional relationship between the 14 key anatomical structure points, thereby obtaining a neural network model that can automatically identify key anatomical structure points of the mouse skull. The improved YOLOv8-pose model is constructed as follows: using YOLOv8-pose as the base network, the number of keypoints output by the model is set to 14, with each keypoint including abscissa, ordinate, and visibility parameter. YOLOv8-pose mainly includes a backbone network, a neck network, and a keypoint detection head: the backbone network is used to extract features from the input image, the neck network is used to fuse features at different scales, and the keypoint detection head is used to output the two-dimensional coordinates of the mouse skull region and 14 key anatomical structures in the image. Since the key anatomical structures of the mouse skull are small in size and easily affected by factors such as lighting changes, local reflections, unclear skull texture, and background interference, this embodiment introduces an improved cross-channel interactive efficient channel attention module (EMCA module) based on ECA and a variable content guided attention module (CGA module) containing SE and CBAM on the basis of YOLOv8-pose, resulting in the improved YOLOv8-pose model. Figure 16 As shown, the EMCA module is set after the SPPF module of the YOLOv8-pose model backbone network, and the three CGA modules are set in the three feature branches of the YOLOv8-pose model neck network at different scales.
[0207] When in use, input a camera image, and the neural network model can automatically output the two-dimensional coordinates of the key points of the mouse skull in the image.
[0208] The following sections will provide detailed explanations of the two attention modules and the rigid registration constraint.
[0209] The cross-channel interactive efficient channel attention module is placed after the SPPF module of the backbone network to recalibrate the channels of the high-level semantic features extracted by the backbone network. Specifically, the input feature map contains C channels. First, global average pooling and global max pooling are performed on the input feature map. Global average pooling is used to extract the average response of each channel across the entire image range, reflecting the overall features of the skull region; global max pooling is used to extract the strongest local features in each channel, highlighting local salient information such as cranial suture intersections, skull edges, and key anatomical structures. Then, the results of global average pooling and global max pooling are added channel by channel, and the summed channel features are input into a one-dimensional convolutional layer to establish feature relationships between adjacent channels. In this embodiment, the size of the one-dimensional convolutional kernel is set to 3. The convolution result is then converted into channel weights between 0 and 1 using the Sigmoid function, and the channel weights are multiplied channel by channel with the original input feature map to obtain the channel-enhanced output feature map. Through the above processing, feature channels with strong responses and those related to key anatomical points of the mouse skull are assigned larger weights, while feature channels related to background, noise, or local reflections are assigned smaller weights. Compared to the ECA module, which only uses global average pooling, the EMCA module utilizes both average and maximum responses, thus taking into account both the overall contour information and local key point information of the skull.
[0210] YOLOv8-pose detects targets of different sizes using feature maps at different scales. The higher-resolution shallow feature maps contain more location and texture information, suitable for determining the location of smaller keypoints; the lower-resolution deep feature maps contain more semantic information, suitable for determining whether a target in an image belongs to the mouse skull region. If only direct concatenation or addition is used to fuse the two types of features, an imbalance in the contributions of features from different sources can easily occur. Therefore, this embodiment sets up CGA feature fusion modules at three scales, P3, P4, and P5, to fuse the same-scale features output by the backbone network and the neck network. The downsampling factors for the P3, P4, and P5 feature maps are 8, 16, and 32, respectively, to simultaneously preserve the detailed information of small-scale keypoints and the overall semantic information of the skull region. For the two same-scale features X and Y input to the CGA feature fusion module, X and Y are first added element-wise to obtain the initial fused feature F. Then, the initial fused feature F is processed through channel attention branches and spatial attention branches, respectively. The channel attention branch first performs global average pooling on the initial fused feature F, compressing the spatial information of each channel into a single channel description value. Then, it sequentially passes the feature through two 1×1 convolutional layers and an activation function to obtain the importance of each channel. This branch is used to determine which feature channels are more important for identifying the mouse skull and key anatomical structures. The spatial attention branch calculates the average and maximum values of the initial fused feature F along each channel direction, concatenates the two spatial feature maps, and then extracts the importance of different spatial locations through a 7×7 convolution. This branch is used to determine which regions in the image are more likely to contain skull contours, cranial sutures, or key anatomical structures. The outputs of the channel attention branch and the spatial attention branch are summed element-wise to obtain a coarse spatial importance map. Then, the initial fused feature and the coarse spatial importance map are interleaved by channel and input into a 7×7 grouped convolutional layer for refinement, and finally, a sigmoid function is used to generate pixel-level fusion weights A. Pixel-level fusion weights A determine the fusion ratio of the two input features for each channel and each spatial location. The two input features are weighted and fused according to a pixel-level fusion weight A, so that the weight of the first input feature is A and the weight of the second input feature is 1-A. The weighted result is then added to the initial fused feature F, and channel adjustment is performed through a 1×1 convolution to obtain the output feature of the CGA module. Therefore, the CGA module is not simply a concatenation of the SE and CBAM modules, but rather borrows the channel information extraction method of SE and the spatial information extraction method of CBAM, and further incorporates pixel-level attention, so that different feature fusion ratios can be used for different channels and different locations, thereby improving the feature representation ability of small anatomical structures in the mouse skull.
[0211] The EMCA and CGA modules are used to improve the network's feature extraction and feature fusion capabilities. Building upon this, this embodiment further incorporates rigid registration constraints for key anatomical structural points during the model training phase.
[0212] The conventional keypoint localization loss method primarily calculates the positional error between each predicted keypoint and its corresponding ground truth keypoint. However, even with this method alone, some keypoints may deviate from the overall skull contour, resulting in the relative positions of the 14 keypoints not conforming to the actual anatomical structure of the mouse skull. Therefore, this embodiment treats the 14 key anatomical points on the same mouse skull as a whole for geometric constraint. The specific steps are as follows:
[0213] First, the predicted keypoint set is obtained from the model output, and the corresponding ground truth keypoint set is obtained from the labeled data. Valid keypoints are selected based on their visibility parameters; when the number of valid keypoints is no less than 3, rigid registration constraint calculation is performed.
[0214] Secondly, the weighted centroids of the predicted keypoint set and the actual keypoint set are calculated separately, and the corresponding centroid is subtracted from the coordinates of each keypoint, transforming both keypoint sets into a coordinate system with their respective centroids as the origin. This process temporarily eliminates the impact of the overall translation between the two keypoint sets.
[0215] Then, a cross-covariance matrix is constructed based on the decentralized predicted keypoints and real keypoints. Singular value decomposition is then performed on the cross-covariance matrix to calculate the optimal rotation matrix from the predicted keypoint set to the real keypoint set. When the determinant of the rotation matrix is less than 0, the singular value decomposition result is corrected to avoid mirror flipping.
[0216] The predicted keypoint set is rotated using the optimal rotation matrix, and a translation vector is calculated based on the centroid relationship between the two keypoint sets, thereby rigidly registering the predicted keypoint set to the true keypoint set. Rigid registration only allows the keypoint set to be rotated and translated as a whole, without changing the original relative distances and overall shape between the keypoints.
[0217] Finally, the smoothed L1 loss between the registered predicted keypoints and the ground truth keypoints is calculated to obtain the rigid registration regularization loss, which is then added to the original keypoint localization loss. In this embodiment, the weight of the rigid registration regularization loss is set to 0.10.
[0218] Furthermore, to adapt to changes in image capture distance and slight imaging distortion, this embodiment also sets up similarity transformation registration loss and affine transformation registration loss. The similarity transformation, based on rotation and translation, allows for uniform scaling of the predicted key anatomical structure point set, with a loss weight set to 0.02; the affine transformation allows for slight directional scaling and shearing of the key point set, with a loss weight set to 0.002.
[0219] Therefore, the keypoint loss in this embodiment consists of the original keypoint localization loss, the keypoint visibility loss, and the geometric registration regularization loss. The original keypoint localization loss is used to constrain the absolute position of each keypoint in the image, the rigid registration regularization loss is used to constrain the overall shape and relative positional relationship between the 14 keypoints, and the similarity transformation registration loss and the affine transformation registration loss are used to improve the model's adaptability to changes in shooting distance and imaging angle.
[0220] The aforementioned geometric registration constraints only participate in loss calculation during the model training phase. After model training is completed, the inference phase still directly outputs the two-dimensional coordinates of 14 key anatomical structure points by the keypoint detection head, without needing to perform singular value decomposition or rigid registration calculations, thus not increasing the computational steps in the actual recognition phase of the model.
[0221] Because this dataset includes data from different mice under varying perspectives, lighting conditions, and distances, it exhibits good generalization ability and can adapt to diverse situations. The training results are as follows... Figure 17 As shown in the figure, the x-axis of each of the four sub-figures represents the training epoch, and the y-axis represents the mean average precision (mAP). Here, B represents the bounding box detection result, and P represents the key anatomical point (Pose) detection result. The meanings of each sub-figure are as follows: The first sub-figure from left to right is the mAP50(B) curve, representing the average accuracy of bounding box detection when the intersection-union ratio (IU) threshold is 0.50; the second sub-figure is the mAP50-95(B) curve, representing the average accuracy of bounding box detection obtained at IU thresholds from 0.50 to 0.95 with a step size of 0.05; the third sub-figure is the mAP50(P) curve, representing the average accuracy of key anatomical structure point detection when the target key anatomical structure point similarity threshold is 0.50; the fourth sub-figure is the mAP50-95(P) curve, representing the average accuracy of key anatomical structure point detection obtained at target key anatomical structure point similarity thresholds from 0.50 to 0.95 with a step size of 0.05, which can reach above 0.8. This indicates that the training process of the key anatomical structure point detection network model has basically converged, and it has good detection performance on the mouse skull region and key anatomical structure points on the validation set. It can adapt to different viewing angles, different lighting conditions and different shooting distances covered in this embodiment.
[0222] Part Four: Camera Calibration
[0223] After the system was built, the two microscope cameras 110 were jointly calibrated using binoculars to obtain the intrinsic parameter matrix of the left camera. and distortion parameters Intrinsic parameter matrix of the right camera and distortion parameters and the rotation matrix of the right camera relative to the left camera. Translation vector The global camera 120 does not participate in the quantitative reconstruction of key anatomical structural points and does not require calibration.
[0224] In this embodiment, calibration is used of The function is to calibrate the binocular camera. The calibration board uses a checkerboard pattern, with each small square having a side length of 1.5mm.
[0225] The camera calibration described above only needs to be performed once after the stereotactic system for the model animal brain is constructed. If the stereo imaging system remains unchanged during subsequent use, recalibration is unnecessary. Recalibration is required after any adjustment to the camera's viewing angle. The calibrated camera parameters are stored in the computer controller 500.
[0226] Part 5: Setting the preset reference pose, recording the 3D coordinate set of key anatomical structure points under the preset reference pose, and solving the world coordinate system transformation matrix.
[0227] Before each batch of surgeries or when the standard surgical position needs to be reset, the following steps must be followed to set a preset reference pose and record the 3D coordinate set of key anatomical points in the world coordinate system and the transformation matrix from the camera coordinate system to the world coordinate system under the preset reference pose. Once saved, the 3D coordinate set of key anatomical points in the world coordinate system and the transformation matrix from the camera coordinate system to the world coordinate system under the preset reference pose remain unchanged throughout the batch of surgeries, and all subsequent automatic leveling adjustments are based on this. For the same batch of surgical tasks, this step is performed only once if the target pose does not need to be changed.
[0228] S310. Setting the preset reference pose. When using the system for the first time, manually adjust the second adjustment knob 2133 to achieve the preset reference pose according to the needs of small animal surgery, and use this as the standard position for surgery.
[0229] In this embodiment, the preset reference pose is configured such that the anterior and posterior fontanelles of the model animal skull are at the same horizontal height, and the symmetrical measurement points on both sides of the sagittal plane passing through the anterior and posterior fontanelles are at the same height, so that the skull as a whole is in a horizontal state, which meets the coordinate reference requirements of the stereotactic brain map.
[0230] The above manual leveling process can be completed using conventional manual leveling methods for rat brains, or it can be completed by the operator in conjunction with equipment such as a stereotactic brain scanner, optical measuring instrument, and contact measuring instrument, according to specific surgical requirements.
[0231] After manually setting the preset reference pose, keep the animal's skull still and the operator clicks the "Set Reference Position" button on the UI interface 510 of the computer controller 500 to trigger the following steps two through four.
[0232] S320. Acquisition of the three-dimensional coordinates of each key anatomical structure point in the camera coordinate system. First, following the method in step S120, images of the model animal skull are acquired using two microscope cameras of the multi-view vision module in the current (i.e., in the preset reference pose) position. Then, following the method in step S130, the trained skull key anatomical structure point detection network model outputs the two-dimensional coordinates of 14 key anatomical structure points in the left and right images. Finally, following the three-dimensional reconstruction method in step S140, distortion correction and binocular stereo vision reconstruction are performed on the above two-dimensional coordinates to obtain the three-dimensional coordinates of each key anatomical structure point in the camera coordinate system.
[0233] S330. Establishment of the world coordinate system and solution of the transformation matrix.
[0234] Take the three-dimensional coordinates of the four marker points (anterior fontanelle, posterior fontanelle, left anterior fontanelle, and right anterior fontanelle) obtained from S320 in the camera coordinate system. Let the 3D coordinates of the anterior fontanelle in the camera coordinate system be denoted as... The 3D coordinates of the back fontanelle in the camera coordinate system are: The 3D coordinates of the front left fontanelle in the camera coordinate system are: The 3D coordinates of the front right fontanelle in the camera coordinate system are: To establish a world coordinate system, follow these steps:
[0235] The anterior fontanelle is used as the origin of the world coordinate system. The 3D coordinates of the anterior fontanelle in the camera coordinate system are... Pointing to the 3D coordinates of the back fontanelle in the camera coordinate system The direction of is taken as the X-axis direction of the world coordinate system, and its unit vector is . for:
[0236] .
[0237] Since the line connecting the anterior to posterior fontanelle and the line connecting the left anterior to right anterior fontanelle in the mouse skull are not necessarily strictly perpendicular in actual anatomical structures, directly using them as the X-axis and Z-axis of the world coordinate system would not guarantee that the coordinate axes are orthogonal. Therefore, this invention uses the direction from the left anterior fontanelle to the right anterior fontanelle as the initial direction vector of the Z-axis. :
[0238] ;
[0239] To make the Z-axis and X-axis orthogonal, Gram-Schmidt orthogonalization is used. Subtract its x-axis direction The projected components are then normalized to obtain the Z-axis unit vector. :
[0240] ;
[0241] This preserves the transverse direction of the skull as indicated by the left anterior fontanelle pointing to the right anterior fontanelle, while also ensuring that the X-axis and Z-axis of the established world coordinate system are orthogonal to each other.
[0242] According to the definition of a right-handed coordinate system, the Y-axis is determined by the cross product of the X-axis and the Z-axis:
[0243] .
[0244] Will , , The rotation matrix is formed row by row from the camera coordinate system to the world coordinate system. :
[0245] .
[0246] Since the anterior fontanelle is used as the zero point in actual stereotactic surgery of the mouse brain, this invention sets the origin of the world coordinate system at the anterior fontanelle. Therefore, the translation vector from the camera coordinate system to the world coordinate system is... :
[0247] .
[0248] Therefore, a homogeneous transformation matrix from the camera coordinate system to the world coordinate system is constructed. Its first three rows and first three columns are rotation matrices. The first three rows and fourth column are translation vectors. The last line is the homogeneous coordinate extension term:
[0249] ;
[0250] Among them, subscript Indicates the camera coordinate system, subscript Represents the world coordinate system; , and Representing the unit direction vector Components in the X, Y, and Z axes of the camera coordinate system , and Representing the unit direction vector Components in the X, Y, and Z axes of the camera coordinate system , and Representing the unit direction vector Components in the X, Y, and Z axes of the camera coordinate system , and These represent the components of the translation vector along the X, Y, and Z axes of the world coordinate system, respectively.
[0251] This enables the establishment of the world coordinate system and the solution of the transformation matrix.
[0252] S340. Transformation and Saving. After supplementing the homogeneous components with the obtained 3D coordinates of each key anatomical structure point in the camera coordinate system, multiply the resulting coordinates by the homogeneous transformation matrix on the left. The three-dimensional coordinates of each key anatomical point in the world coordinate system are obtained, forming a set of three-dimensional coordinates of the key anatomical points in the world coordinate system under the preset reference pose. The calculation formula is as follows:
[0253] ;
[0254] in, , and These represent the coordinate components of the key anatomical structures of the skull to be converted along the three coordinate axes in the camera coordinate system; , and These represent the coordinate components along the three coordinate axes of the key anatomical points of the skull after transformation to the world coordinate system; the value 1 at the end of the column vector represents the homogeneous coordinate component.
[0255] The three-dimensional coordinate set of key anatomical points under the preset reference pose in the world coordinate system and the homogeneous transformation matrix are used. All coordinates are stored in the computer controller 500. In subsequent adjustment cycles, the 3D coordinates of the key anatomical structure points obtained from the current pose reconstruction in the camera coordinate system are transformed to the world coordinate system by the same transformation matrix, and then the deviation is calculated between the 3D coordinate set of the key anatomical structure points in the world coordinate system under the preset reference pose.
[0256] Example 2 (Manual Leveling)
[0257] Based on Embodiment 1, in the system provided in this embodiment, the surgical execution module 400 is equipped with a probe tool or a tool with a probe function, and the tip of the probe tool is moved by controlling the multi-degree-of-freedom motion mechanism 300 and the translation motor in the surgical execution module 400.
[0258] This embodiment also provides a manual leveling method for the above-mentioned model animal brain stereotactic system, which includes the following steps:
[0259] The relative positional relationship between the tip of the probe tool and the key anatomical structure point to be measured is observed with the help of the multi-view vision module 100. When the tip of the probe tool just touches the anterior fontanelle, the position coordinates of the tip of the probe tool at this time are recorded as the reference coordinates of the origin of the world coordinate system.
[0260] Using the multi-view vision module 100, the relative positional relationship between the tip of the probe tool and the key anatomical structure point to be measured is observed. When the tip of the probe tool just touches the key anatomical structure point, the coordinates of the tip of the probe tool relative to the reference coordinates of the origin of the world coordinate system are recorded, and the coordinates of different key anatomical structure points are measured accordingly. The coordinates of the key anatomical structure points of the mouse in the current pose are compared with the coordinates in the target position, and the error is calculated. The second adjustment knob 2133 on the corresponding fixing rod 212 is rotated manually or by software control to adjust the posture and height of the mouse's head until the preset reference pose is reached.
[0261] Example 3
[0262] Based on the above embodiments, this embodiment also provides a method for locating the target brain region using a stereotactic system for model animals. This method is implemented using the aforementioned stereotactic system for model animals and is executed after the skull of the model animal reaches a preset reference pose. The method includes the following steps:
[0263] The relative positional relationship between the tip of the probe tool and the key anatomical structure point to be measured is observed with the help of the multi-view vision module 100. When the tip of the probe tool just touches the anterior fontanelle, the position coordinates of the tip of the probe tool at this time are recorded as the reference coordinates of the origin of the world coordinate system.
[0264] The computer controller 500 establishes a world coordinate system with the anterior fontanelle as the origin among key anatomical structures, and determines the target coordinates of the target brain region in the world coordinate system based on stereotactic brain atlas data or personalized imaging data.
[0265] The computer controller 500 generates motion commands for the multi-degree-of-freedom motion mechanism based on the relative position of the current position of the surgical execution module and the target coordinates. This commands move the surgical execution module above the target coordinates, and then the high-precision closed-loop linear motion slide moves the surgical tool vertically to the target depth, thus completing the localization of the target brain region.
[0266] The automatic leveling process ensures that the skull posture of the model animal is consistent with the preset reference posture, reducing target coordinate transformation errors caused by roll, pitch, and height deviations, and guaranteeing that the target brain region coordinates correspond to the actual needle insertion position of the surgical instrument. Compared with manual leveling, this method reduces errors caused by operator subjective judgment and repeated adjustments, improves the accuracy, consistency, and repeatability of target brain region localization among different experimental subjects, and shortens preoperative leveling time.
[0267] This invention provides a stereotactic system for model animal brains with automatic leveling function, an automatic leveling method, and a target brain region localization method. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A stereotactic system for the brain of a model animal with automatic leveling function, characterized in that, include: Multi-view vision module (100) is used to acquire images of the skull of model animals; The animal brain leveling device (200) includes an animal brain fixation bed (210) and an electric leveling drive module (220). The animal brain fixation bed (210) includes a fixation bed base (211) and three fixation rods (212). One end of each of the three fixation rods (212) is used to contact the head of the model animal to form three non-collinear support contact points, two of which are opposite each other on the left and right sides of the sagittal plane of the skull, and the other contact point is in front. The other end is connected to the fixation bed base (211) through a fixation rod adjustment mechanism (213). The electric leveling drive module (220) is set one-to-one with the three fixation rods (212) and is driven and connected one-to-one with the fixation rod adjustment mechanism (213) of each fixation rod (212). It is used to independently drive the corresponding fixation rod (212) to move in the vertical direction to adjust the posture of the skull of the model animal. And a computer controller (500), which is communicatively connected to the multi-view vision module (100) and the electric leveling drive module (220), has a built-in trained skull key anatomical structure point detection network model, and stores the 3D coordinate set of key anatomical structure points in the world coordinate system under the preset reference pose; The computer controller (500) is configured to: calculate the roll angle deviation, pitch angle deviation, and height deviation between the current skull pose and the preset reference pose based on the two-dimensional coordinates of the key anatomical structure points of the skull output by the key anatomical structure point detection network model of the skull, and according to the decoupling relationship of mapping the roll angle deviation to the opposite displacement of the two relative fixed rods, the pitch angle deviation to the displacement of the front fixed rod, and the height deviation to the same direction displacement of the three fixed rods, and control the three electric leveling drive modules (220) in a closed loop to drive the three fixed rods (212) to move only in the vertical direction, and iteratively execute image acquisition, key point recognition, deviation calculation and fixed rod driving until each deviation converges, so as to automatically adjust the skull of the model animal to the preset reference pose.
2. The model animal brain stereotactic system according to claim 1, characterized in that, It also includes a surgical execution module (400) and a multi-degree-of-freedom motion mechanism (300). The surgical execution module (400) is installed on the motion output end of the multi-degree-of-freedom motion mechanism (300). The multi-degree-of-freedom motion mechanism (300) is communicatively connected to the computer controller (500) and is used to adjust the position of the surgical execution module (400) under the control of the computer controller (500).
3. The model animal stereotactic system for brain orientation according to claim 1, characterized in that, The ends of the two opposing fixing rods (212) are both pointed, which are used to fix the left and right ear openings of the model animal, respectively; the end of the front fixing rod (212) is provided with a nose clip, which is used to fix the upper palate of the model animal.
4. The model animal stereotactic brain system according to claim 1, characterized in that, The multi-view vision module (100) includes at least two microscope cameras (110) and at least two global cameras (120). The at least two microscope cameras (110) are fixed at intervals to form a first binocular stereo imaging system, and the at least two global cameras (120) are fixed at intervals to form a second binocular stereo imaging system. The imaging axes of all cameras intersect at the same point.
5. The model animal stereotactic system for brain orientation according to claim 1, characterized in that, The fixed rod adjustment mechanism (213) includes a screw-slider mechanism. The fixed rod (212) is connected to the fixed bed base (211) through the screw-slider mechanism. The screw-slider mechanism is provided with a second adjustment knob (2133). When the second adjustment knob (2133) is rotated, the fixed rod (212) moves in the vertical direction. The electric leveling drive module (220) includes a drive motor (221) and a transmission mechanism (222). The drive motor (221) is detachably coupled to the second adjustment knob (2133) through the transmission mechanism (222). The drive motor (221) is equipped with an encoder. The encoder records the lifting displacement of the fixed rod (212), or the drive motor (221) records the lifting displacement of the fixed rod (212) by recording the number of movement steps.
6. An automatic leveling method, implemented using the stereotactic system for the model animal brain as described in any one of claims 1 to 5, characterized in that, Includes the following steps: S110, the head of the model animal is placed on the animal brain fixation bed (210) of the animal brain leveling device (200), and the head is fixed by contacting the head of the model animal with three fixing rods (212). S120, using the multi-view vision module (100) to acquire images of the skull of the model animal; S130, The trained skull key anatomical structure point detection network model receives the image and outputs the two-dimensional coordinates of at least three non-collinear key anatomical structure points of the model animal skull in the image. S140, The computer controller (500) calculates the 3D coordinates of each key anatomical structure point in the camera coordinate system according to the two-dimensional coordinates through a binocular stereo vision reconstruction algorithm, and converts the 3D coordinates to a preset world coordinate system based on the skull anatomical structure of the model animal, thereby obtaining the set of 3D coordinates of the key anatomical structure points in the world coordinate system under the current skull pose. S150, the computer controller (500) decenters the 3D coordinate set of the key anatomical structure points in the world coordinate system under the current pose and the 3D coordinate set of the key anatomical structure points in the world coordinate system under the preset reference pose, respectively. Based on the two point sets after decentering, it solves the optimal rotation matrix and translation vector from the current pose to the preset reference pose. The roll angle deviation and pitch angle deviation are obtained by decomposing the optimal rotation matrix, and the height deviation is extracted from the translation vector. The height deviation is the component of the translation vector in the vertical direction of the world coordinate system. S160, the computer controller (500) maps the roll angle deviation to the opposite displacement of two opposing fixed rods (212) in the vertical direction, maps the pitch angle deviation to the displacement of the front fixed rod (212) in the vertical direction, and maps the height deviation to the same displacement of the three fixed rods (212) in the vertical direction. Based on each displacement, the electric leveling drive module (220) controls the corresponding fixed rod (212) to move. S170, repeat S120 to S160 until the roll angle deviation, the pitch angle deviation and the height deviation all converge to their respective preset threshold ranges, and end the automatic leveling process.
7. The automatic leveling method according to claim 6, characterized in that, The key anatomical points are 14, including the anterior fontanelle, posterior fontanelle, anterior left fontanelle, anterior right fontanelle, top point, coronal left middle, coronal right middle, posterior left fontanelle, posterior right fontanelle, left occipital suture, right occipital suture, bottom point, left edge middle and right edge middle; The training process (S200) of the network model for detecting key anatomical structures of the skull includes: S210. Obtain the original multi-view image sample dataset of the skull of the model animal; S220. Perform feature extraction and matching, sparse reconstruction and dense reconstruction on the original multi-view image sample dataset to obtain camera parameters and projection matrix; S230. Select a portion of images from the original multi-view image sample dataset for manual annotation to obtain the multi-view two-dimensional observation coordinates of key anatomical structures of the skull. Combine the camera parameters and projection matrix, calculate the optimal 3D coordinates of the key anatomical structures of the skull by fusing the geometric constraints of different views and minimizing the reprojection error using the linear least squares method. S240. Based on the optimal 3D coordinates of the key anatomical structures of the skull and the projection matrix, the remaining images in the original multi-view image sample dataset are automatically labeled using the back projection principle to obtain the two-dimensional coordinates of each key anatomical structure point of the skull in all view images, and a 2D key anatomical structure point labeled dataset is constructed. S250. Perform data augmentation processing on the original images of the 2D key anatomical structure point annotation dataset to generate corresponding augmented images; group the original images and their augmented images into training set, validation set and test set according to the source of the original images; S260. The partitioned dataset is fed into the improved YOLOv8-pose model for training. At the same time, rigid registration constraints are added during the model training stage to finally obtain the trained skull key anatomical structure point detection network model. The improved YOLOv8-pose model is constructed as follows: using YOLOv8-pose as the base network, the number of keypoints in the model output is set to 14, and each keypoint includes an abscissa, ordinate, and visibility parameter; based on YOLOv8-pose, an improved cross-channel interactive efficient channel attention module based on ECA and a variable content guided attention module including SE and CBAM are introduced to obtain the improved YOLOv8-pose model; the cross-channel interactive efficient channel attention module is set after the SPPF module of the YOLOv8-pose model backbone network, and the three variable content guided attention modules are respectively set in the three feature branches of the neck network of the YOLOv8-pose model at different scales.
8. The automatic leveling method according to claim 6, characterized in that, The origin of the world coordinate system is defined as the anterior fontanelle. The X-axis of the world coordinate system is the direction from the anterior fontanelle to the posterior fontanelle. The Z-axis of the world coordinate system is the direction from the left anterior fontanelle to the right anterior fontanelle, which is normalized after orthogonalization. The Y-axis of the world coordinate system is determined according to the definition of the right-hand coordinate system.
9. The automatic leveling method according to claim 6, characterized in that, In S160, the method of mapping each of the deviations to a displacement and controlling the electric leveling drive module (220) according to each of the displacements includes: Multiply the roll angle deviation by the length of the rotating arm corresponding to one of the two opposing fixed rods (212) to obtain the first displacement of the fixed rod (212) in the vertical direction; multiply the roll angle deviation by the length of the rotating arm corresponding to the other fixed rod (212) in the vertical direction to obtain the second displacement of the fixed rod (212) in the vertical direction, wherein the first displacement is opposite to the second displacement; multiply the pitch angle deviation by the length of the rotating arm corresponding to the preceding fixed rod (212) to obtain the third displacement of the fixed rod (212) in the vertical direction; wherein, the length of the rotating arm corresponding to each fixed rod (212) is the distance from the rotation center of the model animal's head to the contact point between the fixed rod (212) and the model animal's head; Each displacement is converted into the corresponding driving amount of the electric leveling drive module (220), and the actual output of the electric leveling drive module (220) in each adjustment cycle is determined according to the driving amount using a proportional control or incremental PID control algorithm. In S170, when the roll angle deviation, the pitch angle deviation, and the height deviation all fall within the corresponding preset threshold range, the leveling is determined to be complete.
10. A method for locating a target brain region in a stereotactic system for a model animal brain, implemented using the stereotactic system for a model animal brain as described in claim 2, characterized in that, After the model animal's skull automatically levels to reach the preset reference pose, the target brain region localization method includes the following steps: A world coordinate system is established with the anterior fontanelle as the origin among the key anatomical structures, and the target coordinates of the target brain region in the world coordinate system are determined based on stereotactic brain atlas data or personalized imaging data. The multi-degree-of-freedom motion mechanism (300) of the control system drives the surgical execution module (400) to move to the target coordinates.
Citation Information
Patent Citations
Brain stereotaxic apparatus with skull laser positioning and leveling device
CN118845252A
Brain stereotaxic apparatus capable of being automatically adjusted
CN120458767A
Operating table module and electrode implantation equipment for animals
CN121774675A
Multi-needle mouse positioning injection device
CN121845793A
