A method of cell counting

By acquiring cell images under high pressure and combining them with an adaptive watershed cell separation algorithm based on feature-by-element linear modulation and geodesic distance transformation, the problem of cell contour contrast shift under high pressure was solved, achieving high-precision cell counting and process control.

CN122222971APending Publication Date: 2026-06-16PHARMAVISION QINGDAO INTELLIGENT TECH LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PHARMAVISION QINGDAO INTELLIGENT TECH LTD
Filing Date
2026-03-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, cell images under high pressure undergo dynamic shifts in cell contour contrast due to changes in the refractive index of the culture medium with pressure. Normal pressure segmentation models cannot adaptively compensate for the image feature drift caused by pressure, resulting in a significant decrease in cell segmentation accuracy.

Method used

Cell images were acquired using a high-pressure resistant probe and a high-pressure compatible light source module. A boundary enhancement algorithm based on the Frangi blood vessel enhancement filter and Gaussian smoothing preprocessing were combined with a pressure-adaptive cell segmentation model for feature extraction and segmentation. By introducing a feature element-wise linear modulation mechanism and a pressure coding branch, the influence of changes in the refractive index of the culture medium was compensated in real time. Cell clusters were decoupled through geodesic distance transformation and an adaptive watershed cell separation algorithm. The brightness of the light source was adjusted in conjunction with a quality assessment function to achieve closed-loop control.

Benefits of technology

The accuracy and stability of cell counting were achieved under high pressure, avoiding the impact of cell morphology changes and image quality degradation on the counting results, and realizing high-precision cell segmentation and density monitoring under pressure conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122222971A_ABST
    Figure CN122222971A_ABST
Patent Text Reader

Abstract

The application provides a cell counting method, and belongs to the technical field of cell counting. The cell image collected by a high-pressure-resistant probe is processed by using a model. Scaling and offset are applied to each element of the feature map of each layer of the encoder, so that the feature extraction strategy continuously changes with the pressure. Then, the adaptive watershed algorithm based on geodesic distance transformation is used to decouple the dense cell groups. The cell density and morphological parameters are counted. The segmentation confidence threshold and the light source brightness are adjusted through the quality evaluation function closed loop. Finally, the results are uploaded to the host computer through the high-pressure communication module to realize process control. The technical problem of dynamic shift of cell profile contrast caused by change of the refractive index of the culture medium with pressure, image feature drift caused by the inability of the normal pressure segmentation model to adaptively compensate for pressure, and significant decrease of cell segmentation accuracy with the increase of pressure are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cell counting technology, and more specifically, relates to a cell counting method. Background Technology

[0002] High-pressure bioreactors are widely used in deep-sea microbial culture, high-pressure enzyme catalysis, and cell viability monitoring in ultra-high-pressure food processing. Accurately obtaining cell density and morphological parameters within the high-pressure vessel is a core requirement for process control. In existing technologies, cell counting typically relies on manual microscopic examination with hemocytometers, Coulter particle counters, or image analysis systems based on atmospheric pressure microscopes. All of these methods involve sample collection and analysis under atmospheric pressure conditions, failing to achieve in-situ online detection under high pressure. For biological processes requiring continuous pressure, depressurization sampling disrupts the pressure equilibrium of cells, leading to irreversible changes in cell morphology and rendering the counting results unrepresentative. In current high-pressure in-situ optical detection, the refractive index of the culture medium changes continuously with increasing pressure, causing a systematic shift in the contrast and contour features of the cell membrane boundary in the image compared to atmospheric pressure conditions. Existing cell segmentation models based on fixed-weight neural networks are optimized only for the feature distribution of atmospheric pressure images during training; their feature extraction strategies cannot be dynamically adjusted with changes in working pressure, resulting in a significant degradation in their responsiveness to cell boundaries under high pressure conditions. In other words, existing technologies suffer from a technical problem where cell image contrast shifts dynamically due to changes in the refractive index of the culture medium under high pressure. Normal pressure segmentation models cannot adaptively compensate for the image feature drift caused by pressure, resulting in a significant decrease in cell segmentation accuracy as pressure increases. Summary of the Invention

[0003] In view of this, the present invention provides a cell counting method that can solve the technical problem in the prior art where cell image contrast dynamically shifts due to changes in the refractive index of the culture medium under high pressure, and the normal pressure segmentation model cannot adaptively compensate for the image feature drift caused by pressure, resulting in a significant decrease in cell segmentation accuracy as pressure increases.

[0004] This invention is implemented as follows: This invention provides a cell counting method, comprising the following steps:

[0005] The high-pressure resistant probe is immersed in the cell suspension in the high-pressure container. The high-pressure compatible light source module is activated, and the high-pressure resistant industrial camera module synchronously acquires cell images flowing through the observation window with an exposure time of no more than 10μs. The cell images are then transmitted to the image processing unit of the host computer.

[0006] The image processing unit sequentially performs cell boundary enhancement algorithm processing based on the modified Frangi blood vessel enhancement filter and Gaussian smoothing preprocessing on the cell image, and outputs a boundary-enhanced grayscale image;

[0007] The boundary-enhanced grayscale image and the current pressure value collected by the online pressure sensor are simultaneously input into the pressure-adaptive cell segmentation model. The pressure-adaptive cell segmentation model outputs a binary mask and cell boundary probability map for each cell instance. The pressure-adaptive cell segmentation model uses the standard U-Net as the backbone network and introduces a feature element-wise linear modulation mechanism at the feature maps of each layer of the encoder. A pressure encoding branch is also set up to encode the current pressure value into a 128-dimensional feature vector through three fully connected layers. The feature element-wise linear modulation mechanism applies scaling and offset to the feature maps of each layer of the U-Net encoder element by element, so that the feature extraction strategy changes continuously with the current pressure value.

[0008] An adaptive watershed cell separation algorithm based on geodesic distance transformation is applied to the binary mask to decouple the contacting cell clusters into independent cell outlines, count the total number of cells and calculate the cell density, and extract the equivalent diameter, roundness, aspect ratio and eccentricity of each cell instance.

[0009] Based on the mean cell segmentation confidence score, mean cell boundary response value, and image grayscale standard deviation in the current image acquisition batch, calculate the quality assessment function value. According to the interval to which the quality assessment function value belongs, adjust the segmentation confidence threshold of the pressure adaptive cell segmentation model and send a light source brightness adjustment command to the light source controller.

[0010] The cell density, equivalent diameter, roundness, aspect ratio, and eccentricity are transmitted to the host computer via a high-voltage communication module. The host computer automatically adjusts the perfusion pump flow rate, high-pressure container pressure, or culture temperature based on the deviation between the cell density and the preset process target value, thereby achieving closed-loop process control.

[0011] Specifically, the cell boundary enhancement algorithm based on the modified Frangi blood vessel enhancement filter calculates the second-order differential Hessian matrix of each pixel neighborhood at multiple scales from σ=1μm to 5μm, and extracts two feature values. and ,when and When the absolute value is a large negative value, it is identified as a cell membrane structure and a high response value is given. The maximum value of the multi-scale response map is taken and fused, and then added to the original grayscale image according to the weights to output a boundary-enhanced grayscale image.

[0012] The Hessian matrix refers to a 2×2 symmetric matrix composed of the second-order partial derivatives of the image gray-level function at each pixel position. Its eigenvalues ​​describe the curvature structure of the gray-level distribution in the neighborhood of the position and are used to detect anisotropic structures in the image.

[0013] In the pressure-adaptive cell segmentation model, the element-wise linear modulation mechanism refers to decoding the 128-dimensional feature vector output by the pressure encoding branch into scaling and offset parameters corresponding to the number of channels in the feature map, and multiplying and adding them element-wise with each channel of the feature map, so that the feature distribution changes continuously with the current pressure value.

[0014] Specifically, the training dataset for the pressure-adaptive cell segmentation model is established by acquiring in-situ images of cell suspensions under five pressure gradients: 0 MPa, 10 MPa, 20 MPa, 30 MPa, and 45 MPa. An active learning strategy is used to sort and filter images to be labeled according to their information entropy from high to low. The images with the highest information entropy are manually labeled pixel by pixel. For unlabeled images, a self-supervised contrastive learning pre-training method is used to generate pseudo-labels. The label set is iteratively expanded until the segmentation accuracy of the validation set converges.

[0015] The active learning strategy refers to calculating the information entropy using the output probability distribution of the current model's prediction results for unlabeled images, prioritizing the selection of images with the highest information entropy for manual annotation, and maximizing the information content of the training set with minimal annotation cost. The information entropy is a scalar obtained by averaging the Shannon entropy of each pixel category probability vector across all pixels.

[0016] The self-supervised contrastive learning pre-training method refers to constructing positive sample pairs for different randomly enhanced views of the same image and negative sample pairs for views of different images, and training the U-Net encoder so that the representations of positive sample pairs are close to each other in the feature space and the negative sample pairs are far apart from each other, thereby enabling the U-Net encoder to learn visual feature representations with generalizability.

[0017] Specifically, the training of the pressure-adaptive cell segmentation model involves initializing the U-Net encoder with weights obtained from self-supervised contrastive learning pre-training, inputting the current pressure value and the corresponding boundary-enhanced grayscale image in pairs, using the weighted sum of instance segmentation loss and cell boundary prediction loss as the objective function, performing end-to-end training with the AdamW optimizer, and saving the optimal weight parameters using the average accuracy on the validation set as the early stopping criterion.

[0018] Specifically, the adaptive watershed cell separation algorithm based on geodesic distance transformation calculates the geodesic distance from each pixel to the nearest background pixel along the minimum gray-level gradient path within the foreground mask determined by the binary mask, generates a geodesic distance transformation map, uses local maxima as watershed seed points, introduces a seed suppression rule based on the prior value of the minimum cell diameter, performs watershed flooding filling on the negative gradient field of the geodesic distance transformation map, and finally uses Voronoi segmentation to refine the boundaries of adjacent cells.

[0019] The minimum cell diameter prior value refers to the minimum equivalent diameter value of a single cell pre-input by the operator based on the cell type being monitored, or the value obtained by the image processing unit automatically taking the 5th percentile after statistically analyzing the distribution of equivalent cell diameters in the initially acquired cell images.

[0020] The formula for calculating the quality assessment function value is as follows: ,in The mean confidence score for average cell segmentation is given. To calibrate the baseline confidence level, This represents the average cell boundary response value. To calibrate the baseline boundary response value, The standard deviation of image grayscale. To calibrate the standard deviation of the reference gray level.

[0021] Specifically, adjusting the segmentation confidence threshold based on the interval to which the quality assessment function value belongs and issuing a light source brightness adjustment command to the light source controller involves: when When the current segmentation confidence threshold and light source brightness remain unchanged; when When the segmentation confidence threshold is lowered by 5%, an adjustment command to increase the light source brightness by 10% is issued; when The segmentation confidence threshold is lowered by 15%, and an adjustment command to increase the light source brightness by 25% is issued, while simultaneously triggering an image quality warning.

[0022] The calibration benchmark confidence, calibration benchmark boundary response value, and calibration benchmark grayscale standard deviation refer to the benchmark parameters obtained and stored by the image processing unit after the system completes the calibration process of the simulated cell standard calibration plate. These parameters are used as normalized references in the calculation of the quality assessment function value.

[0023] Wherein, the equivalent diameter is the diameter of a circle with the same area as the cell projection; the circularity is the ratio of the area of ​​the cell projection outline to the area of ​​the smallest circumscribed circle of the cell projection outline; the aspect ratio is the ratio of the long side to the short side of the smallest circumscribed rectangle of the cell projection outline; and the eccentricity is the ratio of the focal length to the major axis of the ellipse fitted to the cell projection outline.

[0024] The Voronoi segmentation refers to the process of assigning boundary pixels at the junction of adjacent cells after the watershed flooding is filled to the cells belonging to the watershed seed point with the closest geodesic distance, based on the geodesic distance from the watershed seed point of each cell to the boundary pixel, thereby achieving geometric refinement of the boundary between adjacent cells.

[0025] This invention introduces an element-wise linear modulation mechanism into each layer of the encoder in the U-Net backbone network and sets up an independent pressure encoding branch to encode the current pressure value output by the online pressure sensor into a modulation signal. This allows the scaling and offset parameters of the intermediate feature maps of each layer to continuously change with the current pressure value. Thus, without retraining the backbone weights, the feature extraction strategy continuously tracks image feature drift caused by the refractive index shift of the culture medium across the entire pressure range. Because the modulation signal directly affects the feature distribution of each layer of the encoder, the model's sensitivity to cell boundaries under different pressures is actively compensated, avoiding the fundamental reason for feature response degradation in fixed-weight models when the pressure deviates from the training distribution. In summary, this invention solves the technical problem mentioned in the background art: under high pressure, cell images experience dynamic shifts in cell contour contrast due to changes in the refractive index of the culture medium with pressure. Normal-pressure segmentation models cannot adaptively compensate for pressure-induced image feature drift, resulting in a significant decrease in cell segmentation accuracy as pressure increases. Attached Figure Description

[0026] Figure 1 This is a flowchart of the method of the present invention.

[0027] Figure 2 This is a schematic diagram of the overall structure of the high-pressure cell counter system provided by the present invention.

[0028] Figure 3 This is a schematic cross-sectional view of the internal structure of the high-voltage probe provided by the present invention.

[0029] Figure 4 The graph shows the changes in the quality assessment function value under various pressure conditions with the number of data collection batches and the adaptive adjustment response curve.

[0030] Figure 5 This is a histogram showing the distribution of equivalent cell diameters under various pressure conditions.

[0031] The reference numerals in the attached figures are explained as follows: 1. High-voltage resistant probe; 11. Alloy housing; 12. Sapphire observation window; 13. High-voltage compatible light source module; 14. Telecentric lens; 15. High-voltage resistant industrial camera module; 16. High-voltage sealed electrical connector; 2. High-voltage protective pipeline; 21. Armored protective layer; 22. Internal cables and fiber optic bundle; 3. Main system; 31. Light source drive and control; 35. Opto-isolated communication module; 4. Upper computer monitoring station; 5. High-voltage bioreactor / culture vessel; 6. Cell-inspired standard calibration plate. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.

[0033] like Figure 1 The diagram shown is a flowchart of a cell counting method provided by the present invention. This method includes the following steps:

[0034] S01. Immerse the high-pressure resistant probe into the cell suspension in the high-pressure container, start the high-pressure compatible light source module, and the high-pressure resistant industrial camera module synchronously acquires cell images flowing through the observation window with an exposure time of no more than 10μs, and transmits the cell images to the image processing unit of the host.

[0035] S02. The image processing unit sequentially performs cell boundary enhancement algorithm processing based on Frangi blood vessel enhancement filter modification and Gaussian smoothing preprocessing on the cell image, and outputs a boundary enhancement grayscale image.

[0036] S03. Input the boundary-enhanced grayscale image and the current pressure value collected by the online pressure sensor into the pressure-adaptive cell segmentation model at the same time. The pressure-adaptive cell segmentation model outputs the binary mask and cell boundary probability map of each cell instance.

[0037] S04. Perform an adaptive watershed cell separation algorithm based on geodesic distance transformation on the binary mask to decouple the cell clusters that are in contact with each other into independent cell outlines, count the total number of cells and calculate the cell density, and extract the equivalent diameter, roundness, aspect ratio and eccentricity of each cell instance.

[0038] S05. Based on the mean average cell segmentation confidence value, the mean cell boundary response value, and the standard deviation of image grayscale in the current image acquisition batch, calculate the quality assessment function value, adjust the segmentation confidence threshold of the pressure adaptive cell segmentation model according to the interval to which the quality assessment function value belongs, and send a light source brightness adjustment command to the light source controller.

[0039] S06. The cell density, equivalent diameter, roundness, aspect ratio, and eccentricity are transmitted to the host computer via a high-voltage communication module. The host computer automatically adjusts the perfusion pump flow rate, high-pressure container pressure, or culture temperature based on the deviation between the cell density and the preset process target value to achieve closed-loop process control.

[0040] The specific structure of the pressure-adaptive cell segmentation model is as follows: using standard U-Net as the backbone network, an element-wise linear modulation mechanism is introduced at the feature maps of each layer of the encoder, and a pressure encoding branch is set up. The current pressure value output by the online pressure sensor is encoded into a 128-dimensional feature vector through three fully connected layers. The feature maps of each layer of the U-Net encoder are scaled and offset element by element through the element-wise linear modulation mechanism, so that the feature extraction strategy changes continuously with the current pressure value. The decoder outputs the probability that each pixel belongs to the cell foreground and the cell boundary probability map of each cell instance. The cell boundary probability map is used to assist in the generation of the foreground mask for geodesic distance transformation in step S04.

[0041] The steps for establishing the training dataset for the pressure-adaptive cell segmentation model specifically include: acquiring in-situ images of cell suspensions with different cell densities under five pressure gradients of 0MPa, 10MPa, 20MPa, 30MPa, and 45MPa; using an active learning strategy, sorting and selecting images to be labeled according to information entropy from high to low, and manually labeling the images with the highest information entropy pixel by pixel, including cell foreground masks and cell contact boundaries; performing data augmentation on labeled images using random point spread function convolution, random brightness perturbation, and random affine transformation; and using a self-supervised contrastive learning pre-training method to extract visual representations from unlabeled images and generate pseudo-labels, iteratively expanding the label set until the segmentation accuracy of the validation set converges.

[0042] The specific steps for training the pressure-adaptive cell segmentation model include: initializing the U-Net encoder with weights obtained from self-supervised contrastive learning pre-training; inputting the current pressure value and the corresponding boundary-enhanced grayscale image as a pair, using the weighted sum of instance segmentation loss and cell boundary prediction loss as the objective function, and performing end-to-end training with the AdamW optimizer; applying gradient pruning to the pressure encoding branch during training; and saving the optimal weight parameters using the average accuracy on the validation set as the early stopping criterion.

[0043] The pressure-adaptive cell segmentation model incorporates current pressure information into each feature extraction layer through an element-wise linear modulation mechanism, enabling the network's ability to represent cell morphology dynamically adjusts with the current pressure value under different pressure conditions. High pressure environments cause cells to stretch and shrink, and the refractive index of the culture medium changes with increasing pressure, resulting in image contrast and cell contour features deviating from those under normal pressure. The model converts the current pressure value into a modulation signal through a pressure encoding branch, compensating for these deviations at the feature level. This ensures that the same set of network weight parameters can accurately extract cell boundary features across the entire pressure range, avoiding the need to train multiple models for different pressure intervals and significantly improving segmentation consistency and generalization ability under different pressure conditions.

[0044] The principle and specific implementation of the cell boundary enhancement algorithm based on the modified Frangi blood vessel enhancement filter are as follows: For the input grayscale image, in At multiple scales ranging from 1μm to 5μm, the second-order differential Hessian matrix of each pixel neighborhood is calculated, and two eigenvalues ​​of the Hessian matrix are extracted. and Constructing the cellular response function: when and When the absolute value is negative, the corresponding pixel is identified as a plate-like cell membrane structure and given a high response value. The maximum value of the multi-scale response maps is taken and fused to generate a cell boundary enhancement map. The cell boundary enhancement map is added to the original grayscale image according to weights to output a boundary enhancement grayscale image, which is used as the input of the pressure-adaptive cell segmentation model in step S03. The cell boundary enhancement algorithm transfers Hessian matrix eigenvalue analysis to cell boundary detection. It utilizes the anisotropic structural features of the cell membrane in the second derivative space of the image. Without relying on high signal-to-noise ratio images, it significantly enhances the recognizability of low-contrast cell membrane boundaries caused by the refractive index shift of the culture medium under high pressure. This provides a boundary enhancement grayscale image with more sufficient contrast for step S03, effectively suppressing boundary missed detections and misjudgments caused by insufficient image contrast, and improving the overall stability of segmentation.

[0045] The principle and specific implementation of the adaptive watershed cell separation algorithm based on geodesic distance transformation are as follows: Within the foreground mask determined by the binary mask output by the pressure adaptive cell segmentation model, the geodesic distance from each pixel to the nearest background pixel along the minimum grayscale gradient path is calculated for the boundary enhancement grayscale image output in step S02, generating a geodesic distance transformation map; the local maxima of the geodesic distance transformation map are used as watershed seed points, and a seed suppression rule based on the prior value of the minimum cell diameter is introduced to prevent the simultaneous activation of adjacent seed points with a spacing smaller than the prior value of the minimum cell diameter, and watershed flooding filling is performed on the negative gradient field of the geodesic distance transformation map; finally, Voronoi segmentation is used to refine the boundaries of adjacent cells, and the contours of each independent cell are output. The independent cell contours are used for cell count and morphological parameter extraction in step S04. The adaptive watershed cell separation algorithm based on geodesic distance transformation uses geodesic distance instead of Euclidean distance to measure the degree of separation between cells, making the local maxima of the geodesic distance transformation map more accurately correspond to the geometric center of each cell. Even in the case of highly dense cell contact, the positioning of the watershed seed point remains robust. The prior value constraint of the minimum cell diameter effectively prevents oversegmentation caused by texture noise inside a single cell, significantly improving the individual decoupling accuracy of dense cell clusters while maintaining low computational overhead.

[0046] The quality assessment function is described in detail as follows: Based on three parameters in the current image acquisition batch—the mean cell segmentation confidence level, the mean cell boundary response value, and the standard deviation of image grayscale—the quality assessment function value is calculated, and the formula is expressed as follows: ;in This represents the mean cell segmentation confidence score in the current image acquisition batch, in dimensionless form. To calibrate the baseline confidence level, the unit is dimensionless. This represents the average cell boundary response value in the current image acquisition batch, in dimensionless form. To calibrate the baseline boundary response values, the units are dimensionless. This represents the standard deviation of image grayscale values ​​in the current image acquisition batch, in dimensionless units. To calibrate the baseline grayscale standard deviation, the unit is dimensionless, and all three ratios are dimensionless quantities. (Quality assessment function value) It is also a dimensionless quantity; when When, the current segmentation confidence threshold and light source brightness remain unchanged; when When the segmentation confidence threshold is lowered by 5%, an adjustment command to increase the light source brightness by 10% is sent to the light source controller; when At that time, the segmentation confidence threshold is reduced by 15%, and an adjustment command to increase the light source brightness by 25% is sent to the light source controller. At the same time, an image quality warning is triggered, prompting the operator to check the cleanliness of the observation window.

[0047] The feature element-wise linear modulation mechanism applies an element-wise linear affine transformation to each channel of the feature map in the intermediate layer of the neural network, and decodes the 128-dimensional feature vector output by the pressure coding branch into scaling parameters and offset parameters corresponding to the number of channels in the feature map. These parameters are then multiplied and added element-wise to each channel of the feature map, thereby making the feature distribution change continuously with the current pressure value without changing the backbone weights of the U-Net encoder.

[0048] The geodesic distance is the distance calculated along the gray-level gradient constraint path in the image pixel space. Unlike the Euclidean linear distance, the geodesic distance is stretched in the boundary region where gray-level changes are drastic, and the path is close to a straight line in the uniform foreground region. Therefore, it can more accurately reflect the spatial connectivity of pixels that semantically belong to the same cell.

[0049] The prior value of the minimum cell diameter is the minimum equivalent diameter of a single cell pre-input by the operator based on the cell type being monitored, or it is obtained by the image processing unit automatically taking the 5th percentile after statistically analyzing the distribution of equivalent cell diameters in the initially acquired cell images.

[0050] The Voronoi segmentation is performed on the boundary pixels at the junction of adjacent cells after the watershed flood filling. Based on the geodesic distance from the watershed seed point of each cell to the boundary pixel, the boundary pixel is assigned to the cell to which the watershed seed point with the closest geodesic distance belongs, thereby achieving geometric refinement of the boundary between adjacent cells.

[0051] The active learning strategy involves calculating information entropy during the training of the stress-adaptive cell segmentation model by utilizing the output probability distribution of the current model's prediction results for unlabeled images. The higher the information entropy, the more uncertain the model's prediction of the image. The strategy prioritizes selecting the image with the highest information entropy for manual annotation, thereby maximizing the amount of information in the training set with minimal annotation cost.

[0052] The information entropy is a scalar obtained by averaging the probability vectors of each pixel category output by the stress-adaptive cell segmentation model over all pixels in the image after calculating the Shannon entropy. It is used to quantify the uncertainty of the model's prediction result for the current image.

[0053] The self-supervised contrastive learning pre-training method is a pre-training method that, without manual annotation, constructs positive sample pairs for different randomly augmented views of the same image and negative sample pairs for views of different images, and trains the U-Net encoder so that the representations of positive sample pairs are close to each other in the feature space and the negative sample pairs are far apart from each other, thereby enabling the U-Net encoder to learn generalizable visual feature representations on unlabeled data.

[0054] The equivalent diameter is the diameter of a circle with the same area as the cell projection; the circularity is the ratio of the area of ​​the cell projection outline to the area of ​​the smallest circumscribed circle of the cell projection outline; the aspect ratio is the ratio of the long side to the short side of the smallest circumscribed rectangle of the cell projection outline; and the eccentricity is the ratio of the focal length to the major axis of the ellipse fitted to the cell projection outline.

[0055] The Hessian matrix is ​​a 2×2 symmetric matrix composed of the second-order partial derivatives of the image gray-level function at each pixel position. Its eigenvalues ​​describe the curvature structure of the gray-level distribution in the neighborhood of the position and are used to detect anisotropic structures in the image.

[0056] The calibration benchmark confidence level, calibration benchmark boundary response value, and calibration benchmark grayscale standard deviation are benchmark parameters obtained and stored by the image processing unit after the system completes the calibration process on the simulated cell standard calibration plate. These parameters are used as normalization references in the subsequent calculation of quality assessment function values.

[0057] This invention also provides a high-pressure cell counter, including a high-pressure resistant probe, a main unit, and a high-pressure protective pipeline. The housing of the high-pressure resistant probe is made of a pressure-resistant alloy material, and the housing has an observation window encapsulated in a high-strength transparent material. A high-pressure compatible light source module, a telecentric lens, and a pressure-resistant industrial camera module are fixedly installed inside the high-pressure resistant probe. The telecentric lens is optically connected to the pressure-resistant industrial camera module. An explosion-proof sealing joint is provided at the tail end of the high-pressure resistant probe. The high-pressure pipeline is connected to the high-pressure resistant probe through the explosion-proof sealing joint, and integrates data cables and power cables. The main unit has a built-in image processing unit, a light source controller, and a high-pressure communication module. The image processing unit is used to run intelligent cell image analysis software to process cell images acquired by the pressure-resistant industrial camera module. The image processing unit is used to identify and count cells. The light source controller is electrically connected to the high-voltage compatible light source module through a power cable in the high-voltage pipeline and receives light source brightness adjustment commands from the image processing unit. The high-voltage communication module is used to realize data communication between the host and the host computer or process control system. The system also includes a calibration module, which includes a cell-like standard calibration plate with micro-patterns of standard size. This calibration plate is used to perform in-situ calibration of the measurement accuracy of the pressure-resistant industrial camera module and the image processing unit. After calibration, the image processing unit stores the calibration reference confidence level, calibration reference boundary response value, and calibration reference grayscale standard deviation.

[0058] The specific implementation of step S01 is as follows: The housing of the high-pressure resistant probe is made of pressure-resistant alloy material, and the observation window is encapsulated with high-strength transparent material, enabling the entire probe to be immersed in a high-pressure container for long-term operation. After the high-pressure compatible light source module is activated, its light shines through the observation window onto the cell suspension area flowing through the window. The pressure-resistant industrial camera module uses an exposure time of no more than 10μs for image acquisition. This extremely short exposure time effectively freezes the motion blur of cells in the high-pressure flow environment, ensuring the clarity of cell outlines in a single frame image. The acquired cell images are transmitted to the host image processing unit via an explosion-proof sealed connector and a data cable integrated within the high-pressure pipeline, serving as the raw input for subsequent image analysis.

[0059] The specific implementation of step S02 is as follows: The image processing unit first performs a cell boundary enhancement algorithm based on a modified Frangi blood vessel enhancement filter on the received cell image. This algorithm calculates a 2×2 symmetric Hessian matrix composed of the second-order partial derivatives of the image grayscale function for each pixel neighborhood at multiple scales from σ=1μm to 5μm, and extracts two eigenvalues ​​of the Hessian matrix. and .when and When the absolute value is negative, it indicates the presence of a plate-like anisotropic structure in the neighborhood of that pixel, i.e., a cell membrane boundary, and a high response value is assigned. The response maps at each scale are then merged pixel by pixel, taking the maximum value to generate a cell boundary enhancement map. This cell boundary enhancement map is then superimposed on the original grayscale image according to weights to output a boundary-enhanced grayscale image. Subsequently, Gaussian smoothing preprocessing is performed on the boundary-enhanced grayscale image to suppress high-frequency random noise introduced by light source flicker or transmission noise, making the input feature distribution of the subsequent segmentation model more stable. The final output boundary-enhanced grayscale image is used as the input for step S03.

[0060] The specific implementation of step S03 is as follows: The pressure-adaptive cell segmentation model uses a standard U-Net as its backbone network. Each layer of the encoder extracts multi-scale spatial features layer by layer from the input boundary-enhanced grayscale image. The decoder upsamples and fuses the features of each layer, finally outputting a probability map of each pixel belonging to the cell foreground and a probability map of the cell boundary. The pressure encoding branch receives the current pressure value output by the online pressure sensor, encodes the scalar pressure value into a 128-dimensional feature vector through three fully connected layers, and then decodes it into scaling parameters and offset parameters corresponding to the number of channels in the feature map of each layer of the encoder. The above scaling parameters and offset parameters apply a linear affine transformation to the intermediate feature map of each layer of the encoder element by element through a feature-by-element linear modulation mechanism, so that the channel distribution of the feature map continuously shifts with the current pressure value, thereby compensating for the systematic drift of the cell boundary image features caused by the change in the refractive index of the culture medium with pressure, while keeping the backbone weight unchanged. The cell boundary probability map output by the decoder is simultaneously passed to step S04 to assist in the foreground mask refinement of the geodesic distance transformation.

[0061] The specific implementation of step S04 is as follows: Within the foreground mask determined by the binary mask output by the pressure-adaptive cell segmentation model, a geodesic distance transformation map is calculated for the boundary enhancement grayscale image output in step S02. This map represents the geodesic distance from each pixel to the nearest background pixel along the minimum grayscale gradient path. The geodesic distance path is lengthened in boundary regions with drastic grayscale changes and approaches a straight line in uniform foreground regions. Therefore, the local maxima of the geodesic distance transformation map can more accurately locate the geometric center of each cell. Using the local maxima as watershed seed points, a seed suppression rule based on the prior value of the minimum cell diameter is introduced: adjacent seed points with a spacing smaller than the prior value of the minimum cell diameter cannot be activated simultaneously. This constraint effectively prevents oversegmentation caused by texture noise within the cell. After performing watershed flooding filling on the negative gradient field of the geodesic distance transformation map, Voronoi segmentation is used to geometrically refine the boundary pixels at the intersection of adjacent cells. The boundary pixels are then assigned to the cells belonging to the nearest seed points according to the geodesic distance, ultimately outputting the contours of each independent cell. The total number of cells is obtained by counting the number of independent cell outlines. The cell density is calculated based on the area of ​​the image acquisition field. Four morphological parameters—equivalent diameter, roundness, aspect ratio, and eccentricity—are extracted for each cell outline. The prior value of the minimum cell diameter can be manually entered by the operator or automatically calculated by the image processing unit from the 5th percentile after statistically analyzing the equivalent diameter distribution in the initial acquired image.

[0062] The specific implementation of step S05 is as follows: based on three statistical measures of the current image acquisition batch, namely the mean cell segmentation confidence score... Mean cell boundary response value With image grayscale standard deviation Divide by their respective calibration reference values. , , The quality assessment function value is obtained by multiplying the three ratios. The calibration reference values ​​are automatically calculated and stored by the image processing unit after the system completes calibration using a cell-like standard calibration plate. When the current image quality meets the requirements, the segmentation confidence threshold and light source brightness remain unchanged; when When the segmentation confidence threshold is lowered by 5%, a command to increase the light source brightness by 10% is sent to the light source controller; when At this time, the segmentation confidence threshold is lowered by 15% and a command to increase the light source brightness by 25% is issued, while simultaneously triggering an image quality warning to prompt the operator to check the cleanliness of the observation window. The purpose of lowering the segmentation confidence threshold is to enable the model to retain more cell candidate regions even when image quality deteriorates, while increasing the light source brightness improves contrast from the image acquisition source. The two work together to form a closed-loop response to image quality degradation.

[0063] The specific implementation of step S06 is as follows: The image processing unit uploads the cell density, equivalent diameter, roundness, aspect ratio, and eccentricity obtained in step S04 to the host computer via the high-voltage communication module. The host computer compares the received cell density with the preset process target value, calculates the deviation, and automatically outputs control commands according to the preset process control logic. These commands adjust the perfusion pump flow rate to change the culture medium exchange rate, adjust the high-pressure container pressure to change the pressure environment of the cells, or adjust the culture temperature to regulate the cell metabolic rate. The coordinated adjustment of these three control variables ensures that the cell density continuously converges to the process target value, achieving closed-loop process control with no human intervention throughout the entire process.

[0064] It should be noted that the present invention includes the following key technical ideas and their synergistic effects.

[0065] The first key technical approach is the combination of pressure-encoded branches and element-wise linear modulation of features. Traditional fixed-weight segmentation models retain their feature extraction strategy unchanged across all input images after training. However, when pressure changes cause a shift in the refractive index of the culture medium, the model's sensitivity to cell boundaries fails to track this physical change, leading to increased missed detections at cell boundaries. This invention encodes pressure values ​​as modulation signals and applies element-wise linear affine transformations to the feature maps of each encoder layer. Essentially, this provides real-time linear compensation for pressure-induced systematic shifts in the feature space, ensuring that the same set of backbone weights maintains an effective response to cell boundaries across the entire pressure range.

[0066] The second key technical approach is an adaptive watershed cell separation algorithm based on geodesic distance transformation. Ordinary Euclidean distance transformation has difficulty accurately locating the geometric center of each cell in densely contacted cell regions. Geodesic distance transformation, by introducing gray-level gradient constraints, lengthens the path at the boundary, thereby making local maxima points fall more accurately inside each cell. The positioning accuracy of watershed seed points is fundamentally improved. At the same time, the prior value constraint of the minimum cell diameter suppresses over-segmentation caused by texture noise.

[0067] The synergistic effect of the two technical approaches is reflected in the fact that the high-quality binary mask output by the pressure-adaptive cell segmentation model provides accurate foreground mask boundaries for geodesic transformation, while geodesic transformation accurately decouples mutually adhered cells in densely contacted cell scenarios. The two form a relay relationship between model output and post-processing, enabling the entire process from image input to final cell counting to maintain stable accuracy under high pressure conditions.

[0068] It should be noted that this invention also solves the following technical problem: In existing technologies, in dense cell culture scenarios, cells come into contact with each other to form aggregates. Conventional watershed algorithms based on Euclidean distance transformation fail to accurately locate the geometric center of each cell, resulting in a large number of undersegments and a systematically low cell count. This invention introduces geodesic distance transformation and uses gray-level gradient constraints to make the local maxima of the geodesic distance transformation map more accurately correspond to the interior of each cell. Combined with the prior value of the minimum cell diameter to suppress oversegmentation, this invention solves the problem of insufficient decoupling accuracy of individual cells in dense cell clusters from the algorithm principle level.

[0069] This invention also solves the technical problem of segmentation parameters not being able to adaptively adjust when image acquisition quality degrades. In existing technologies, when the observation window is contaminated or the light source intensity drifts, the decrease in image contrast leads to a mismatch between the segmentation confidence threshold and the actual image quality, resulting in a large loss of candidate cell regions. This invention constructs a quality assessment function that includes three parameters: the mean cell segmentation confidence value, the mean cell boundary response value, and the standard deviation of image grayscale. This function quantifies the comprehensive changes in image quality into a single scalar and adjusts the segmentation confidence threshold and light source brightness in a linked manner according to the interval to which the scalar belongs. This forms a feedback mechanism that synchronously closes the loop from image quality perception to acquisition and analysis parameters, fundamentally avoiding abrupt inaccuracies in counting results when image quality degrades.

[0070] Specifically, the principle of this invention is as follows: The fundamental reason why this invention can solve the above-mentioned technical problems is that the change in the refractive index of the culture medium with increasing pressure is a deterministic physical law. Its influence on image features can be modeled as a systematic shift in the feature space, and linear affine transformation has the mathematical ability to accurately compensate for such shifts. The pressure encoding branch maps the scalar pressure value to a 128-dimensional feature vector through three fully connected layers, and then decodes it into scaling and offset parameters that match the number of channels in each layer of the encoder. Linear modulation is applied to the intermediate feature map element by element. Essentially, the physical effect of pressure is injected into the feature extraction process in a learnable way, so that the same set of backbone weights exhibits a targeted feature response pattern under different pressures. At the same time, the cell boundary enhancement algorithm based on the Frangi blood vessel enhancement filter uses the eigenvalues ​​of the Hessian matrix to analyze the anisotropic structure of the cell membrane in the second derivative space. Under low signal-to-noise ratio conditions, the boundary contrast is pre-enhanced, providing a more stable input representation for the pressure-adaptive cell segmentation model, further reducing the model's sensitivity to image contrast degradation, and ensuring the consistency of segmentation accuracy across pressure conditions from a technical logic perspective.

[0071] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.

[0072] The specific implementation of step S01 is as follows: immerse the high-pressure resistant probe into the cell suspension in the high-pressure container, start the high-pressure compatible light source module, and the high-pressure resistant industrial camera module synchronously acquires cell images flowing through the observation window with an exposure time of no more than 10μs, and transmits the cell images to the image processing unit of the host computer.

[0073] The specific implementation of step S02 is as follows: The image processing unit sequentially performs cell boundary enhancement algorithm processing based on the Frangi blood vessel enhancement filter modification and Gaussian smoothing preprocessing on the cell image, outputting a boundary-enhanced grayscale image. For the input grayscale image... , in scale (The value range is from 1μm to 5μm, and a total of 1μm is taken) At discrete scales, for each pixel Calculation Image after Gaussian kernel smoothing Then, the Hessian matrix is ​​constructed, and the formula is expressed as follows:

[0074] ;

[0075] In the formula, For pixels In scale The Hessian matrix, where each element is a second-order partial derivative of the image's gray-level function, describes the gray-level curvature structure of the neighborhood at that location. Eigenvalue decomposition yields two eigenvalues. and Agreement The cell membrane structure is represented in the second derivative space of the image as follows: and For negative values ​​with large absolute values, a single-scale cellular structure response function is constructed, expressed by the following formula:

[0076] ;

[0077] In the formula, Anisotropy ratio, dimensionless, used to distinguish between plate-like cell membrane structures and speckle noise; The structural strength is dimensionless and used to suppress low response in the background region. This is the anisotropy adjustment parameter, dimensionless, with an empirical value of 0.5; This is a structural strength adjustment parameter, dimensionless, with empirical values ​​taken at the current scale. Half of the maximum value; For the characteristic function, when Set the value to 1 if the condition is met, otherwise set it to 0, ensuring that a response is given only for dark boundary structures; The response value is dimensionless; all three factors are dimensionless, and their product is also dimensionless. The multi-scale fusion formula is expressed as follows:

[0078] ;

[0079] In the formula, This is a multi-scale cell boundary enhancement map, dimensionless, taking the pixel-wise maximum value of the response at each scale. The formula for the final boundary enhancement grayscale image is as follows:

[0080] ;

[0081] In the formula, Enhance the grayscale image at the boundaries, grayscale levels; To incorporate the weights, a dimensionless value is used, with an empirical value of 0.6. The original input grayscale image, with grayscale levels; This needs to be combined with Since the dimensions are consistent, the fusion will be performed before... Multiply by the maximum gray level of the image (Grayscale) scale alignment is performed, and the actual fusion formula is as follows: ,in This is the upper limit for image grayscale measurement; for an 8-bit image, it is set to 255.

[0082] The specific implementation of step S03 is: enhancing the grayscale image at the boundary. The current pressure value acquired by the online pressure sensor Simultaneously input the pressure-adaptive cell segmentation model. The pressure encoding branch will... After being transformed sequentially through three fully connected layers, the first... Layer output is ,in This is a normalized pressure scalar, dimensionless. The system's rated maximum operating pressure, in units of Experience value: 45 ; and The first The weight matrix and bias vector of the fully connected layer are parameters obtained from model training; It is a linear rectified activation function; the final output is... This is a 128-dimensional pressure feature vector, dimensionless. Scaling parameter vector. With offset parameter vector Each by The result is obtained through linear mapping decoding, and the formula is expressed as follows:

[0083] ;

[0084] ;

[0085] In the formula, , For the mapping weight matrix, , These are bias vectors, all of which are parameters obtained from model training and are dimensionless. and Dimension and First Layer feature map The number of channels is consistent. The encoder's first channel is modulated using a feature-based element-wise linear modulation mechanism. Layer feature map The modulation is applied, and the formula is expressed as follows:

[0086] ;

[0087] In the formula, For the modulated first Layer feature map; This represents element-wise multiplication; , , , All values ​​are dimensionless, and both sides of the equation have the same dimensions. The model decoder outputs a probability map of each pixel belonging to the cell foreground. and cell boundary probability map Both have a range of values. , dimensionless, used in subsequent steps.

[0088] The specific implementation method of step S04 is: to With threshold Binarization yields a foreground binary mask. ,exist Within the defined foreground area, for The formula for calculating the geodesic distance transformation map is as follows:

[0089] ;

[0090] In the formula, For pixels Geodesic distance to the nearest background pixel, in pixels; From The set of all paths leading to the nearest background pixel; For parameterized paths, ; for The grayscale gradient, expressed in gray levels per pixel; This represents the grayscale gradient magnitude at each point along the path. This is a reference value for image gray-level gradient normalization, with the unit being gray levels / pixel. It takes the average value of the global gray-level gradient magnitude of the current image and is used to make the gray-level gradient term dimensionless, so that the added term in parentheses is dimensionless and its dimension is unified with the gradient term. The infinitesimal arc length of the path, in pixels, is multiplied by the dimensionless term in parentheses, and the integral result is in pixels. Dimensions are consistent. The local maxima are used as the seed points of the watershed. Introducing the prior value of minimum cell diameter Seed suppression rules (in pixels), This is either the minimum equivalent diameter of a single cell pre-input by the operator based on the cell type being monitored, or the 5th percentile obtained automatically by the image processing unit after statistically analyzing the distribution of equivalent diameters of each cell in the initial acquired image. ,in This represents taking the 5th percentile of the set. For any two candidate seed points... and ,like Then only keep The larger one. In Watershed flooding is performed on the gradient field, and finally, Voronoi Diagrams are used to refine the boundaries of adjacent cells: for boundary pixels Assign it to a seed point that satisfies the following formula. The cell type is described in the following formula:

[0091] ;

[0092] In the formula, For boundary pixels To the seed point The geodetic distance, in pixels; Number the seed point with the closest geodesic distance. The total number of independent silhouettes equals the total number of cells. , for the The morphological parameters extracted from each cell are as follows: equivalent diameter ,in For the first Projected area of ​​each cell, in units of , Units are ; Circularity ,in For the first The area of ​​the smallest circumcircle of the projected outline of a cell, in units of , Dimensionless; aspect ratio ,in and The first The longest and shortest sides of the smallest bounding rectangle of each cell, in units of... , Dimensionless; Eccentricity ,in and The first The major and minor semi-axis of the ellipse fitted by each cell, in units of 1. , Dimensionless. The formula for cell density is as follows:

[0093] ;

[0094] In the formula, Cell density, unit: cells / ; The total number of cells obtained is counted, expressed in units of individual cells. The effective observation volume corresponding to the observation window, in units of ,Depend on The calculation yielded, where The field of view area corresponding to a single frame image, in units of The magnification of the telecentric lens and the camera pixel size are calibrated. To observe depth of field, the unit is... The value is determined by the lens's numerical aperture and wavelength, and is calibrated and stored by the calibration process after the system is assembled.

[0095] The specific implementation of step S05 is as follows: based on the average cell segmentation confidence score in the current image acquisition batch. Mean cell boundary response value With image grayscale standard deviation The quality assessment function value is calculated using the following formula:

[0096] ;

[0097] In the formula, The value of the quality assessment function is dimensionless. This represents the mean confidence level of cell segmentation in the current batch, which is dimensionless. To determine the baseline confidence level, a dimensionless value is obtained by statistical analysis of the calibration images by the image processing unit after the calibration process is completed; This represents the average cell boundary response value for the current batch, which is dimensionless. The reference boundary response value is dimensionless and obtained from the calibration process; The standard deviation of grayscale values ​​for the current batch of images is dimensionless. The standard deviation of the calibrated grayscale is dimensionless and obtained from the calibration process; each of the three ratios is normalized to its corresponding calibrated reference value to eliminate absolute differences in magnitude. It reflects the overall deviation of the current image quality from the calibration state. When At that time, maintain the current segmentation confidence threshold. With the brightness of the light source remaining constant; when At that time, Reduce by 5%, and send an adjustment command to the light source controller to increase the light source brightness by 10%; when At that time, The brightness is reduced by 15%, and an adjustment command to increase the light source brightness by 25% is sent to the light source controller. At the same time, an image quality warning is triggered, prompting the operator to check the cleanliness of the observation window.

[0098] The specific implementation of step S06 is: cell density equivalent diameter Circularity Aspect Ratio With eccentricity The data is transmitted to the host computer via the high-voltage communication module, and the host computer then... The deviation from the preset process target value automatically adjusts the flow rate of the infusion pump, the pressure of the high-pressure vessel, or the culture temperature to achieve closed-loop process control.

[0099] like Figure 2 and 3 As shown, the high-pressure cell counter used in this embodiment includes: a high-pressure resistant probe 1, the housing 11 of the probe 1 is made of pressure-resistant alloy material, the housing 11 is provided with an observation window 12 made of high-strength transparent material, the probe 1 is internally fixedly provided with a high-pressure compatible light source module 13, a telecentric lens 14 and a pressure-resistant industrial camera module 15, the telecentric lens 14 is optically connected to the industrial camera module 15, and the tail end of the probe 1 is provided with an explosion-proof sealing joint 16.

[0100] The high-pressure pipeline 2 is connected to the probe 1 through the explosion-proof sealing joint 16. The high-pressure pipeline 2 integrates data cables and power cables.

[0101] The host 3 has a built-in image processing unit, a light source controller 31, and a high-voltage communication module 35.

[0102] Furthermore, the image processing unit is used to run the cell image intelligent analysis software 34 to process the images acquired by the industrial camera module 15 in order to identify and count cells.

[0103] Furthermore, the light source controller 31 is electrically connected to the high-voltage compatible light source module 13 via a power cable within the high-voltage pipeline 2.

[0104] Furthermore, the high-voltage communication module 35 is used to realize data communication between the host computer 3 and the host computer 4 or the process control system.

[0105] Furthermore, the high-voltage compatible light source module 13 is a high-voltage resistant LED array, and the light source controller 31 has constant current drive and pulse width modulation functions. According to claim 1, the high-voltage cell counter is characterized in that the high-voltage communication module 35 is an optical transceiver, communicating via optical fiber.

[0106] Furthermore, it also includes a calibration module, which includes a cell-like standard calibration. The calibration module has micro-patterns of standard size fabricated on it for in-situ calibration of the measurement accuracy of the industrial camera module 15 and the image processing unit.

[0107] Furthermore, there are multiple high-voltage probes 1, and the host 3 is a multi-channel host that can simultaneously connect to and process signals from multiple probes 1.

[0108] To better understand and implement this invention, the following is a specific application scenario of the invention, Example 2: To verify the effect of the invention, the technicians set up a test environment and selected a yeast cell (with an average equivalent diameter of about 6 μm) that was subjected to pressure adaptation culture in a high-pressure bioreactor as the test object. The reactor pressure was set to four working conditions: 0 MPa, 15 MPa, 30 MPa and 45 MPa. Under each pressure condition, 30 batches of images were continuously collected, with 20 frames collected in each batch.

[0109] The specific customization details of the high-pressure cell counter used in this embodiment are as follows: Probe customization: The housing 11 of the high-pressure resistant probe 1 is made of Hastelloy C-276, designed to withstand a pressure of 45 MPa. The observation window 12 is a 12 mm diameter sapphire crystal, sealed with a gold-tin alloy vacuum brazing process for high strength. The imaging optical path uses transmissive bright-field illumination, and the light source 13 is a high-uniformity white LED array. The telecentric lens 14 has a magnification of 0.4X and a working distance of 25 mm, ensuring sufficient imaging field of view and depth of field. The camera 15 uses an 8-megapixel global shutter CMOS sensor, and the entire system has undergone rigorous epoxy resin potting and pressure cycle testing.

[0110] The main unit's system configuration is as follows: a four-channel main unit system 3 is used, which is connected to four high-pressure resistant probes 1, which are precisely installed at four different height positions at the bottom, lower middle, middle and upper middle of the 5 L reactor 5.

[0111] Probe Functions: The probe is designed to withstand a pressure of 1.5 MPa. In addition to standard bright-field imaging, the probe integrates an epi-fluorescence imaging channel: the light source 13 contains a 470 nm excitation LED, and a 525 / 50 nm bandpass filter is mounted in front of the camera 15 for monitoring cells expressing green fluorescent protein (GFP) or cell subpopulations labeled with specific fluorescent dyes.

[0112] Advanced Analysis Functions: The host software 34 possesses powerful multitasking capabilities. Four channels operate in parallel: real-time cell counting and basic morphological analysis; simultaneous intensity analysis of fluorescence channel images to monitor the expression level of target proteins; the software can also establish algorithmic models based on morphological features (such as cell outline integrity and brightness) and fluorescence intensity to estimate cell viability in real time; and accurately statistically analyze the distribution of cell clusters in different size ranges.

[0113] The specific operating steps are as follows: After the high-pressure resistant probe is immersed in the high-pressure container, the high-pressure compatible light source module is started with stable brightness, and the high-pressure resistant industrial camera module synchronously acquires cell images flowing through the observation window with an exposure time of 8μs. The image resolution is set to 2048×2048 pixels, and the physical size of a single pixel corresponds to 0.15μm, so as to ensure that yeast cells with an equivalent diameter of about 6μm occupy sufficient pixel coverage in the image.

[0114] After image acquisition, the image processing unit performs a cell boundary enhancement algorithm based on a modified Frangi blood vessel enhancement filter on the original cell image. It calculates the Hessian matrix of each pixel's neighborhood at five scales from σ=1μm to 5μm and extracts feature values. and ,right and Negative pixels with larger absolute values ​​are assigned higher response values. The maximum values ​​of the response maps at five scales are merged and then superimposed on the original grayscale image with a weight ratio of 0.6:0.4 to output a boundary-enhanced grayscale image. This image is then smoothed using a Gaussian smoother with a standard deviation of σ=0.8μm to suppress random noise. Under 30MPa conditions, the average image contrast (measured by the ratio of foreground-background grayscale difference to grayscale dynamic range) of the original cell image is 0.21, while it increases to 0.47 after boundary enhancement. This indicates that the boundary enhancement algorithm can significantly improve the discernibility of cell contours in high-pressure, low-contrast scenes.

[0115] Boundary-enhanced grayscale images and real-time pressure values ​​from online pressure sensors are input into a pressure-adaptive cell segmentation model. During training, the model employs an active learning strategy, sorting images by information entropy from high to low. The top 20% of images with the highest information entropy are manually labeled pixel-by-pixel. For the remaining images, pseudo-labels are generated through self-supervised contrastive learning pre-training. Training datasets are constructed at five pressure gradients: 0MPa, 10MPa, 20MPa, 30MPa, and 45MPa. End-to-end training with the AdamW optimizer continues until the average accuracy on the validation set no longer improves, and the optimal weight parameters are saved. During inference, the pressure encoding branch encodes the real-time pressure values ​​into 128-dimensional feature vectors, applying element-wise linear modulation to the feature maps of each encoder layer, allowing the model's feature extraction strategy to continuously adjust with the pressure value. Figure 3As shown, under 45MPa conditions, the probability gradient of the cell boundary region in the cell foreground probability map output by the pressure-adaptive cell segmentation model is clear, and the binary mask boundary position of each cell instance is highly consistent with the manually labeled results. In contrast, the control model without the introduction of the pressure-adaptive mechanism exhibits large-area boundary blurring and missed detection under the same conditions.

[0116] The binary mask output by the segmentation model is fed into an adaptive watershed cell separation algorithm based on geodesic distance transform. A geodesic distance transform map is calculated on the boundary-enhanced grayscale image within the foreground mask. Local maxima are used as watershed seed points, and a priori value of 4 μm for the minimum cell diameter is set (automatically obtained by taking the 5th percentile after statistically analyzing the equivalent diameter distribution in the initial batch of images by the image processing unit). Adjacent seed points with a spacing less than 4 μm are simultaneously activated. Watershed flooding is performed on the negative gradient field of the geodesic distance transform map. Finally, Voronoi segmentation is used to refine the boundaries of adjacent cells, outputting the contours of each independent cell. The cell counting results and main morphological parameters under various conditions are shown in Table 1.

[0117] Table 1. Statistical table of cell density and morphological parameters under various pressure conditions.

[0118]

[0119] As shown in Table 1, with increasing pressure, the equivalent diameter of the cells decreases slightly, the roundness decreases slightly, and the aspect ratio and eccentricity increase slightly, reflecting the slight compression effect of the high-pressure environment on the morphology of yeast cells. This trend is consistent with the known cell compression laws in high-pressure biology, indicating that the segmentation and morphology extraction results of the present invention have physical rationality.

[0120] In terms of quality assessment and adaptive adjustment, technicians calibrated the system using a cell-like standard calibration plate under 0MPa calibration conditions and recorded the confidence level of the calibration benchmark. Calibration reference boundary response value Standard deviation of calibration reference grayscale In the 15th batch of data collected under 30MPa conditions, , , Quality assessment function value ,belong Within the specified interval, the system automatically lowers the segmentation confidence threshold by 15% and sends a command to the light source controller to increase the light source brightness by 25%, simultaneously triggering an image quality warning. After inspection, operators found a small number of air bubbles attached to the inside of the observation window, which were removed. The value recovered to 0.87, and the system returned to normal operation. The response process of quality assessment and adaptive adjustment is as follows: Figure 4 As shown.

[0121] In terms of closed-loop process control, the host computer will receive the cell density and compare it with the preset process target value (310 cells / ). In comparison, when the cell density decreased to 299 cells / cm² under 45 MPa conditions... At that time, the host computer automatically reduced the flow rate of the perfusion pump to slow down the dilution rate of the culture medium. After about three collection batches, the cell density rebounded and stabilized near the process target value, realizing closed-loop control without human intervention.

[0122] The advancements of this invention compared to traditional methods are reflected in the following aspects: Traditional cell image analysis systems based on fixed-weight models cannot actively adjust feature extraction strategies when pressure changes, and pressure-induced image feature drift can only be passively manifested as a loss of accuracy. In contrast, this invention injects pressure values ​​into each layer of the encoder as linearly modulated signals, allowing the adjustment of feature distribution to occur synchronously with pressure changes, eliminating the cumulative effect of feature drift from the source of the information transmission link. Traditional watershed algorithms rely on Euclidean distance transformation, and in dense cell regions, seed point localization errors increase with cell density. However, geodesic distance, through gray-level gradient constraints, naturally extends the path at the boundary, making seed point localization accuracy unaffected by cell density, thus resolving the fundamental contradiction of decoupling dense cell clusters from the perspective of algorithmic geometry. The quality assessment function quantifies image quality changes into an operable scalar and drives the segmentation parameters and acquisition parameters to respond synchronously, enabling the system to actively perceive and compensate for image quality degradation, rather than relying on manual post-event intervention. It should be noted that the user data involved in the embodiments of this application has been authorized, acquired, processed, and transmitted in accordance with legal and regulatory requirements.

[0123] It should be noted that the variables involved in this invention are explained in detail in Tables 2 and 3.

[0124] Table 2. Variable Explanation Table (Part 1)

[0125]

[0126] Table 3. Variable Explanation Table (Part Two)

[0127]

[0128] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A cell counting method using a high-pressure cell counter, characterized in that, Includes the following steps: The high-pressure resistant probe is immersed in the cell suspension in the high-pressure container. The high-pressure compatible light source module is activated, and the high-pressure resistant industrial camera module synchronously acquires cell images flowing through the observation window with an exposure time of no more than 10μs. The cell images are then transmitted to the image processing unit of the host computer. The image processing unit sequentially performs cell boundary enhancement algorithm processing based on the modified Frangi blood vessel enhancement filter and Gaussian smoothing preprocessing on the cell image, and outputs a boundary-enhanced grayscale image; The boundary-enhanced grayscale image and the current pressure value collected by the online pressure sensor are simultaneously input into the pressure-adaptive cell segmentation model. The pressure-adaptive cell segmentation model outputs a binary mask and cell boundary probability map for each cell instance. The pressure-adaptive cell segmentation model uses the standard U-Net as the backbone network and introduces a feature element-wise linear modulation mechanism at the feature maps of each layer of the encoder. A pressure encoding branch is also set up to encode the current pressure value into a 128-dimensional feature vector through three fully connected layers. The feature element-wise linear modulation mechanism applies scaling and offset to the feature maps of each layer of the U-Net encoder element by element, so that the feature extraction strategy changes continuously with the current pressure value. An adaptive watershed cell separation algorithm based on geodesic distance transformation is applied to the binary mask to decouple the contacting cell clusters into independent cell outlines, count the total number of cells and calculate the cell density, and extract the equivalent diameter, roundness, aspect ratio and eccentricity of each cell instance. Based on the mean cell segmentation confidence score, mean cell boundary response value, and image grayscale standard deviation in the current image acquisition batch, calculate the quality assessment function value. According to the interval to which the quality assessment function value belongs, adjust the segmentation confidence threshold of the pressure adaptive cell segmentation model and send a light source brightness adjustment command to the light source controller. The cell density, equivalent diameter, roundness, aspect ratio, and eccentricity are transmitted to the host computer via a high-voltage communication module. The host computer automatically adjusts the perfusion pump flow rate, high-pressure container pressure, or culture temperature based on the deviation between the cell density and the preset process target value, thereby achieving closed-loop process control.

2. The cell counting method of the high-pressure cell counter according to claim 1, characterized in that, The cell boundary enhancement algorithm based on the modified Frangi blood vessel enhancement filter specifically calculates the second-order differential Hessian matrix of each pixel neighborhood at multiple scales from σ=1μm to 5μm, and extracts two feature values. and ,when and When the absolute value is a large negative value, it is identified as a cell membrane structure and a high response value is given. The maximum value of the multi-scale response map is taken and fused, and then added to the original grayscale image according to the weights to output a boundary-enhanced grayscale image.

3. The cell counting method of the high-pressure cell counter according to claim 2, characterized in that, The Hessian matrix refers to a 2×2 symmetric matrix composed of the second-order partial derivatives of the image gray-level function at each pixel position. Its eigenvalues ​​describe the curvature structure of the gray-level distribution in the neighborhood of the position and are used to detect anisotropic structures in the image.

4. The cell counting method of the high-pressure cell counter according to claim 3, characterized in that, In the pressure-adaptive cell segmentation model, the element-wise linear modulation mechanism refers to decoding the 128-dimensional feature vector output by the pressure encoding branch into scaling and offset parameters corresponding to the number of channels in the feature map, and multiplying and adding them element-wise with each channel of the feature map, so that the feature distribution changes continuously with the current pressure value.

5. The cell counting method of the high-pressure cell counter according to claim 4, characterized in that, The training dataset for the pressure-adaptive cell segmentation model was established by acquiring in-situ images of cell suspensions under five pressure gradients: 0 MPa, 10 MPa, 20 MPa, 30 MPa, and 45 MPa. An active learning strategy was used to sort and filter images to be labeled according to their information entropy from high to low. The images with the highest information entropy were manually labeled pixel by pixel. For unlabeled images, a self-supervised contrastive learning pre-training method was used to generate pseudo-labels. The label set was iteratively expanded until the segmentation accuracy of the validation set converged.

6. The cell counting method of the high-pressure cell counter according to claim 5, characterized in that, The active learning strategy refers to calculating the information entropy using the output probability distribution of the current model's prediction results for unlabeled images, prioritizing the selection of images with the highest information entropy for manual annotation, and maximizing the information content of the training set with minimal annotation cost. The information entropy is a scalar obtained by averaging the Shannon entropy of each pixel category probability vector across all pixels.

7. The cell counting method of the high-pressure cell counter according to claim 6, characterized in that, The self-supervised contrastive learning pre-training method refers to constructing positive sample pairs for different randomly augmented views of the same image and negative sample pairs for views of different images, and training the U-Net encoder so that the representations of positive sample pairs are close to each other in the feature space and the negative sample pairs are far apart from each other, thereby enabling the U-Net encoder to learn visual feature representations with generalizability.

8. The cell counting method of the high-pressure cell counter according to claim 7, characterized in that, The training of the pressure-adaptive cell segmentation model is specifically performed by initializing the U-Net encoder with weights obtained from self-supervised contrastive learning pre-training, inputting the current pressure value and the corresponding boundary-enhanced grayscale image in pairs, using the weighted sum of instance segmentation loss and cell boundary prediction loss as the objective function, and employing the AdamW optimizer for end-to-end training, saving the optimal weight parameters using the average accuracy on the validation set as the early stopping criterion.

9. The cell counting method of the high-pressure cell counter according to claim 8, characterized in that, The adaptive watershed cell separation algorithm based on geodesic distance transformation specifically calculates the geodesic distance from each pixel to the nearest background pixel along the minimum gray-level gradient path within the foreground mask determined by the binary mask, generates a geodesic distance transformation map, uses local maxima as watershed seed points, introduces a seed suppression rule based on the prior value of the minimum cell diameter, performs watershed flooding filling on the negative gradient field of the geodesic distance transformation map, and finally uses Voronoi segmentation to refine the boundaries of adjacent cells.

10. The cell counting method of the high-pressure cell counter according to claim 9, characterized in that, The minimum cell diameter prior value refers to the minimum equivalent diameter value of a single cell pre-input by the operator based on the cell type being monitored, or the value obtained by the image processing unit automatically taking the 5th percentile after statistically analyzing the distribution of equivalent cell diameters in the initially acquired cell images.