Transfer body segmentation method and device based on deep learning
By combining deep learning methods with U-Net and YOLOv8s networks, the problems of low efficiency of manual annotation and poor robustness of traditional algorithms in transfer volume segmentation are solved, and efficient automated segmentation and quantitative analysis of transfer volumes are achieved.
Patent Information
- Application Number
- CN202610017426.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-07
- Publication Date
- 2026-05-01
AI Technical Summary
In existing biological research, the segmentation of migration bodies relies on manual annotation, which is inefficient and easily affected by subjective factors. Traditional algorithms have poor robustness and are difficult to distinguish between weak signals and background noise, resulting in low segmentation accuracy.
A deep learning-based transfer object segmentation method is adopted, which combines the U-Net denoising model and the YOLOv8s target detection network. Through preprocessing, recognition and segmentation, multi-target tracking and interactive correction, the automatic recognition and quantitative analysis of transfer objects are realized.
It achieves efficient and automated segmentation of the migration body, improves recognition accuracy and analysis efficiency, adapts to the image styles of different laboratories and microscope equipment, and reduces the reliance on manual annotation.
Smart Images

Figure CN121962600A_ABST
Abstract
Description
Deep Learning-Based Transfer Volume Segmentation Method and Apparatus Technical Field
[0001] This invention relates to the field of biomedical image processing technology, and in particular to a transfer volume segmentation method and apparatus based on deep learning. Background Technology
[0002] With the development of life sciences, migratory organisms, as a newly discovered organelle, are receiving increasing attention for their role in cell communication, mitochondrial quality control, and other areas. In existing biological research, researchers typically obtain cell image sequences containing migratory organisms using fluorescence microscopy or confocal microscopy, requiring further morphological analysis and motion trajectory tracking.
[0003] Currently, for the analysis of cells and subcellular structures, there are some basic image processing software (such as ImageJ) or machine learning-based segmentation methods. These methods typically rely on manually set thresholds, edge detection operators, or morphological parameters. However, in the field of migration volume segmentation, there are currently no machine learning-based automatic segmentation methods; segmentation and counting must be performed manually using image processing software.
[0004] Although existing general-purpose image processing tools are widely used, they suffer from the following significant drawbacks in the analysis of migratory organisms, a specific organelle: 1. Inefficiency due to reliance on manual annotation: Current research primarily relies on manual labeling and counting. Because migratory organisms are tiny, numerous, and densely distributed, manual annotation is not only time-consuming and labor-intensive but also easily influenced by subjective factors, leading to poor data consistency. 2. Poor robustness of traditional algorithms: Microscopic imaging is often accompanied by Poisson noise or background fluorescence interference. Traditional thresholding segmentation algorithms struggle to distinguish weak migratory organism signals from background noise and cannot effectively handle the variability of cell morphology, resulting in low segmentation accuracy. Summary of the Invention
[0005] The main objective of this invention is to provide a transfer volume segmentation method based on deep learning.
[0006] Another objective of this invention is to propose a transfer volume segmentation device based on deep learning.
[0007] The third objective of this invention is to provide a computer device.
[0008] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.
[0009] To achieve the above objectives, a first aspect of the present invention proposes a deep learning-based transfer volume segmentation method, comprising: S1: preprocessing the imported raw image data based on loading pre-trained U-Net denoising model weights; S2: recognizing and segmenting the preprocessed image data using a pre-trained YOLOv8s object detection network; S3: dividing multi-frame time-series microscopic images into multiple consecutive frames, and using a multi-target tracking algorithm to predict the motion trajectory and extract appearance features of the targets respectively; S4: using a GUI-based interactive correction function for visual overlay, batch importing images and correcting the target detection boxes frame by frame; S5: training based on the acquired transfer volume microscopic images to obtain preliminary pre-trained weights, and training the network using user-specific data to obtain optimal weights; S6: structurally integrating the raw data obtained from detection and tracking, extracting key information, automatically writing it into a file and generating statistical charts, and compressing and storing it to a specified output directory.
[0010] Optionally, the Neighbor2Neighbor self-supervised denoising method is used for fine-tuning training on the acquired migration body microscopic image dataset. U-Net is used as the network structure to obtain a pre-trained denoising model suitable for migration body microscopic images. The loss function during training is... As shown in the formula:
[0011]
[0012]
[0013] in, It is the original noisy input image. It is a denoising U-Net neural network. and It is an adjacent downsampling function. It is the reconstruction loss function. It is a regularized loss function; after loading the pre-trained denoising weights, the model is mapped through an end-to-end U-Net convolutional neural network to output a high-quality image after noise removal.
[0014] Optionally, a pre-trained YOLOv8s object detection network is used to identify and segment the pre-processed image data, including: inputting the pre-processed image into the YOLOv8s object detection network for forward inference, and the network outputting prediction results containing the target bounding box coordinates, category, and confidence level; processing the original predictions using a non-maximum suppression algorithm, removing redundant boxes with high overlap using an intersection-overlap ratio threshold, and filtering low-quality detection results based on a confidence level threshold, thereby locking the location of high-confidence migrants; calculating the parameters of each migrant based on the geometric information of the predicted bounding box, including center coordinates, border area, and aspect ratio, automatically writing the data to an Excel file, and simultaneously generating statistical charts.
[0015] Optionally, the multi-frame time-series microscopic images are divided into multiple consecutive frames. A multi-target tracking algorithm is used to predict the motion trajectory and extract the appearance features of the targets, including: calculating the distance between the predicted target bounding box and the detection box between adjacent frames, and performing cascade matching based on the cross-union ratio, assigning a unique track_id to the same migrater; wherein, the track_id encoding rule follows a linear incrementing logic, the targets in the initial frame are numbered sequentially, and the newly identified targets in subsequent frames are incremented sequentially based on the current maximum ID; for temporarily lost targets, a maximum number of frames are set to buffer and maintain ID continuity, and the trajectory update is terminated for targets that are confirmed to have disappeared.
[0016] Optionally, the GUI-based interactive correction function can be used to visualize the overlay, batch import images and correct the target detection boxes frame by frame, including: overlaying the segmentation results as layers on the original image, clicking Add BBox to add missed target detection boxes, dragging the edge of the detection box to modify the segmentation range, or pressing the Delete key to delete falsely detected target detection boxes; the final corrected target detection box results are stored in a txt file in YOLO bounding box format, and saved one-to-one with the original image name.
[0017] Optionally, training can be performed based on the acquired microscopic images of the migrant body to obtain preliminary pre-trained weights, including: selecting preset pre-trained weights, input image folder, annotation txt folder, category name, and number of training rounds; calling the training script to train the network based on specific data; after training, calling the pre-divided validation set data for forward inference, calculating the intersection-union ratio between the predicted bounding boxes and the ground truth labels, statistically analyzing the confusion matrix, and calculating key performance indicators including precision, recall, and mean precision; based on the evaluation results, saving the weight file with the best convergence performance.
[0018] To achieve the above objectives, a second aspect of the present invention proposes a deep learning-based transfer volume segmentation device, comprising: a preprocessing module for preprocessing imported raw image data based on pre-trained U-Net denoising model weights; a recognition and segmentation module for recognizing and segmenting the preprocessed image data using a pre-trained YOLOv8s target detection network; a time-series tracking module for dividing multi-frame time-series microscopic images into multiple consecutive frames and using a multi-target tracking algorithm to predict the motion trajectory and extract appearance features of the targets respectively; a correction module for visually overlaying images using a GUI-based interactive correction function, batch importing images and correcting target detection boxes frame by frame; a training module for training based on the acquired transfer volume microscopic images to obtain preliminary pre-trained weights; and an output module for structurally integrating the raw data obtained from detection and tracking, extracting key information, automatically writing the data to a file and generating statistical charts, and compressing and storing the data to a specified output directory.
[0019] To achieve the above objectives, a third aspect of this application provides a computer device comprising a processor and a memory; wherein the processor runs a program corresponding to the executable program code stored in the memory to implement the deep learning-based transfer volume segmentation method as described in the first aspect embodiment.
[0020] To achieve the above objectives, a fourth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the deep learning-based transfer volume segmentation method as described in the first aspect embodiment.
[0021] The embodiments of the present invention have the following beneficial effects: By combining a specialized U-Net denoising model and a YOLOv8 detection model, constructing an interactive correction + local training closed-loop design and building a simple operation interface, the present invention realizes the batch automated processing of migration body identification in low signal-to-noise ratio microscopic images, significantly shortens the analysis time, improves the recognition accuracy, adapts to the image styles of different laboratories and microscopic equipment, and solves the problem of poor generalization of general models on specific data, allowing users without programming knowledge to train models that are adapted to their own data. Attached Figure Description
[0022] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of embodiments in conjunction with the accompanying drawings, in which: FIG1 is a flowchart of a transfer volume segmentation method based on deep learning provided by an embodiment of the present invention; FIG2 is an overall functional architecture diagram of a transfer volume segmentation method based on deep learning provided by an embodiment of the present invention; FIG3 is a structural diagram of a transfer volume segmentation device based on deep learning provided by an embodiment of the present invention. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] The following description, with reference to the accompanying drawings, describes a deep learning-based transfer volume segmentation method and apparatus according to embodiments of the present invention.
[0026] Example 1 This example provides a transfer model segmentation method based on deep learning. As shown in Figures 1 and 2, the method includes the following steps: S1: Preprocessing the imported raw image data based on the pre-trained U-Net denoising model weights loaded into the system.
[0027] In order to remove the noise unique to the microscopic imaging of migratory bodies, output high-quality images, and provide clear input data for subsequent image segmentation, the microscopic imaging analysis system of this application has a built-in dedicated image denoising function.
[0028] In this embodiment, when a user needs to denoise a microscopic image of a migratory body, the user first imports the original noisy microscopic image data into the microscopic imaging analysis system of this application. After receiving the original image data, the system automatically loads the pre-trained U-Net denoising model weights. These model weights are not general weights, but rather special weights optimized specifically for the characteristics of migratory body microscopic images. In this embodiment, the acquisition process of these weights is as follows: using the Neighbor2Neighbor self-supervised denoising method, with a specially collected migratory body microscopic image dataset as training samples, the initial model built based on the U-Net network structure is fine-tuned and trained. Through multiple rounds of iterative optimization, pre-trained model weights suitable for denoising migratory body microscopic images are finally obtained. These weights can accurately match the noise distribution characteristics and image texture characteristics of migratory body microscopic images, resulting in better denoising performance.
[0029] In the embodiments of this application, the loss function used in the above model fine-tuning training process is... From the reconstruction loss function With regularization loss function The weighted summation yields the following mathematical expression: ; ;
[0030] in, It is the original noisy input image. It is a denoising U-Net neural network. and It is an adjacent downsampling function. It is the reconstruction loss function. It is a regularization loss function. By processing the original noisy input image through these two sets of adjacent downsampling functions, two sub-images with independent noise points can be obtained, providing data support for self-supervised training.
[0031] In the embodiments of this application, As a reconstruction loss function, its core function is to characterize the pixel difference between the denoising network's denoising processing result of sub-image 1 and sub-image 2. This loss function can constrain the network to improve the reconstruction accuracy of sub-images and ensure the integrity of details in the denoised image. As a regularization loss function, it characterizes the difference between the results obtained from two different processing steps. Specifically, it represents the pixel difference between result 1 (obtained by downsampling the original noisy input image and then processing it through a denoising network) and result 2 (obtained by downsampling the original noisy input image and then processing it through a denoising network). This loss function can effectively constrain the training process of the network, avoid overfitting, and improve the generalization ability of the model. In this embodiment, the two loss functions are weighted and summed, where... The weight coefficients of the regularization loss function can be flexibly adjusted according to actual training needs. Ultimately, it can effectively constrain the denoising network to complete self-supervised training using only the information of adjacent pixels within a single noisy image, without relying on pairs of noisy and clean images. This significantly reduces the cost of acquiring training data and also improves the model's adaptability to microscopic images of transfer bodies.
[0032] In this embodiment of the application, after the system completes the loading of the pre-trained denoising model weights, the imported original noisy transfer body microscopic image is input into the U-Net denoising model. The model processes the image through an end-to-end convolutional neural network mapping, that is, it downsamples the image through the encoding path of the U-Net network to extract image features, and then upsamples the image through the decoding path to restore and reconstruct the image features, and finally outputs a high-quality transfer body microscopic image after removing noise interference.
[0033] In this embodiment, the original noisy microscopic image of the transfer body is denoised by loading the weights of the U-Net denoising model trained by the Neighbor2Neighbor self-supervised method, and a high-quality image is output, which lays the foundation for subsequent image recognition and segmentation.
[0034] S2: Use a pre-trained YOLOv8s object detection network to identify and segment pre-processed image data.
[0035] In order to accurately identify and perform quantitative analysis of the transfer objects in the pre-processed images, this application uses a pre-trained YOLOv8s network combined with a post-processing algorithm to achieve object detection, parameter calculation and statistical chart generation.
[0036] In this embodiment of the application, for the pre-processed microscopic image of the migratory body, the application uses a pre-trained YOLOv8s target detection network to perform the identification and segmentation of the migratory body. Through the high-precision detection capability of this network, the migratory body target in the image can be located quickly and accurately, and the quantitative parameters of the target can be output, providing complete data support for the quantitative analysis of the migratory body.
[0037] In this embodiment, the YOLOv8s object detection network has a hierarchical model structure, specifically comprising three core modules: First, a CSPDarknet backbone network for feature extraction. This backbone network, through residual connections and feature fusion techniques, can extract shallow texture features and deep semantic features of the migrater from the preprocessed image layer by layer, ensuring the comprehensiveness and effectiveness of feature extraction. Second, a neck network for multi-scale feature fusion. This neck network uses a combination of upsampling and downsampling to fuse feature maps of different scales output by the backbone network, effectively solving the detection problem of migrater targets of different sizes and improving the model's ability to recognize small migrater targets. Third, a detection head containing classification and regression branches. The classification branch is responsible for determining whether the target within the detection box is a migrater, while the regression branch is responsible for predicting the bounding box coordinates of the target. Through the collaborative work of the two branches, accurate identification and localization of the migrater target are achieved.
[0038] In this embodiment, before initiating the target detection process, the system first performs image data reading and preprocessing operations. During the data reading phase, the system automatically traverses all files in the target folder according to preset file filtering rules, i.e., only filtering image files with the extensions .png, .jpg, or .GIF, filtering out non-image files that do not meet the format requirements, ensuring the validity and standardization of the input data. After completing the file filtering, the system performs scaling and normalization processing on the selected migration microscopic images. The scaling operation adjusts the image size to the standard input size of the YOLOv8s model, avoiding detection errors caused by image size mismatch. The normalization operation maps the image pixel values to a preset range, eliminating the impact of pixel value differences on model inference and ensuring the consistency of the input data.
[0039] In this embodiment, after image data preprocessing is completed, the system inputs the preprocessed image into the YOLOv8s object detection network for forward inference. After layer-by-layer processing by each module of the network, the final output is a prediction result containing the target bounding box coordinates, target category, and confidence score. The bounding box coordinates are used to locate the position of the migrating object, and the confidence score is used to characterize the reliability of the model's detection results. To further improve the accuracy of the detection results, the system performs post-processing on the original prediction results output by the network. Specifically, it adopts a non-maximum suppression algorithm, which removes redundant detection boxes with high overlap by setting a reasonable intersection-union ratio (IUU) threshold to avoid repeated detection of the same migrating object. At the same time, based on a preset confidence score threshold, it filters out low-quality detection results with confidence scores below the threshold, and finally locks the position of the migrating object with high confidence.
[0040] In this embodiment, after accurately identifying and locating the migratory targets, the system automatically calculates key quantitative parameters for each migratory target based on the geometric information of the predicted bounding box. These parameters include the migratory's center coordinates, border area, and aspect ratio. These parameters intuitively reflect the morphological characteristics and distribution patterns of the migratory targets. Based on this, the system automatically writes all the aforementioned quantitative data into an Excel file, generating a structured data report for easy viewing and analysis. Simultaneously, the system also generates statistical charts such as area distribution maps and scatter plots. The area distribution map displays the quantity distribution of migratory targets in different area ranges, while the scatter plot displays the spatial distribution characteristics of migratory targets in the image. These visualized statistical charts help users more intuitively grasp the overall distribution patterns of the migratory targets.
[0041] In this embodiment, a pre-trained YOLOv8s object detection network is used to identify and segment the migrants in the preprocessed image. The detection results are optimized by combining the non-maximum suppression algorithm, and quantification parameters are calculated and statistical charts are generated, laying the foundation for subsequent quantitative analysis of the migrants.
[0042] S3: Divide the multi-frame time-series microscopic images into multiple consecutive frames, and use a multi-target tracking algorithm to predict the motion trajectory and extract the appearance features of the targets respectively.
[0043] To achieve quantitative analysis of the dynamic processes of migrating bodies in video or multi-frame time-series microscopic images, this application assigns a unique track_id to the target and outputs tracking data through a multi-target tracking algorithm.
[0044] In this embodiment of the application, for video data in formats such as .mp4 and .avi, and multi-frame time-series microscopic images in formats such as .png and .GIF, in order to realize quantitative analysis of the dynamic motion process of the migrating body, the microscopic imaging analysis system of this application is equipped with a dedicated multi-target tracking function. This function can perform trajectory tracking and identification of the migrating body in continuous frames, and output tracking data containing time dimension information, providing complete data support for the study of the dynamic behavior of the migrating body.
[0045] In this embodiment, when the system receives video data or multi-frame time-series microscopic images, it first performs data preprocessing. For video data in formats such as .mp4 and .avi, the system divides the complete video stream into multiple consecutive image frames arranged in chronological order based on the video's frame rate parameters, ensuring the temporal continuity and integrity of the frame sequence. For multi-frame time-series microscopic images in formats such as .png and .GIF, the system directly sorts the image frames according to preset file naming rules or acquisition time order to construct an ordered frame sequence dataset.
[0046] In this embodiment, after the frame sequence is constructed, the system calls a multi-target tracking algorithm based on the DeepSORT framework to perform tracking and analysis of the migrating object. This multi-target tracking algorithm performs two core operations: first, predicting the target's trajectory. Based on a Kalman filter model, the algorithm uses the position, velocity, and other state information of the migrating object in the previous frame to predict the target position in the current frame, providing a prediction box reference for subsequent matching; second, extracting the target's appearance features. The algorithm uses a feature extraction network to extract high-dimensional appearance feature vectors from the detection box region of the migrating object, which are used to distinguish different migrating object targets and improve the accuracy of target matching.
[0047] In this embodiment, after predicting the target motion trajectory and extracting appearance features, the system performs target matching operations between adjacent frames. Specifically, the system measures the similarity of the target's motion state by calculating the Mahalanobis distance between the predicted target bounding box and the detection box between adjacent frames, and simultaneously calculates the cosine distance between the appearance feature vectors corresponding to the detection boxes to measure the similarity of the targets' appearance. Combining these two distance parameters and introducing an intersection-union threshold for constraint, the system performs a cascaded matching operation. Through this matching operation, the same migrating target in adjacent frames is associated and assigned a unique track_id, thus identifying the migrating target.
[0048] In this embodiment, the encoding rule of track_id follows a linear increment logic. Specifically, the encoding method is as follows: taking the initial frame of the frame sequence as a reference, all migrant targets identified in the initial frame are numbered sequentially to generate an initial track_id sequence; for newly identified migrant targets in subsequent frames, the system increments the currently allocated maximum track_id value sequentially to generate a new track_id; for targets temporarily lost during tracking, the system sets a maximum number of frames to be retained as a buffer threshold. Within the threshold range, the track_id of the target is retained and its position is continuously predicted. When the target is detected again, its trajectory tracking can be directly resumed, maintaining the continuity of track_id; for targets that have not been detected after exceeding the maximum number of frames to be retained and have been confirmed to have disappeared, the system terminates its trajectory update and marks the corresponding track_id as invalid.
[0049] In this embodiment of the application, after completing the multi-target tracking of the entire frame sequence, the system integrates all tracking data and finally outputs a complete tracking result containing timestamps, track_ids, and the coordinates (x1, y1, x2, y2) of each time point of the migrated object. This result can clearly present the position information and motion trajectory of each migrated object at different time points, and realize the quantitative analysis of the dynamic process of the migrated object.
[0050] In this embodiment, by processing video or multi-frame time-series microscopic images into continuous frames, calling the DeepSORT-based multi-target tracking algorithm to complete target matching and assigning a unique track_id, and outputting tracking data containing timestamps and coordinates, quantitative analysis of the dynamic process of the migrating body is realized, laying the foundation for subsequent interactive correction.
[0051] S4: Utilize GUI-based interactive correction functionality to visualize overlay, batch import images, and correct target detection boxes frame by frame.
[0052] To address the issues of missed or false detections in the model, this application provides a GUI-based interactive correction function to generate accurately labeled data to support local model training.
[0053] In this embodiment of the application, in order to solve the problem of missed detection or false detection in the model during the target detection process of the migrating body and to ensure the accuracy and usability of the detection results, the microscopic imaging analysis system of this application is configured with a GUI-based interactive correction function and supports the visualization overlay display of this function. The detection results are accurately corrected through human-computer interaction, providing high-quality labeled data for subsequent local model training.
[0054] In this embodiment, the GUI-based interactive correction function supports batch import of microscopic images of migratory bodies to be corrected. After import, the system can provide users with a frame-by-frame viewing and correction interface according to the image naming order or acquisition time order, meeting the correction needs of large batches of image data. In the correction interface, the system overlays the target segmentation results output by the model onto the original microscopic image as an independent layer. The transparency of this layer can be adjusted according to user needs, which can clearly present the position and range of the detection box without obscuring the details of the migratory body target in the original image, making it easy for users to quickly identify missed or falsely detected target areas.
[0055] In this embodiment, users can correct detection results through simple interactive operations: for transfer targets missed by the model, users can click the "Add BBox" button on the interface to draw a new target detection box on the original image with the mouse, accurately select the missed transfer targets, and complete the target detection results; for target detection boxes with inaccurate detection ranges, users can directly drag the edges or vertices of the detection box to adjust the position and size of the detection box, so that the detection box accurately matches the actual boundary of the transfer target; for target detection boxes that are falsely detected by the model, users can select the corresponding detection box and press the "Delete" key to quickly delete the false detection box and eliminate invalid detection results.
[0056] In this embodiment, after the user completes the bounding box correction operation for all image frames, the system automatically stores the corrected target detection box results in YOLO bounding box format, specifically as a TXT text file. The naming of this TXT file corresponds one-to-one with the name of the original microscopic image file, facilitating file retrieval and management for the user. The stored YOLO format data contains key information such as the center point coordinates and width / height dimensions of the target detection boxes, which can be directly used for subsequent local model training.
[0057] In this embodiment of the application, by providing a GUI-based interactive correction function, users can visualize and overlay the segmentation results and correct the target detection boxes frame by frame. The correction results are stored as txt files in YOLO format, which solves the problem of missed or false detections by the model and provides accurate labeled data for local training, laying the foundation for subsequent local training.
[0058] S5: Training is performed based on the acquired microscopic images of the migrating body to obtain preliminary pre-trained weights.
[0059] To improve the target detection accuracy of the system in user-specific transfer experiment scenarios, this application designs a complete local model training and evaluation process, which generates the optimal model weights adapted to specific scenarios through targeted training based on user-defined data.
[0060] In this embodiment, before conducting local model training, the initial pre-training weights are first obtained. This application uses self-collected microscopic images of transfer bodies as the initial training dataset. The dataset is input into the object detection network for initial training. After multiple rounds of iterative optimization, preliminary pre-training weights with basic transfer body detection capabilities are obtained. These initial pre-training weights provide a good model initialization foundation for subsequent personalized training by users, which can effectively improve the convergence speed of subsequent training and reduce the time cost of model training.
[0061] In this embodiment, users can set local training parameters through the system's visual interface, which is convenient and flexible. Specific parameter settings include: First, users can select corresponding preliminary pre-training weights from the system's preset weight list. These preset weights are optimized for transfer body detection and can adapt to the characteristics of transfer body microscopic images. Second, users need to specify an input image folder and a labeling txt folder. The image folder stores the transfer body microscopic images to be trained, and the labeling txt folder stores YOLO format labeling data corresponding to each image. The system can automatically read the corresponding data from both folders to ensure the integrity and validity of the training data. Third, users need to input the transfer body's category name to specify the model's detection target category. Fourth, users can set the number of training rounds according to their training needs. The system supports flexible adjustment of the number of training rounds to meet training scenarios with different accuracy requirements.
[0062] In this embodiment, after the user completes the setting of all training parameters and submits the training instruction, the system backend will automatically call the preset model training script. Based on the user-selected pre-trained weights and the uploaded specific dataset, the system will perform personalized fine-tuning training on the object detection network. During the training process, the system will gradually update the network weights according to preset hyperparameters such as batch size and learning rate, so that the model can continuously adapt to the image features of the transfer object in the user's specific experimental scenario and improve the detection performance of the model in that scenario.
[0063] In this embodiment, after the model training process is completed, the system does not directly save the weight file of the final training round. Instead, it first performs a model performance evaluation to ensure that the saved weights have the best detection effect. Specifically, the system automatically calls the pre-divided validation set data, inputs the validation set images into the trained model for forward inference, and obtains the model's predicted bounding box results. Subsequently, the system constructs a complete confusion matrix by calculating the intersection-union ratio (IUU) between the predicted bounding boxes and the ground truth bounding boxes. This confusion matrix can clearly present the model's true positive, false positive, true negative, and false negative detection results. Based on this confusion matrix, the system further automatically calculates key performance indicators such as precision, recall, and mean precision. These indicators reflect the model's detection accuracy and generalization ability from different dimensions, providing a quantitative basis for evaluating model performance.
[0064] In this embodiment, the system filters all weight files generated during training based on the aforementioned quantitative performance evaluation results, ultimately saving the weight file with the best convergence effect and performance index, thus avoiding performance degradation caused by model overfitting or underfitting. Once the optimal weight file is saved, the user can immediately load it into the system and apply it to subsequent transfer body microscopic image analysis in similar experimental scenarios. Through this personalized training and iterative optimization approach, the system's target detection accuracy in specific experimental scenarios can be continuously improved, meeting the user's high-precision and personalized transfer body analysis needs.
[0065] In this embodiment, preliminary pre-training weights are obtained based on independently collected data, allowing users to configure training parameters for local training. Performance metrics are calculated by combining validation set inference results and the optimal weights are saved, thereby improving the system's analysis accuracy in specific experimental scenarios.
[0066] S6: The system performs structured integration of the raw data obtained from detection and tracking, extracts key information, automatically writes it to a file, generates statistical charts, and compresses and stores it to the specified output directory.
[0067] To achieve automated batch output and standardized management of migration detection and tracking analysis results, this application designs a complete data integration, statistical visualization and packaging storage process to transform scattered raw data into structured and visualized analysis results.
[0068] In this embodiment, the system first performs a structured integration operation on the raw data. The data source for integration is the full amount of raw data output by the detection and tracking module. During the integration process, the system accurately extracts two types of core key information from the raw data: the first type is the spatiotemporal feature information of the migrater, which specifically includes the spatiotemporal coordinates of the migrater in different time frames and the unique track_id used for identification; the second type is the morphological feature parameters of the migrater, which specifically includes quantitative parameters that can reflect the shape of the target, such as the area of the migrater's border and the aspect ratio. Through the above extraction operation, the system transforms the originally scattered and irregular raw data into structured data with clear classification, laying the foundation for subsequent data processing.
[0069] In this embodiment, after the data structure integration is completed, the system will simultaneously perform data serialization storage and statistical visualization operations. On the one hand, the system writes the integrated spatiotemporal feature information and morphological feature parameters into an Excel file row by row according to a preset Excel spreadsheet format. The file will establish a relationship indexed by track_id to realize the corresponding association of data of different dimensions of the same migration body, which facilitates users to query, filter and perform secondary analysis of the data. On the other hand, the system automatically generates a variety of statistical visualization charts based on the integrated quantitative data, specifically including parameter distribution histograms and trajectory scatter plots. The parameter distribution histogram is used to intuitively display the distribution pattern of morphological parameters of the migration body, such as area, while the trajectory scatter plot is used to present the distribution characteristics of the migration body's motion trajectory in the time dimension. Through visualization charts, users can quickly grasp the overall analysis results of the migration body.
[0070] In this embodiment, after data storage and statistical chart generation are completed, the system will perform the final automated packaging and storage operation. The system will automatically retrieve and collect all result files generated during the analysis, specifically including Excel files storing structured data, various statistical visualization charts, and migration segmentation result files. The system will then package and compress all these files into a RAR archive, with the archive naming convention consistent with the task name of this analysis task for easy file identification by the user. Finally, the system will automatically store the generated RAR archive in the user-specified output directory. The user can directly obtain the complete analysis results from this directory, thereby achieving automated batch output and standardized management of the analysis results.
[0071] In this embodiment, the raw data of the detection and tracking module is integrated in a structured manner, key information is extracted and serialized into an Excel file, statistical charts are generated, and finally all results are packaged into a RAR compressed file and stored in a specified directory, so as to realize the automated batch output and management of migration analysis results.
[0072] Example 2: This embodiment of the invention also provides a deep learning-based transfer body segmentation device, as shown in Figure 3. The device includes: a preprocessing module 100, used to preprocess imported raw image data based on pre-trained U-Net denoising model weights; a recognition and segmentation module 200, used to recognize and segment the preprocessed image data using a pre-trained YOLOv8s target detection network; a time-series tracking module 300, used to divide multi-frame time-series microscopic images into multiple consecutive frames, and use a multi-target tracking algorithm to predict the motion trajectory and extract appearance features of the targets respectively; a correction module 400, used to use a GUI-based interactive correction function to visualize overlay, batch import images and correct target detection boxes frame by frame; a training module 500, used to train based on the acquired transfer body microscopic images to obtain preliminary pre-trained weights; and an output module 600, used to structurally integrate the raw data obtained from detection and tracking, extract key information, automatically write the data to a file and generate statistical charts, and compress and store them to a specified output directory.
[0073] Example 3: To implement the method of the above embodiments, the present invention also provides a computer device, which includes a memory and a processor; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the various steps of the method described above.
[0074] Example 4 In order to implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing embodiments.
[0075] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0076] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0077] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A transfer volume segmentation method based on deep learning, characterized in that, include: S1: Preprocess the imported raw image data based on the pre-trained U-Net denoising model weights; S2: Use the pre-trained YOLOv8s target detection network to identify and segment the pre-processed image data; S3: Divide the multi-frame time-series microscopic images into multiple consecutive frames, and use a multi-target tracking algorithm to predict the motion trajectory and extract appearance features of the targets respectively. S4: Utilize GUI-based interactive correction functionality to visualize overlay, batch import images, and correct target detection boxes frame by frame; S5: Training is performed based on the collected microscopic images of the migrating body to obtain preliminary pre-trained weights. The network is then trained using user-specific data to obtain the optimal weights. S6: The system performs structured integration of the raw data obtained from detection and tracking, extracts key information, automatically writes it to a file, generates statistical charts, and compresses and stores it to the specified output directory.
2. The method as described in claim 1, characterized in that, The preprocessing of the imported raw image data based on the pre-trained U-Net denoising model weights loaded by the system also includes: fine-tuning the training on the acquired migration microscopic image dataset using the Neighbor2Neighbor self-supervised denoising method, using U-Net as the network structure to obtain a pre-trained denoising model suitable for migration microscopic images, and the loss function during the training process. As shown in the formula: in, It is the original noisy input image. It is a denoising U-Net neural network. and It is an adjacent downsampling function. It is the reconstruction loss function. It is a regularized loss function; after loading the pre-trained denoising weights, the model is mapped through an end-to-end U-Net convolutional neural network to output a high-quality image after noise removal.
3. The method as described in claim 1, characterized in that, The method of using a pre-trained YOLOv8s object detection network to identify and segment pre-processed image data further includes: inputting the pre-processed image into the YOLOv8s object detection network for forward inference, with the network outputting prediction results containing the target bounding box coordinates, category, and confidence level; processing the original prediction using a non-maximum suppression algorithm, removing redundant boxes with high overlap using an intersection-overlap ratio (IoU) threshold, and filtering low-quality detection results based on a confidence level threshold to locate high-confidence migrants; calculating the parameters of each migrant based on the geometric information of the predicted bounding box, including center coordinates, border area, and aspect ratio, automatically writing the data to an Excel file, and simultaneously generating statistical charts.
4. The method as described in claim 1, characterized in that, The process of dividing multi-frame time-series microscopic images into multiple consecutive frames and using a multi-target tracking algorithm to predict the motion trajectory and extract appearance features of the targets includes: calculating the distance between the predicted and detected bounding boxes of targets in adjacent frames and performing cascade matching based on the cross-union ratio (CUI), assigning a unique track_id to the same migrater; wherein the track_id encoding rule follows a linear incrementing logic, with targets in the initial frame numbered sequentially, and newly identified targets in subsequent frames incrementing sequentially based on the current maximum ID; for temporarily lost targets, a maximum number of frames are set for buffering to maintain ID continuity, and trajectory updates are terminated for targets that are confirmed to have disappeared.
5. The method as described in claim 1, characterized in that, The method of using GUI-based interactive correction function for visual overlay, batch importing images and correcting target detection boxes frame by frame also includes: overlaying the segmentation results on the original image as a layer, clicking Add BBox to add missed target detection boxes, dragging the edge of the detection box to modify the segmentation range, or pressing the Delete key to delete falsely detected target detection boxes; the final corrected target detection box results are stored in a txt file in YOLO bounding box format, and are saved one-to-one with the original image name.
6. The method as described in claim 1, characterized in that, The training based on the acquired microscopic images of the migrant body to obtain preliminary pre-trained weights also includes: selecting preset pre-trained weights, input image folder, annotation txt folder, category name, and number of training rounds; calling the training script to train the network based on specific data; after training, calling the pre-divided validation set data for forward inference, calculating the intersection-union ratio between the predicted bounding boxes and the ground truth labels, statistically analyzing the confusion matrix, and calculating key performance indicators including precision, recall, and mean precision; based on the evaluation results, saving the weight file with the best convergence performance.
7. A transfer volume segmentation device based on deep learning, characterized in that, include: The preprocessing module is used to preprocess the imported raw image data based on the pre-trained U-Net denoising model weights. The recognition and segmentation module is used to recognize and segment pre-processed image data using a pre-trained YOLOv8s object detection network. The time-series tracking module is used to divide multi-frame time-series microscopic images into multiple consecutive frames, and use a multi-target tracking algorithm to predict the motion trajectory and extract the appearance features of the targets respectively. The correction module is used to visually overlay and batch import images using GUI-based interactive correction functions, and correct the target detection boxes frame by frame. The training module is used to train based on the acquired microscopic images of the migration body to obtain preliminary pre-trained weights; The output module performs structured integration of the raw data obtained from detection and tracking, extracts key information, automatically writes it to a file and generates statistical charts, and compresses and stores it to the specified output directory.
8. A computer device, characterized in that, It includes a processor and a memory; wherein the processor runs a program corresponding to the executable program code stored in the memory to implement the deep learning-based transfer volume segmentation method as described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the deep learning-based transfer volume segmentation method as described in any one of claims 1-6.