Information processing method, device, equipment and storage medium based on cell segmentation

By extracting the location information of cells and barcode microspheres during cell segmentation, the problem of low cell analysis efficiency and accuracy in the prior art is solved, and more efficient and accurate cell analysis is achieved.

CN116823761BActive Publication Date: 2025-04-29BMKMANU TECH CO LTD

Patent Information

Application Number
CN202310752008.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2025-04-29
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

The prior art fails to combine the cell segmentation results with the barcode microsphere information in the biochip after cell segmentation, resulting in low efficiency and accuracy of cell analysis.

Method used

By obtaining the corrected scanning images, cell segmentation is performed, the barcode microsphere position information corresponding to each cell in the cell segmentation results is extracted, and the accurate position information of the cell and the statistical information of the barcode microsphere are determined.

Benefits of technology

The cell segmentation results are combined with the barcode microsphere information in the biochip, which improves the efficiency and accuracy of cell analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116823761B_ABST
    Figure CN116823761B_ABST
Patent Text Reader

Abstract

The present invention provides an information processing method, device, equipment and storage medium based on cell segmentation, which relates to the field of biological information technology. The method includes: obtaining a corrected scanned image; the scanned image is obtained based on a tissue slice attached to a biochip; performing cell segmentation on the scanned image to obtain a cell segmentation result; based on the inherent position of each barcode microsphere in the biochip, extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result; based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, determining the first position information of each cell and the statistical information of the corresponding barcode microsphere. The present invention can improve the efficiency and accuracy of cell analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bioinformatics, and in particular to an information processing method, device, equipment and storage medium based on cell segmentation. Background Art

[0002] With the development of computer vision and machine learning technology, more and more automated cell segmentation methods have been proposed and applied. These methods mainly include edge detection, threshold segmentation, morphological operation, region growing, image segmentation and deep learning.

[0003] However, the prior art does not combine the cell segmentation results with the biochip containing the barcoded microspheres after cell segmentation, resulting in the inability to obtain the accurate location information of each cell and the statistical information of the corresponding barcoded microspheres, thereby resulting in low efficiency and accuracy of cell analysis. Summary of the invention

[0004] The present invention provides an information processing method, device, equipment and storage medium based on cell segmentation, which are used to solve the defects of low efficiency and accuracy of cell analysis in the prior art.

[0005] The present invention provides an information processing method based on cell segmentation, comprising:

[0006] Acquire a corrected scanned image; the scanned image is obtained based on a tissue slice attached to a biochip;

[0007] Performing cell segmentation on the scanned image to obtain a cell segmentation result;

[0008] Based on the inherent position of each barcode microsphere in the biochip, extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result;

[0009] Based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, the first position information of each cell and the statistical information of the corresponding barcode microsphere are determined.

[0010] According to an information processing method based on cell segmentation provided by the present invention, the cell segmentation result includes a cell nucleus boundary segmentation result and a cell boundary segmentation result; performing cell segmentation on the scanned image to obtain the cell segmentation result includes:

[0011] Splitting the scanned image into a plurality of sub-images;

[0012] For each of the subgraphs, preprocess the subgraph to obtain a target subgraph;

[0013] Acquire a pre-trained model that matches the cell type of the tissue section, and use the pre-trained model to predict the cell nucleus boundary segmentation result of the target sub-image to obtain the cell nucleus boundary segmentation result of each cell nucleus in the target sub-image;

[0014] Merging the target sub-images to obtain a target image;

[0015] Merging the cell nucleus boundary segmentation results of each cell nucleus in each of the target sub-images to obtain the cell nucleus boundary segmentation results of each cell nucleus in the target image;

[0016] The cell nucleus boundary segmentation result of each cell nucleus in the target image is expanded to generate the cell boundary segmentation result of each cell in the target image.

[0017] According to an information processing method based on cell segmentation provided by the present invention, the scanning image is split into multiple sub-images, including:

[0018] Using a custom sliding window to split the scanned image into a plurality of initial sub-images;

[0019] The edge boundary lines of the multiple initial sub-images are fine-tuned to obtain the multiple sub-images.

[0020] According to an information processing method based on cell segmentation provided by the present invention, for each of the sub-graphs, pre-processing the sub-graph to obtain a target sub-graph includes:

[0021] For each of the sub-images, pre-processing including equalization, size adjustment, color space conversion, corrosion, expansion and pixel value normalization is performed on the sub-image to obtain the target sub-image.

[0022] According to an information processing method based on cell segmentation provided by the present invention, the cell nucleus boundary segmentation result of each cell nucleus in the target image is expanded to generate the cell boundary segmentation result of each cell in the target image, including:

[0023] Generate a binary image based on the cell nucleus boundary segmentation result of each cell nucleus in the target image;

[0024] Calculating a distance map of the binary image by distance transformation; the distance map is used to characterize the distance from each pixel to the nearest cell nucleus boundary;

[0025] The distance map and the preset cell boundary threshold are processed by using a watershed algorithm to obtain the cell boundary segmentation result of each cell in the target image.

[0026] According to an information processing method based on cell segmentation provided by the present invention, based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere corresponding to each cell in the cell segmentation result is extracted, comprising:

[0027] Calculating the central coordinate position of each barcode microsphere in the biochip based on the intrinsic position of each barcode microsphere;

[0028] Extracting a region corresponding to a position in the cell data of the cell segmentation result based on the center coordinate position;

[0029] Create a circular mask, and multiply the cell data in the area by the circular mask to obtain the cell data within the circular range;

[0030] The cell data within each circular range are counted to obtain the position information of the barcode microsphere corresponding to each cell in the cell segmentation result.

[0031] According to the present invention, an information processing method based on cell segmentation further comprises:

[0032] Performing bioinformatics analysis on the first position information of each cell and the statistical information of the corresponding barcoded microsphere to obtain an expression matrix of the cell corresponding to each first position information;

[0033] Performing clustering processing on the expression matrix corresponding to each of the cells to obtain cell clustering information;

[0034] Based on the cluster number of each cell in the cell clustering information, a cell region corresponding to each cluster number in the scanned image is drawn with a corresponding color to obtain a cluster image;

[0035] Generating second position information of each of the cells in the cluster image by searching for cell contours on the cluster image;

[0036] The cluster image and the second position information of each of the cells in the cluster image are visually displayed.

[0037] The present invention also provides an information processing device based on cell segmentation, comprising:

[0038] An acquisition module, used to acquire a corrected scanned image; the scanned image is obtained based on a tissue slice attached to the biochip;

[0039] A segmentation module, used to perform cell segmentation on the scanned image to obtain a cell segmentation result;

[0040] An extraction module, used for extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result based on the inherent position of each barcode microsphere in the biochip;

[0041] The determination module is used to determine the first position information of each cell and the statistical information of the corresponding barcode microsphere based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result.

[0042] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the information processing method based on cell segmentation as described above are implemented.

[0043] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the information processing method based on cell segmentation as described in any one of the above are implemented.

[0044] The information processing method, device, equipment and storage medium based on cell segmentation provided by the present invention first obtain a corrected scan image, which is obtained based on a tissue slice attached to a biochip, so that an accurate and corrected scan image can be obtained before cell segmentation; then, cell segmentation is performed on the scan image to obtain a cell segmentation result; based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere corresponding to each cell in the cell segmentation result is extracted; the cell segmentation result and the biochip containing the barcode microsphere are combined to extract the position information of the barcode microsphere corresponding to a single cell; finally, based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, the first position information of each cell and the statistical information of the corresponding barcode microsphere are determined, and the accurate position information of each cell and the statistical information of the corresponding barcode microsphere can be statistically calculated based on the position information of the barcode microsphere corresponding to the single cell, thereby improving the efficiency and accuracy of cell analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 is a schematic flow chart of an information processing method based on cell segmentation provided by an embodiment of the present invention;

[0047] Figure 2Schematic diagram of the substrate pattern of the Biotron S1000 spatial transcriptome chip provided in an embodiment of the present invention;

[0048] Figure 3 is a schematic diagram of a corrected scanned image provided by an embodiment of the present invention;

[0049] Figure 4 is a schematic diagram of a cell nucleus boundary segmentation result provided by an embodiment of the present invention;

[0050] Figure 5 is a schematic diagram of a cell boundary segmentation result provided by an embodiment of the present invention;

[0051] Figure 6 is a schematic diagram of a cluster image provided by an embodiment of the present invention;

[0052] Figure 7 is a schematic diagram of the structure of an information processing device based on cell segmentation provided by an embodiment of the present invention;

[0053] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Combine the following Figures 1 to 6 The information processing method based on cell segmentation of the present invention is described.

[0056] Please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of an information processing method based on cell segmentation provided by an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:

[0057] Step 101, obtaining a corrected scan image; the scan image is obtained based on a tissue slice attached to a biochip;

[0058] Step 102, performing cell segmentation on the scanned image to obtain a cell segmentation result;

[0059] Step 103, based on the inherent position of each barcode microsphere in the biochip, extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result;

[0060] Step 104: Based on the position information of the barcoded microsphere corresponding to each cell in the cell segmentation result, determine the first position information of each cell and the statistical information of the corresponding barcoded microsphere.

[0061] In step 101, the biochip may be a spatial transcriptome chip, for example: Figure 2 The Biotron S1000 spatial transcriptome chip shown is not limited to this embodiment.

[0062] The tissue slice can be a tissue slice of a plant or an animal. The tissue slice is attached to a biochip.

[0063] The scanned image may be a fluorescent scanned image or a bright field scanned image, but the present embodiment is not limited thereto.

[0064] Taking the tissue slice of mouse testis as an example, we first collect multiple scanned images through the scanner, and then stitch the multiple scanned images together to obtain the initial scanned image. Due to the systematic error of the scanner, the initial scanned image usually has misalignment, missing, and overlap. Therefore, before cell segmentation, it is necessary to correct the initial scanned image to obtain Figure 3 The corrected scanned image shown. The corrected scanned image has no seamless errors, and the image position has been corrected to the correct base plate distribution, so that the corrected scanned image is consistent with the actual situation.

[0065] In step 102, cell segmentation refers to separating cells in a tissue slice from background and other cells in order to accurately measure the gene expression of each cell.

[0066] Specifically, each cell in the scanned image is separated from the background and other cells to obtain a cell segmentation result.

[0067] In step 103, the biochip contains barcode microspheres, and each cell in the cell segmentation result is covered with a plurality of barcode microspheres. Based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere covered under each cell can be found.

[0068] In step 104, since the position information of the barcode microspheres covered under each cell is determined, the accurate position information of each cell and the statistical information of each barcode microsphere covered under each cell can be calculated.

[0069] The information processing method based on cell segmentation provided by the embodiment of the present invention first obtains a corrected scan image, which is obtained based on a tissue slice attached to a biochip, so that an accurate and corrected scan image can be obtained before cell segmentation; then, the scan image is subjected to cell segmentation to obtain a cell segmentation result; based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere corresponding to each cell in the cell segmentation result is extracted; the cell segmentation result and the biochip containing the barcode microsphere are combined to extract the position information of the barcode microsphere corresponding to a single cell; finally, based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, the first position information of each cell and the statistical information of the corresponding barcode microsphere are determined, and the accurate position information of each cell and the statistical information of the corresponding barcode microsphere can be statistically obtained based on the position information of the barcode microsphere corresponding to the single cell, thereby improving the efficiency and accuracy of cell analysis.

[0070] based on Figure 1 In the information processing method based on cell segmentation of the corresponding embodiment, the cell segmentation result includes a cell nucleus boundary segmentation result and a cell boundary segmentation result; step 102 may include the following sub-steps:

[0071] Step 1021, split the scanned image into multiple sub-images;

[0072] Step 1022: For each sub-graph, pre-process the sub-graph to obtain a target sub-graph;

[0073] Step 1023, obtaining a pre-trained model that matches the cell type of the tissue section, and using the pre-trained model to predict the cell nucleus boundary segmentation result of the target sub-image, to obtain the cell nucleus boundary segmentation result of each cell nucleus in the target sub-image;

[0074] Step 1024, merging each target sub-image to obtain a target image;

[0075] Step 1025, merging the cell nucleus boundary segmentation results of each cell nucleus in each target sub-image to obtain the cell nucleus boundary segmentation results of each cell nucleus in the target image;

[0076] Step 1026: Perform an outward expansion process on the cell nucleus boundary segmentation result of each cell nucleus in the target image to generate a cell boundary segmentation result of each cell in the target image.

[0077] In step 1021, since the size of the scanned image is too large, the scanned image needs to be split into multiple sub-images of appropriate sizes. The appropriate size is pre-configured according to the display screen parameters of the current device.

[0078] In a possible implementation, a custom sliding window is used to split the scanned image into a plurality of initial sub-images; and edge boundary lines of the plurality of initial sub-images are fine-tuned to obtain a plurality of sub-images.

[0079] Specifically, a custom sliding window is used to start sliding segmentation from left to right and from top to bottom, with the upper left corner of the image (0, 0) as the origin, until the scanned image is completely segmented into several initial sub-images. These initial sub-images have no overlapping parts after segmentation, and can completely restore the original image before segmentation. Since the edge boundaries of the evenly segmented initial sub-images may separate a single complete cell, the edge boundaries of multiple initial sub-images can be fine-tuned by offset operation to obtain multiple sub-images.

[0080] The first loop of the loop nest traverses the vertical direction of the image through the y_start variable, and the step size of each iteration is self.sub_size[0]-self.overlap[0]; the second loop of the loop nest traverses the horizontal direction of the image through the x_start variable, and the step size of each iteration is self.sub_size[1]-self.overlap[1]; through the slicing operation, the vertical and horizontal slicing ranges of the current sub-image are obtained according to y_start and x_start; according to the slicing range, the binary mask tmp_mask of the current sub-image is extracted from cell_mask; the current sub-image img_sub is extracted from the original image img; a copy tmp_img of the current sub-image is created to prevent changes to the original image; the areas that already exist in the mask are set to 0 in the current sub-image, so that these areas will not participate in the cell segmentation calculation; the current sub-image is segmented by calling the model.eval() function. The incoming parameters include the current sub-image tmp_img, cell diameter, number of channels and flow field threshold; obtain the mask mask_sub from the segmentation result and remove the edge part; update tmp_mask according to the value of mask mask_sub and set the corresponding position to True; generate the cell outline according to the mask mask_sub.

[0081] In this implementation, a custom sliding window is used for sub-graph segmentation and fine-tuning, which can improve the efficiency and accuracy of sub-graph segmentation.

[0082] In step 1022, in order to improve image quality, highlight or strengthen specific information in the image and weaken interference information, each sub-image is pre-processed to obtain a target sub-image, which can better adapt to subsequent image processing or analysis tasks.

[0083] In a possible implementation, for each sub-image, pre-processing including equalization, resizing, color space conversion, erosion, dilation, and pixel value normalization is performed on the sub-image to obtain a target sub-image.

[0084] Specifically, preprocessing may include the following:

[0085] 1) Equalization

[0086] By adjusting the pixel distribution of the sub-image through methods such as histogram equalization, the brightness or color in the sub-image is made more balanced, which can enhance the visual effect and feature expression of the image.

[0087] 2) Size adjustment

[0088] Adjust the size of the subgraph to meet specific requirements or adapt to specific processing algorithms or models.

[0089] 3) Color space conversion

[0090] Convert a subimage from one color space to another, for example, convert an RGB image to a grayscale image or another color space image to suit different analysis needs.

[0091] 4) Corrosion and expansion

[0092] Corrosion and expansion of the sub-graph can weaken the influence of the barcoded microspheres under the tissue sections in the sub-graph on the pre-trained model.

[0093] 5) Pixel value homogenization

[0094] Adjusting the pixel values ​​of the sub-images within a uniform range can avoid misidentification caused by being too bright or too dark.

[0095] In this embodiment, by preprocessing the sub-images including equalization, resizing, color space conversion, erosion, dilation, and pixel value normalization, the image quality can be improved, specific information in the image can be highlighted or enhanced, and interference information can be weakened, so as to better adapt to subsequent image processing or analysis tasks.

[0096] In step 1023, before performing cell segmentation, a pre-trained model corresponding to animal cells can be trained based on samples with animal cell labels, and a pre-trained model corresponding to plant cells can be trained based on samples with plant cell labels.

[0097] Taking the tissue slice of mouse testis as an example, we use the open source cell segmentation algorithm cellpose and load the pre-trained model that matches the cell type of the tissue slice of mouse testis. We use the pre-trained model to predict the cell nucleus boundary segmentation result of the target sub-graph, and get the following Figure 4 The nucleus boundary segmentation results of each nucleus in the target sub-image are shown.

[0098] Specifically, the model.eval() function may be called to predict the cell nucleus boundary segmentation result for the target sub-image. The input parameters of the model.eval() function may include: the current target sub-image tmp_img, the cell diameter, the number of channels, and the flow field threshold.

[0099] In order to better adapt to the characteristics of various types of cells, this step provides a variety of segmentation parameters, such as: cell diameter size diameter, segmentation color channel seg_channel, whether to invert the color inversion, recognition threshold size flow_threshold. By providing a variety of segmentation parameter options, it can adapt to different types of cells under different staining.

[0100] Take the cell diameter as 35 pixels, the segmentation color channel as 0RED 1GREEN 2BLUE, and the target sub-image as img_dist_fg7.tif as an example, pass the specified image and segmentation custom parameters through the command "python SegtoBarcode.py --img_path'. / img_dist_fg7.tif' --diameter 35 --inversion True --seg_channel 1". Other custom parameters can be passed in through the command line or by modifying the setup.yaml configuration file.

[0101] In steps 1024 and 1025, all target sub-images and the corresponding cell nucleus boundary segmentation results are merged to obtain the target image and the cell nucleus boundary segmentation results of each cell nucleus in the target image.

[0102] Creating an npy matrix file of the original image size of type int32 as the storage structure of the cell nucleus boundary segmentation result can ensure point-to-point correspondence at the pixel level, and the int32 type can store more data information to prevent the number of cell statistics from exceeding the upper limit of the data type.

[0103] In step 1026, the cell nucleus boundary segmentation result of each cell nucleus in the target image is expanded to a specified range, and the following Figure 5 The cell boundary segmentation results of each cell in the target image are shown.

[0104] In a possible implementation, step 1026 may include: generating a binary image based on the cell nucleus boundary segmentation results of each cell nucleus in the target image; calculating a distance map of the binary image by distance transformation; the distance map is used to characterize the distance from each pixel to the nearest cell nucleus boundary; and using a watershed algorithm to process the distance map and a preset cell boundary threshold to obtain the cell boundary segmentation results of each cell in the target image.

[0105] Specifically, first, use the Numpy.load function to load the nuclear mask file (nucleus.npy) and scale it. The scaling factor is 1 / self.calculate_rate, which is implemented by the Ndimage.zoom function. The scaled result is stored in mask_rs. Set the pixel values ​​greater than 0 in mask_rs to 255 and the rest to 0 to obtain a binary image of the cell nucleus. This can be achieved through the Numpy.where function and type conversion. Use the distance transform (Ndimage.distance_transform_edt) to calculate the distance map of the cell nucleus boundary. The distance map represents the distance from each pixel to the nearest cell nucleus boundary. According to the set cell edge threshold (self.cell_edge) and scaling factor (self.calculate_rate), the cell segmentation result is generated. The watershed function is used to perform the watershed algorithm, where the distance map is used as input and the nuclear mask (mask_rs) is used as a marker. Use the cellpose.utils.masks_to_outlines function to convert the cell segmentation result into a cell segmentation boundary. This will get a mask containing the cell segmentation boundary. Scale the cell segmentation result (cells) to make it consistent with the original nuclear mask (masks). Here, use the Ndimage.zoom function and size ratio calculation. Save the cell segmentation result (cells) as the cells.npy file in the self.save_dir directory. Return the original nuclear mask (masks), the cell segmentation result (cells), and the path to save the cell segmentation result (cells_path). The purpose of this algorithm is to generate cell segmentation results from nuclear masks, extract cell boundaries through distance transformation and watershed algorithm, and save the results for subsequent use.

[0106] In this embodiment, convenient and efficient cell segmentation can be achieved.

[0107] Based on the information processing method based on cell segmentation corresponding to the aforementioned embodiments, step 103 may include: calculating the center coordinate position of the barcode microsphere based on the inherent position of each barcode microsphere in the biochip; extracting the area corresponding to the position in the cell data of the cell segmentation result based on the center coordinate position; creating a circular mask, and multiplying the cell data in the area with the circular mask to obtain the cell data within the circular range; counting the cell data within each circular range to obtain the position information of the barcode microsphere corresponding to each cell in the cell segmentation result.

[0108] Specifically, load the barcode template and read the inherent position of each barcode microsphere in the biochip. Load the cell data and calculate the image magnification zoom_scale. Calculate the standard width std_w and standard height std_h based on the magnification. Initialize the radius radius and calculate it as half of 0.618 times the standard width. If it is less than 1, take 1. Traverse the inherent positions of each barcode microsphere in the biochip and calculate the center coordinate position of each barcode microsphere. According to the center coordinate position, extract the area of ​​the corresponding position in the cell data. Create a circular mask, multiply the cell data in the area by the mask, and obtain the cell data within the circular range. Count the cell data within each circular range, obtain the position information of the barcode microsphere corresponding to each cell, and add it to the all_barcode list. Traverse the all_barcode list, write the barcode microsphere name and the corresponding cell data into the all_barcode_txt list, and save the contents of the all_barcode_txt list to the file all_barcode_num.txt.

[0109] In this embodiment, the cell segmentation result can be combined with the biochip containing the barcoded microspheres to extract the position information of the barcoded microspheres corresponding to the individual cells, thereby accurately locating and identifying each cell.

[0110] Based on the information processing method based on cell segmentation corresponding to the above embodiments, the method further includes:

[0111] Step 105: Perform bioinformatics analysis on the first position information of each cell and the statistical information of the corresponding barcode microsphere to obtain an expression matrix of the cell corresponding to each first position information;

[0112] Step 106, clustering the expression matrix corresponding to each cell to obtain cell clustering information;

[0113] Step 107: based on the cluster number of each cell in the cell clustering information, a corresponding color is drawn in the cell region corresponding to each cluster number in the scanned image to obtain a cluster image;

[0114] Step 108, generating second position information of each cell in the cluster image by searching for cell contours in the cluster image;

[0115] Step 109: Visually display the cluster image and the second position information of each cell in the cluster image.

[0116] In step 106, a cluster dictionary is defined to map cluster numbers to color numbers. The cluster numbers are obtained by clustering the expression matrix corresponding to each cell, and the corresponding color numbers are obtained according to the cluster dictionary. An array cell_color is created to store the cell color numbers, and the corresponding color numbers are assigned to the corresponding positions in the cell_color array.

[0117] In step 107, color information is loaded. If there is a previously saved color file, the previously saved color is loaded, otherwise a set of colors is randomly generated and saved. The corresponding color is drawn in the cell area corresponding to each cluster number in the scanned image to obtain a cluster image, and it is saved to a specified directory. When drawing the color, the color in the cell nucleus is different from the color of the area between the cell boundary and the cell nucleus boundary.

[0118] In step 107 , regarding cell contour search, the cell boundary is extracted from the cell segmentation result, and the boundary coordinates are saved as a JSON file.

[0119] Specifically, first, use the Numpy.load function to load the cell segmentation result (cells_path) and store it in masks. Create an empty dictionary cell_contours to store the boundary coordinates of each cell. Use the Ndimage.find_objects function to find the position of each cell in mask s. Return a list slices consisting of tissue slices. For each non-empty tissue slice si, extract the corresponding row index sr and column index sc. Create a binary mask mask, set the pixel value belonging to the current cell to 1, and the remaining pixel values ​​to 0. This is achieved by comparing masks[sr,sc] with (i+1). Use the cv2.findContours function to find the contour of the binary mask, and the returned result is contours. Extract the point coordinates pvc and pvr of the contour, and offset them according to the starting position of the tissue slice to obtain the absolute coordinates vr and vc relative to the original image. Add the cell label and the corresponding boundary coordinates to the cell_contours dictionary, with the key being the cell label and the value being a list containing the boundary coordinates. Save the cell_contours dictionary in JSON format to the specified file, the file path is json_name.json in the saved_dir directory. Return the cell_contours dictionary. You can extract the boundary coordinates of each cell from the cell segmentation results and save them as a JSON file for subsequent use.

[0120] In step 109, the second position information of each cell in the cluster image is visualized in JSON format, and the cluster image is displayed on a visualization interface, which can clearly show the distribution of different types of cells.

[0121] In this embodiment, the cluster image and the second position information of each cell in the cluster image can be obtained through bioinformatics analysis, clustering processing and cell contour search, which is convenient for visualization.

[0122] The information processing device based on cell segmentation provided by the present invention is described below. The information processing device based on cell segmentation described below and the information processing method based on cell segmentation described above can be referred to each other.

[0123] Please refer to Figure 7 , Figure 7 Schematic diagram of the structure of the information processing device based on cell segmentation provided by an embodiment of the present invention. Figure 7 As shown, the device may include:

[0124] The acquisition module 10 is used to acquire the corrected scanned image; the scanned image is obtained based on the tissue slice attached to the biochip;

[0125] The segmentation module 20 is used to perform cell segmentation on the scanned image to obtain a cell segmentation result;

[0126] An extraction module 30, for extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result based on the inherent position of each barcode microsphere in the biochip;

[0127] The determination module 40 is used to determine the first position information of each cell and the statistical information of the corresponding barcode microsphere based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result.

[0128] In an exemplary embodiment, the segmentation module 20 includes:

[0129] A splitting unit, used for splitting the scanned image into multiple sub-images;

[0130] A preprocessing unit, used for preprocessing each subgraph to obtain a target subgraph;

[0131] A prediction unit is used to obtain a pre-trained model that matches the cell type of the tissue section, and use the pre-trained model to predict the cell nucleus boundary segmentation result of the target sub-image to obtain the cell nucleus boundary segmentation result of each cell nucleus in the target sub-image;

[0132] A first merging unit, used for merging each target sub-image to obtain a target image;

[0133] The second merging unit is used to merge the cell nucleus boundary segmentation results of each cell nucleus in each target sub-image to obtain the cell nucleus boundary segmentation results of each cell nucleus in the target image;

[0134] The expansion unit is used to perform expansion processing on the cell nucleus boundary segmentation result of each cell nucleus in the target image to generate the cell boundary segmentation result of each cell in the target image.

[0135] In an exemplary embodiment, the splitting unit is specifically used for:

[0136] A custom sliding window is used to split the scanned image into multiple initial sub-images;

[0137] The edge boundaries of multiple initial sub-graphs are fine-tuned to obtain multiple sub-graphs.

[0138] In an exemplary embodiment, the preprocessing unit is specifically configured to:

[0139] For each sub-image, the sub-image is pre-processed including equalization, size adjustment, color space conversion, corrosion, expansion and pixel value uniformity to obtain the target sub-image.

[0140] In an exemplary embodiment, the expansion unit is specifically used for:

[0141] Generate a binary image based on the nucleus boundary segmentation result of each nucleus in the target image;

[0142] The distance map of the binary image is calculated by distance transformation; the distance map is used to represent the distance from each pixel to the nearest cell nucleus boundary;

[0143] The watershed algorithm is used to process the distance map and the preset cell boundary threshold to obtain the cell boundary segmentation results of each cell in the target image.

[0144] In an exemplary embodiment, the extraction module 30 is specifically configured to:

[0145] Based on the intrinsic position of each barcode microsphere in the biochip, the central coordinate position of the barcode microsphere is calculated;

[0146] Extracting the area corresponding to the position in the cell data of the cell segmentation result based on the center coordinate position;

[0147] Create a circular mask and multiply the cell data in the area with the circular mask to obtain the cell data within the circular range;

[0148] The cell data within each circular range are counted to obtain the position information of the barcode microsphere corresponding to each cell in the cell segmentation result.

[0149] In an exemplary embodiment, the apparatus further includes: a visualization module, wherein the visualization module is specifically configured to:

[0150] Performing bioinformatics analysis on the first position information of each cell and the statistical information of the corresponding barcode microspheres to obtain an expression matrix of the cell corresponding to each first position information;

[0151] Perform clustering processing on the expression matrix corresponding to each cell to obtain cell clustering information;

[0152] Based on the cluster number of each cell in the cell clustering information, a corresponding color is drawn in the cell area corresponding to each cluster number in the scanned image to obtain a cluster image;

[0153] Generating second position information of each of the cells in the cluster image by searching for cell contours on the cluster image;

[0154] The cluster image and the second position information of each cell in the cluster image are visually displayed.

[0155] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communications interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the information processing method based on cell segmentation, which includes:

[0156] Acquire a corrected scanned image; the scanned image is obtained based on a tissue slice attached to a biochip;

[0157] Perform cell segmentation on the scanned image to obtain the cell segmentation result;

[0158] Based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere corresponding to each cell in the cell segmentation result is extracted;

[0159] Based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, the first position information of each cell and the statistical information of the corresponding barcode microsphere are determined.

[0160] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0161] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute the information processing method based on cell segmentation provided by the above methods, the method comprising:

[0162] Acquire a corrected scanned image; the scanned image is obtained based on a tissue slice attached to a biochip;

[0163] Perform cell segmentation on the scanned image to obtain the cell segmentation result;

[0164] Based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere corresponding to each cell in the cell segmentation result is extracted;

[0165] Based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, the first position information of each cell and the statistical information of the corresponding barcode microsphere are determined.

[0166] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the above-mentioned information processing method based on cell segmentation, the method comprising:

[0167] Acquire a corrected scanned image; the scanned image is obtained based on a tissue slice attached to a biochip;

[0168] Perform cell segmentation on the scanned image to obtain the cell segmentation result;

[0169] Based on the inherent position of each barcode microsphere in the biochip, the position information of the barcode microsphere corresponding to each cell in the cell segmentation result is extracted;

[0170] Based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result, the first position information of each cell and the statistical information of the corresponding barcode microsphere are determined.

[0171] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An information processing method based on cell segmentation, characterized in that: include: Acquire a corrected scanned image; the scanned image is obtained based on the tissue slice attached to the biochip; the corrected scanned image has no seamless errors, and the image position has been corrected to the correct base plate distribution, so that the corrected scanned image is consistent with the actual situation; Performing cell segmentation on the scanned image to obtain a cell segmentation result; Based on the inherent position of each barcode microsphere in the biochip, extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result; Based on the position information of the barcoded microsphere corresponding to each cell in the cell segmentation result, determining the first position information of each cell and the statistical information of the corresponding barcoded microsphere; Performing bioinformatics analysis on the first position information of each cell and the statistical information of the corresponding barcode microsphere to obtain an expression matrix of the cell corresponding to each first position information; Performing clustering processing on the expression matrix corresponding to each of the cells to obtain cell clustering information; Based on the cluster number of each cell in the cell clustering information, a cell region corresponding to each cluster number in the scanned image is drawn with a corresponding color to obtain a cluster image; Generating second position information of each of the cells in the cluster image by searching for cell contours on the cluster image; The cluster image and the second position information of each of the cells in the cluster image are visually displayed.

2. The information processing method based on cell segmentation according to claim 1, characterized in that: The cell segmentation result includes a cell nucleus boundary segmentation result and a cell boundary segmentation result; the cell segmentation is performed on the scanned image to obtain the cell segmentation result, including: Splitting the scanned image into a plurality of sub-images; For each of the subgraphs, preprocess the subgraph to obtain a target subgraph; Acquire a pre-trained model that matches the cell type of the tissue section, and use the pre-trained model to predict the cell nucleus boundary segmentation result of the target sub-image to obtain the cell nucleus boundary segmentation result of each cell nucleus in the target sub-image; Merging the target sub-images to obtain a target image; Merging the cell nucleus boundary segmentation results of each cell nucleus in each of the target sub-images to obtain the cell nucleus boundary segmentation results of each cell nucleus in the target image; The cell nucleus boundary segmentation result of each cell nucleus in the target image is expanded to generate the cell boundary segmentation result of each cell in the target image.

3. The information processing method based on cell segmentation according to claim 2, characterized in that: The step of splitting the scanned image into a plurality of sub-images comprises: Splitting the scanned image into a plurality of initial sub-images using a custom sliding window; The edge boundary lines of the multiple initial sub-images are fine-tuned to obtain the multiple sub-images.

4. The information processing method based on cell segmentation according to claim 2, characterized in that: The step of preprocessing each subgraph to obtain a target subgraph includes: For each of the sub-images, pre-processing including equalization, size adjustment, color space conversion, corrosion, expansion and pixel value normalization is performed on the sub-image to obtain the target sub-image.

5. The information processing method based on cell segmentation according to claim 2, characterized in that: The step of performing an expansion process on the cell nucleus boundary segmentation result of each cell nucleus in the target image to generate the cell boundary segmentation result of each cell in the target image includes: Generate a binary image based on the cell nucleus boundary segmentation result of each cell nucleus in the target image; Calculating a distance map of the binary image by distance transformation; the distance map is used to characterize the distance from each pixel to the nearest cell nucleus boundary; The distance map and the preset cell boundary threshold are processed by using a watershed algorithm to obtain the cell boundary segmentation result of each cell in the target image.

6. The information processing method based on cell segmentation according to any one of claims 1 to 5, characterized in that: The step of extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result based on the inherent position of each barcode microsphere in the biochip includes: Calculating the central coordinate position of each barcode microsphere in the biochip based on the intrinsic position of each barcode microsphere; Extracting a region corresponding to a position in the cell data of the cell segmentation result based on the center coordinate position; Create a circular mask, and multiply the cell data in the area by the circular mask to obtain the cell data within the circular range; The cell data within each circular range are counted to obtain the position information of the barcode microsphere corresponding to each cell in the cell segmentation result.

7. An information processing device based on cell segmentation, characterized in that: include: An acquisition module, used for acquiring a corrected scanned image; the scanned image is obtained based on a tissue slice attached to a biochip; the corrected scanned image has no seamless errors, and the image position has been corrected to a correct bottom plate distribution, so that the corrected scanned image is consistent with the actual situation; A segmentation module, used to perform cell segmentation on the scanned image to obtain a cell segmentation result; An extraction module, used for extracting the position information of the barcode microsphere corresponding to each cell in the cell segmentation result based on the inherent position of each barcode microsphere in the biochip; A determination module, configured to determine the first position information of each cell and the statistical information of the corresponding barcode microsphere based on the position information of the barcode microsphere corresponding to each cell in the cell segmentation result; Visualization module, specifically for: Performing bioinformatics analysis on the first position information of each cell and the statistical information of the corresponding barcode microsphere to obtain an expression matrix of the cell corresponding to each first position information; Performing clustering processing on the expression matrix corresponding to each of the cells to obtain cell clustering information; Based on the cluster number of each cell in the cell clustering information, a cell region corresponding to each cluster number in the scanned image is drawn with a corresponding color to obtain a cluster image; Generating second position information of each of the cells in the cluster image by searching for cell contours on the cluster image; The cluster image and the second position information of each of the cells in the cluster image are visually displayed.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the information processing method based on cell segmentation as described in any one of claims 1 to 6 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the information processing method based on cell segmentation according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Space transcriptome sequencing method

    CN110804654A

  • Method for screening cell strain capable of expressing expected product

    CN112037853A

  • User-assisted iteration of cell image segmentation

    CN114341937A

  • Transcriptome image generation device, method and application

    CN114882955A

Cited By

  • Single-cell spatial transcriptome analysis method and device based on cell segmentation

    EP4734048A1