Microfluidic microscopic remaining oil form recognition device and method based on YOLO model

The microscopic residual oil morphology identification method based on the YOLO model solves the problems of accuracy and real-time performance in residual oil morphology identification in microfluidic experiments. It achieves high-precision identification and generalization capabilities, is applicable to multiple reservoir types and the entire development process, and provides reliable EOR parameter support.

CN121558697APending Publication Date: 2026-02-24YANGTZE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511727019.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies for identifying residual oil morphology in microfluidic experiments suffer from high image noise, blurred oil-water phase boundaries, low identification accuracy, and poor generalization ability, making it difficult to meet the needs of real-time analysis. In particular, when the oil-water interfacial tension is low or emulsification is significant, traditional methods rely on manual intervention and are inefficient.

Method used

A microfluidic residual oil morphology identification method based on the YOLO model is adopted. Through data acquisition and preprocessing, feature extraction and encoding, boundary constraints and low-rank adaptation, decoding and segmentation loss optimization, multi-scale feature fusion and mask refinement, morphology post-processing and EOR parameter extraction, combined with C3k2 multi-scale backbone network, C2PSA position-sensitive attention mechanism, graph Laplacian smoothing regularization term, LoRA low-rank increment and boundary weighted FocalLoss, high-precision identification is achieved.

Benefits of technology

It achieves high-precision identification of various residual oil morphologies in microfluidic images, adapts to different EOR schemes and reservoir types, provides reliable EOR parameters, supports reserve assessment and development scheme design, and improves the real-time performance and generalization ability of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121558697A_ABST
    Figure CN121558697A_ABST
Patent Text Reader

Abstract

The invention provides a microfluidic microscopic remaining oil form recognition device and method based on a YOLO model, and belongs to the technical field of oil reservoir simulation and analysis, and the method comprises the following steps: S1, data acquisition and preprocessing; s2, feature extraction and coding; s3, boundary constraint and low-rank adaptation fine tuning; s4, decoding and segmentation loss optimization; s5, multi-scale feature fusion and mask refinement are carried out; s6, performing form post-processing and EOR parameter extraction; and S7, performing performance verification and iteration. The YOLO model-based microfluidic microcosmic remaining oil form recognition device and method provided by the invention solve the influence of factors such as fuzzy oil-water interfacial tension, difficulty in micron-sized oil drop trapping and lagging real-time analysis in a dynamic displacement process on the saturation, recovery ratio and multiphase flow relative permeability evaluation of the remaining oil in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of reservoir simulation and analysis technology, and in particular to a microfluidic microscopic residual oil morphology identification device and method based on the YOLO model. Background Technology

[0002] With the continuous innovation of oil and gas exploration and development technologies, microfluidics has become a key tool for studying fluid flow characteristics at the pore scale of reservoirs, accurately evaluating enhanced oil recovery (EOR) effects, and optimizing displacement strategies. This technology cleverly utilizes microfluidic chips to simulate the complex pore network within reservoirs and, supplemented by high-resolution microscopic imaging, enables real-time observation of the microscopic interactions of multiphase flows such as oil, water, and gas. This reveals the deep mechanisms of displacement processes for petroleum engineers, demonstrating significant potential, especially in advanced EOR experiments such as low-salinity flooding, CO2 flooding, and chemical flooding.

[0003] However, in the practice of microfluidic experiments, the accurate identification and analysis of residual oil morphologies still faces many technical bottlenecks. The acquisition process of microfluidic images is easily affected by multiple factors such as uneven distribution of fluorescent dyes, limited microscope resolution, and complex pore structures, resulting in high noise levels and blurred oil-water phase boundaries in the obtained images, which greatly increases the difficulty and uncertainty of subsequent image processing. Traditional image processing methods and early deep learning models often struggle to accurately distinguish various residual oil morphologies when processing such complex images, especially when the oil-water interfacial tension is low or emulsification is significant, their identification accuracy is further reduced. These methods not only rely heavily on human intervention, resulting in strong subjectivity, low processing efficiency, and poor result consistency, but also fall far short of meeting the urgent need for real-time analysis capabilities in dynamic displacement processes.

[0004] Furthermore, the complex and varied EOR schemes and porosity network types lead to significant differences in image features, making current algorithms inadequate in generalization and unable to adapt to diverse experimental conditions and scene changes. The scarcity of high-quality labeled data further restricts model performance improvement, making efficient calculation of remaining oil saturation and recovery rate difficult to achieve.

[0005] Therefore, in the face of the above challenges, developing a new method and device to achieve high-precision, real-time, and strong generalization ability identification and analysis of residual oil morphology in microfluidic experiments has become a key problem that urgently needs to be solved in the current petroleum engineering field. Summary of the Invention

[0006] The purpose of this invention is to provide a microfluidic microscopic residual oil morphology identification device and method based on the YOLO model, which solves the problems caused by factors such as fuzzy oil-water interfacial tension, difficulty in capturing micron-sized oil droplets, and lag in real-time analysis of dynamic displacement processes in the prior art, which affect the assessment of residual oil saturation, recovery rate, and relative permeability of multiphase flow.

[0007] To achieve the above objectives, this invention provides a microfluidic residual oil morphology identification method based on the YOLO model, comprising the following steps: S1. Data Acquisition and Preprocessing: High-resolution fluorescence microscopic images were acquired in the microfluidic displacement experiment. The remaining oil morphology was labeled using a hybrid labeling strategy of threshold screening, interactive segmentation and petroleum engineer correction. The acquired high-resolution fluorescence microscopic images were then subjected to grayscale truncation and z-score normalization. S2. Feature Extraction and Encoding: The preprocessed image is input into the C3k2 multi-scale backbone network and combined with the C2PSA position-sensitive attention mechanism to achieve hierarchical feature extraction, including shallow pore throat edge capture, mid-layer oil connectivity characterization, and overall distribution of high-layer displacement front. S3. Boundary Constraints and Low-Rank Adaptation Fine-Tuning: A graph Laplacian smoothing regularization term is introduced to constrain the continuity of the oil-water interface. LoRA low-rank increments are injected into the C2PSA key layer to adapt to the microfluidic characteristics of different EOR schemes. S4. Decoding and segmentation loss optimization: The mask is refined pixel by pixel by decoupling the mask branch, and the loss contribution of the aperture throat card break area and oil film peeling area is magnified by boundary weighted FocalLoss. S5. Multi-scale feature fusion and mask refinement: Multi-scale features are fused based on PANet path aggregation and dynamic edge weight map to suppress boundary artifacts induced by fluorescence noise. S6. Morphological post-processing and EOR parameter extraction: Isolated oil droplet removal, morphological closing operation and temporal reconstruction are performed on the identification mask. The remaining oil saturation is calculated by pixel area statistics. The recovery rate is derived by combining the initial oil saturation. S7. Performance Verification and Iteration: FocalLoss loss rate and accuracy are used as evaluation metrics. When the metrics are below the threshold, physical data augmentation based on capillary force-viscous force balance, LoRA fine-tuning, pseudo-label self-distillation and active learning closed-loop optimization are triggered in sequence.

[0008] Preferably, the z-score normalization expression in S1 is: ; in, This represents the original pixel grayscale value, corresponding to the brightness of a certain location in the microfluidic image; The mean of the image region; The standard deviation of the image region; and Reflects the overall grayscale distribution characteristics of microfluidic images; It is a constant, generally .

[0009] Preferably, the expression for the Laplacian smoothing regularization term in S3 is: ; in, For pixels Predicted probability vector; For pixels The predicted probability vector; The weights are determined by a combination of grayscale similarity and spatial proximity. ; in , These are the grayscale values ​​of pixels i and j, respectively; Let be the Euclidean distance between pixels i and j; , All are constant hyperparameters. Controlling the impact of grayscale differences on weights, Control the weight decay rate of spatial distance; The expression for the low-rank increment of LoRA is: ; in, This is the original weight matrix; A and B are both low-rank matrices.

[0010] Preferably, the weighted FocalLoss expression in S4 is: ; The combined boundary weight expression is: ; in, To predict probabilities; This is a constant focusing factor that controls the degree of focusing on difficult-to-separate samples; For category weights, This is a boundary weight graph.

[0011] Preferably, the expression for calculating the remaining oil saturation using the pixel area statistical method in S6 is as follows: ; in, For the first The area of ​​the oil phase being tested; This represents the total pore area; The total number of oil phases detected; The expression for recovery rate is: ; in, Remaining oil saturation This represents the initial oil saturation.

[0012] A microfluidic residual oil morphology identification device based on the YOLO model, comprising: Data acquisition module: configured with fluorescence microscopy imaging interface and time-series slicing unit to record EOR parameters in real time; Image preprocessing module: integrates noise reduction, contrast enhancement and z-score normalization units, including a semi-supervised annotation submodule; noise reduction adopts a median filtering and nonlocal mean collaborative algorithm, and contrast enhancement enhances the oil-water interface through histogram truncation and local contrast stretching; Morphology recognition module: Built-in YOLOv11-seg engine, including C3k2 backbone, C2PSA attention, mask branch, boundary constraint and LoRA sub-module, running boundary weighted segmentation loss; Post-processing and parameter inversion module: equipped with isolation removal, morphological optimization, temporal reconstruction and Sor / Rf calculation units; Closed-loop optimization module: Monitors FocalLoss loss rate and accuracy metrics, and schedules physical augmentation, LoRA fine-tuning, pseudo-labeling, and active learning strategies.

[0013] Preferably, the C3k2 backbone captures pore throat edge features; the C2PSA layer aggregates cross-scale connectivity; the mask branch achieves pixel-level morphological segmentation; the boundary constraint submodule introduces graph Laplacian smoothing; and the LoRA submodule supports few-sample domain adaptation.

[0014] Preferably, when the loss rate increases or the accuracy decreases, the closed-loop optimization module sequentially performs physical constraint enhancement, LoRA fine-tuning, pseudo-label training, and active learning.

[0015] Preferably, the post-processing and parameter inversion module is based on the time-series reconstruction map, uses the area statistics method to calculate Sor and Rf, and fits the relative permeability curve.

[0016] Preferably, the morphology recognition module achieves high-precision recognition of micron-level droplet oil and film oil through efficient fusion of C3k2-C2PSA, boundary constraints and LoRA adaptation, which helps to optimize the EOR solution.

[0017] Therefore, the present invention employs the above-mentioned microfluidic microscopic residual oil morphology identification device and method based on the YOLO model, and the technical effects are as follows: 1. Flexible and adaptable model architecture with high efficiency and reusability: The architecture combines C3k2 Backbone and C2PSA Neck, and is equipped with a low-rank adaptation module. It can quickly adapt to microfluidic images of different lithologies and well locations, supports repeated optimization and iteration, and reduces the cost of cross-scenario application.

[0018] 2. High-precision residual oil morphology identification and accurate calculation of multiple EOR parameters: It can achieve high-precision identification of various residual oil morphologies such as clusters, porous, droplets, columns, and films in microfluidic images. Based on this, it can accurately obtain key parameters such as Sor and Rf, and can also characterize the spatial distribution and multi-directional permeability of residual oil, providing reliable data for EOR evaluation.

[0019] 3. Applicable to multiple reservoir types and the entire development process: It is compatible with conventional sandstone reservoirs and unconventional reservoirs such as shale and carbonate rocks, covering different development stages such as waterflooding and CO2 flooding. The output morphological distribution, EOR parameters, etc. can directly support the work of reserve assessment, development scheme design and remaining oil potential tapping, providing an important supporting method for microfluidic remaining oil identification. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the microfluidic residual oil morphology identification method based on the YOLOv11-seg model of the present invention. Figure 2 This is a schematic diagram of the microfluidic residual oil morphology identification method based on the YOLOv11-seg model of the present invention. Figure 3 This is a schematic diagram of the Head part in the microfluidic residual oil morphology identification method based on the YOLOv11-seg model of the present invention. Figure 4 This is an electron microscope image of a microfluidic flat panel without saturated oil treatment in this embodiment; Figure 5 This is a microfluidic flat-panel electron microscope image of the saturated oil treatment in this embodiment; Figure 6 This is an electron microscope image of the microfluidic flat panel after water-drive treatment in this embodiment; Figure 7 The following is a comparison of the traditional threshold segmentation method and the YOLOv11-seg model recognition method in this embodiment; (a) is the traditional threshold recognition method; (b) is the YOLOv11-seg model recognition method. Figure 8 This is a line graph showing the FocalLoss iteration loss rate for residual oil morphology identification in the embodiments of this specification. Figure 9 This is a line graph showing the accuracy of residual oil morphology identification in the embodiments of this specification. Detailed Implementation

[0021] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0023] Example 1 This invention provides a microfluidic residual oil speciation identification method based on the YOLO model, comprising the following steps: S1. Data Acquisition and Preprocessing: During the microfluidic displacement experiment, high-resolution fluorescence microscopic images of the target chip were acquired to simulate the multiphase flow behavior under the reservoir pore throat network. A hybrid annotation strategy, combining threshold screening, interactive segmentation tools, and petroleum engineer correction, was used to annotate various residual oil morphologies, including clustered oil droplets, porous fragmented oil, isolated droplet oil, columnar oil columns, and film-like attached oil. To eliminate brightness drift between different microscope batches and fluorescent dye concentrations, the original image sequence was first linearly truncated, then image-level z-score normalization was performed, and spatial resampling was performed when necessary to unify the input size. This normalization process ensures that the model of this invention focuses on the differences in oil phase morphology and pore geometry rather than absolute fluorescence intensity deviations. The z-score normalization expression is: ; in, This represents the original pixel grayscale value, corresponding to the brightness of a certain location in the microfluidic image; The mean of the image region; The standard deviation of the image region; and Reflects the overall grayscale distribution characteristics of microfluidic images; It is a constant, generally .

[0024] Microfluidic microscopic images often exhibit grayscale drift. This normalization method can eliminate brightness deviations caused by equipment and scanning batches, forcing the model to focus on structural and phase differences rather than absolute brightness values. This is the basis for accurately identifying the remaining oil morphology and can avoid statistical deviations in oil-water distribution caused by equipment differences, ensuring the accuracy of calculations of key EOR parameters such as saturation and recovery rate.

[0025] S2. Feature Extraction and Encoding: The preprocessed image input uses the Backbone encoder of the C3k2 module. C3k2 achieves efficient multi-scale feature extraction through 3×3 small kernel convolution and CSP bottleneck cascade structure, and inputs it into the C2PSA attention module after adding relative position encoding. In this invention, the encoder adopts a multi-stage design: the shallow layer focuses on the detection of oil droplet edges and pore throat boundaries to capture the micro-capture phenomenon dominated by capillary forces; the middle layer focuses on the characterization of oil film connectivity and wettability changes to analyze oil phase deformation under viscous fingering; the upper layer focuses on the overall distribution of remaining oil and displacement front feature extraction to evaluate the influence of interfacial tension on multiphase flow. In order to simultaneously take into account micron-level small targets and pore network connectivity, this invention adopts a hybrid mechanism of C2PSA position-sensitive spatial attention and cross-scale feature fusion, and applies skip connections and multi-scale interfaces at different stages, so that the model can capture key EOR information such as oil droplet surface tension, film-like oil wettability, and columnar oil displacement path at different semantic scales. S3. Boundary Constraints and Low-Rank Adaptation Fine-Tuning: To ensure that the recognition results conform to the physical laws of multiphase flow, a boundary constraint module is introduced. This module adds several soft constraint terms to the training objective: the graph Laplacian smoothing term L_smooth, and the morphological connectivity constraint L_connect. In this invention, the Boundary Constraint Module can be used as a differentiable loss layer for joint backpropagation with the main loss, and can also be used for pseudo-label screening and post-processing criteria, thus constraining the segmentation output to satisfy connectivity and pore throat morphological priors during both the training and inference stages. To achieve efficient domain adaptation for small samples, a low-rank adaptation strategy is introduced: low-rank increments are inserted into several projection matrices of C2PSA, where only A and B are trained, and the original weights W are kept frozen. LoRA is preferentially injected into the middle and later layers to adapt to EOR-specific features.

[0026] The expression for the Graph Laplace smoothing regularization term is: ; in, For pixels Predicted probability vector; For pixels The predicted probability vector; The weights are determined by a combination of grayscale similarity and spatial proximity. ; in , These are the grayscale values ​​of pixels i and j, respectively; Let be the Euclidean distance between pixels i and j; , All are constant hyperparameters. Controlling the impact of grayscale differences on weights, Control the weight decay rate of spatial distance; In microfluidic images, the oil-water boundary often exhibits "grayscale jumps" due to fluorescence noise. This regularization term, by constraining the smooth change of the prediction probability of adjacent pixels, can suppress abrupt boundary changes, making the segmented three-phase boundary closer to the true physical boundary of the reservoir. For example, in the pore throat region of sandstone microfluidic chips, it can avoid boundary "burrs" caused by noise, ensuring the integrity of the pore throat channel. This is of great significance for accurately extracting the pore throat radius and oil-water interface area, directly improving the physical rationality of the segmentation results.

[0027] The expression for the low-rank increment of LoRA is: ; in, This is the original weight matrix; A and B are both low-rank matrices.

[0028] The lithological differences in microfluidic images from different EOR schemes are significant, and high-quality labeled samples are scarce. This low-rank adaptation mechanism only fine-tunes the matrix and can quickly adapt to the microfluidic features of different lithologies under small sample conditions.

[0029] S4. Decoding and Segmentation Loss Optimization: The mask is refined pixel-by-pixel by decoupling the mask branch, and boundary-weighted FocalLoss is used to amplify the loss contribution of the throat chuck break area and the oil film peeling area; the decoder uses a lightweight multilayer perceptron and attention module to restore multi-scale encoded features layer by layer. To focus on hard-to-classify pixels such as the oil-water interface, a weighted segmentation loss is introduced: This invention uses an edge operator based on the ground truth label to generate a boundary weight map, and combines it with the segmentation loss to amplify the loss contribution of boundary pixels, thereby making the model more discriminative in oil-water boundary and residual oil identification.

[0030] The weighted FocalLoss expression is: ; The combined boundary weight expression is: ; in, To predict probabilities; This is a constant focusing factor that controls the degree of focusing on difficult-to-separate samples; For category weights, This is a boundary weight graph.

[0031] Boundary identification is a key challenge. For example, after water-drive development, the grayscale difference between rock and water phases in microfluidic pores is very small, making them easy to be misjudged by the model. This loss function amplifies the loss contribution of rock-water boundary pixels through the boundary weight map, so that the model focuses on learning the features of difficult-to-distinguish boundaries during training, avoiding missed judgments due to the "insufficient attention" to boundaries by ordinary loss functions.

[0032] S5. Multi-scale feature fusion and mask refinement: Based on PANet path aggregation and dynamic edge weight map fusion of multi-scale features, further suppressing boundary artifacts induced by fluorescence noise; S6. Morphological Post-processing and EOR Parameter Extraction: Isolated oil droplet removal, morphological closing operations, and temporal reconstruction are performed on the identification mask. Remaining oil saturation is calculated using pixel area statistics, and the recovery rate is derived by combining the initial oil saturation. After applying morphological closing operations, isolated voxel removal, and connected component filtering to the final mask, remaining oil saturation is directly calculated based on area counting and area-volume. Relative permeability parameters are extracted through pore-throat networks or estimated through numerical simulation for comparison with experiments. Performance evaluation indicators include mIoU, PSNR, SSIM, and the relative error between remaining oil saturation and relative permeability.

[0033] The expression for calculating residual oil saturation using the pixel area statistical method is as follows: ; in, For the first The area of ​​the oil phase being tested; This represents the total pore area; The total number of oil phases detected; The expression for recovery rate is: ; in, Remaining oil saturation This represents the initial oil saturation.

[0034] S7. Performance Verification and Iteration: FocalLoss loss rate and accuracy are used as evaluation metrics. When the metrics are below the threshold, physical data augmentation based on capillary force-viscous force balance, LoRA fine-tuning, pseudo-label self-distillation and active learning closed-loop optimization are triggered in sequence.

[0035] If any key indicator falls below a preset threshold, an automated optimization process is triggered: Data augmentation based on petroleum physical properties and reservoir statistical laws is prioritized, such as simulating microfluidic image features of different lithologies, reproducing image features of different fluid distribution states in the reservoir, or simulating common interference factors in the well site imaging environment; subsequently, low-rank adaptation and lightweight fine-tuning, pseudo-label self-training, and optional adversarial domain adaptation are performed according to priority; if the target is still not met, an active learning phase is initiated, selecting high-entropy or low-confidence samples for priority labeling by petroleum engineers to enhance the model's generalization ability to specific EOR conditions. This closed-loop process ensures that the invention maintains stable practicality under different well locations and lithological conditions, from conventional sandstone reservoirs to unconventional tight reservoirs, and from shallow to deep well locations, providing reliable digital analysis results for reserve calculations and development scheme design in petroleum engineering.

[0036] like Figure 1 As shown, in this embodiment, a microfluidic chip simulating a sandstone reservoir was selected as the research object, with a pore throat width of 50-100 μm and a crude oil viscosity of 50 mPa·s. The displacement experiment employed a constant injection method at a rate of 0.5 μL / min, with a cumulative displacement factor of not less than 1000 PV. During the displacement process, the chip underwent multiple fluorescence microscopy imaging, with no fewer than six imaging sessions, to obtain image sequences under different saturation conditions.

[0037] First, a two-dimensional image sequence of the microfluidic chip was obtained through displacement experiments combined with high-resolution fluorescence microscopy. Before imaging, the chip underwent vacuum saturation and saturated water treatment, followed by injection of a simulated oil phase. A water-drive experiment was then conducted at a constant injection rate to capture the distribution characteristics of residual oil under different saturation conditions. After the experiment, the chip was placed in a micrometer-resolution microscope system for real-time imaging. The imaging interval was controlled at the micrometer scale to ensure that the pore geometry, residual oil distribution, and oil-water interface were clearly displayed. The resulting images are shown below. Figures 4-6 As shown. The obtained image data is then converted into a two-dimensional sequence through a filtering algorithm, and preprocessed with halo correction, fluorescence attenuation correction, and grayscale normalization to finally obtain a complete sequence containing various residual oil morphologies such as clusters, porous structures, droplets, columns, and films. Subsequently, sequence processing tools are used to decompose the image frame by frame into a two-dimensional sequence, such as... Figure 3 As shown, this provides standardized input data for subsequent recognition and feature extraction steps.

[0038] The acquired images were preprocessed and labeled. The acquired image sequences underwent preprocessing and manual labeling. First, a threshold segmentation method was used to initially distinguish between oil phases and porous regions. Then, an interactive segmentation tool was used for semi-automatic labeling, which was corrected by experts to ensure the accuracy and consistency of labeling various residual oil morphologies such as clusters, porous structures, droplets, columns, and films. Based on this, to address noise and grayscale differences in the images, a combination of two-dimensional median filtering and nonlocal mean algorithms was used to remove high-frequency noise. Simultaneously, histogram truncation and contrast stretching were used to adjust the overall grayscale distribution. Finally, image-level z-score normalization was used to standardize the imaging data from different batches, ensuring consistency in grayscale distribution and statistical characteristics when input into the deep neural network.

[0039] The volumetric z-score normalization expression is: ; In this embodiment, the original voxel grayscale value I =150, corresponding to the brightness at a certain location in the microfluidic image; μ =100、 σ=50 represents the mean and standard deviation of the image region, reflecting the overall grayscale distribution characteristics; ε is a constant, typically 1. e -6 Substituting into the expression, we get: ; In addition, the image sequences are resampled to maintain consistent spatial resolution, and the number of training samples is increased through data augmentation methods such as rotation, flipping, and noise simulation to reduce overfitting during model training.

[0040] The model operation process is as follows: Figure 2 As shown, the preprocessed and manually annotated two-dimensional image sequence is input into the YOLOv11-seg model constructed in this invention to achieve automatic identification of residual oil morphology. First, a C3k2 Backbone structure is used to divide the image into multi-scale feature maps and extract oil droplet edge features. This preserves boundary transition information during the encoding stage, thus avoiding the boundary discontinuity problem caused by simple downsampling. Subsequently, the C2PSA Neck is used to fuse these features layer by layer, achieving hierarchical feature extraction from pixel level to local oil droplet morphology and then to overall connectivity. This enables the network to not only identify clustered oil droplets, porous fragmented oil, and isolated droplet oil in two-dimensional images, but also to capture the connectivity and spatial distribution features of columnar oil columns and film-like attached oil.

[0041] During the encoding stage, a hierarchical extraction of features at different scales is achieved through a C3k2 structure: shallow features characterize the geometry and pore throat distribution of oil droplets, mid-layer features reflect oil connectivity and fluid flow, and high-layer features integrate the oil-water interface and the overall EOR pattern. This structure can effectively capture local details and global features in microfluidic images, providing robust feature representations for subsequent residual oil morphology identification.

[0042] In the training phase, a boundary constraint module is introduced to improve the geological plausibility of the recognition results. Specifically, the Graph Laplacian smoothing regularization term suppresses local abrupt changes in the predicted labels, which helps to keep the oil droplet boundaries continuous and close to the physical true boundaries, thereby effectively reducing the recognition spikes caused by fluorescence noise.

[0043] The expression for the Graph Laplace smoothing regularization term is: ; In this embodiment, , ; The weighted average of grayscale similarity and spatial proximity is expressed as follows: ; grayscale value =100, =110; Euclidean distance =1; =10, =5, weight The following can be obtained by calculation using the expression: = ; Substituting the expression for the graph Laplace smoothing regularization term, we get: ; Furthermore, to ensure the network's generalization performance even with a limited number of samples, a low-rank adaptation mechanism is introduced between the key layers of the Backbone and Neck. This method significantly reduces computational cost and storage burden during training by performing low-rank decomposition and efficient reconstruction on a portion of the weight matrix. It also allows for flexible adjustment of feature representations, enabling the model to better adapt to the differences in pore distribution across various microfluidic chips.

[0044] The expression for the LoRA low-rank adaptation increment is: ; in, For low-rank adaptation increments, A = B= In this embodiment, the weight obtained after substituting into the expression is: ; In the mask branch, a decoupled structure is used to refine the initially generated segmentation mask pixel by pixel. This mechanism, while ensuring the global structure remains unchanged, can eliminate artifacts and blurring in boundary regions, improving the precision of residual oil morphology segmentation. Furthermore, a boundary-weighted FocalLoss loss function is introduced. This method assigns higher loss weights to areas that are difficult to distinguish, such as the oil-water interface, allowing the model to focus on interfaces with subtle gray-level differences during training, thereby improving the ability to identify residual oil distribution at the capillary scale. Simultaneously, combined with a comprehensive boundary weight mechanism, different morphological interfaces are dynamically weighted, ensuring the accuracy of clustered oil droplets and porous fragmented oil, while also enhancing the feature extraction capabilities of droplet, columnar, and film-like residual oil.

[0045] The expression for weighted FocalLoss is: ; Combined with boundary weights: ; In this embodiment, the predicted probability =0.8, constant focusing factor =2, category weight =0.25, This is the boundary weight map. Substituting into the expression, we get: ; The final output is a high-resolution residual oil morphology identification result, which is compared with traditional threshold segmentation, such as... Figure 7 As shown, (a) is the result after traditional threshold segmentation, and (b) is the result after identification by the present invention.

[0046] Post-processing and EOR parameter calculation were performed on the two-dimensional image sequences obtained from the model recognition. First, isolated pixel removal, boundary smoothing, and morphological closing operations were performed at the image level to ensure the continuity and integrity of oil droplet boundaries. Then, the processed image results were reassembled into a dynamic displacement model to maintain the continuity and realism of the remaining oil morphology over time. Based on this, the area counting method was used to calculate the remaining oil saturation of the dynamic model, and the complete multiphase flow connected network structure was further extracted. Finally, the relative permeability parameter was obtained through numerical calculation.

[0047] The expression for calculating the remaining oil saturation using the area counting method is: ; In this embodiment, the oil phase area and =50000 pixels, total area of ​​aperture =250000 pixels, substituting into the expression... =0.2.

[0048] The formula for recovery rate is: ; In this embodiment, =0.2, =0.8, substituting into the formula, we get =0.75.

[0049] After conversion, the recovery rate was consistent with the experimental results, proving that the method can accurately characterize the displacement efficiency. This dynamic parameter extraction method based on two-dimensional image reconstruction maintains both the computational efficiency of the recognition process and the physical accuracy of the final EOR parameter calculation.

[0050] The recognition performance was evaluated and closed-loop optimization was carried out, such as... Figures 8-9As shown, model performance is judged based on the curve plotted using FocalLoss loss rate and accuracy metrics. When the evaluation metric at the 2D image level falls below a set threshold, a closed-loop optimization process is initiated. This includes data augmentation operations such as noise perturbation, elastic deformation, and saturation adjustment on the original image; transferring and fine-tuning the trained model to a new microfluidic dataset using transfer learning; and expanding the utilization of unlabeled images using a pseudo-label self-training strategy. In necessary cases, an active learning mechanism can be combined to prioritize expert labeling of images with low model confidence, thereby continuously improving the quality of training data and enhancing model robustness. Through this closed-loop iterative optimization process based on 2D images and dynamic reassembly, the network can maintain stable recognition performance under various microfluidic chip types and imaging conditions, ensuring the reliability of the recognition of various residual oil morphologies such as clusters, porous structures, droplets, columns, and films, as well as the extraction of EOR parameters. Compared to traditional thresholding methods, this invention offers higher real-time performance, smaller target detection accuracy, and EOR application value, effectively optimizing displacement schemes.

[0051] A device for identifying microscopic residual oil morphology based on YOLOv11-seg in microfluidics, comprising: Data acquisition module: Equipped with a high-resolution fluorescence microscopy imaging interface and an image sequence conversion unit, it is used to receive dynamic images of microfluidic chips in real time during water-driven, CO2-driven, or chemical-driven experiments. It generates a two-dimensional time-series image stream through a micron-level time step slicing algorithm, and records key EOR parameters such as injection fold, number of capillaries, and viscosity ratio to support subsequent mechanism analysis. The image preprocessing module integrates a multi-scale denoising unit, a wettability contrast enhancement unit, and a statistical normalization unit. The denoising unit performs median filtering and nonlocal mean algorithms in parallel to suppress fluorescence noise. The contrast enhancement unit highlights the oil-water interface tension gradient through histogram truncation and local contrast stretching. The normalization unit uses image-level z-score normalization to eliminate dye concentration drift and light source fluctuations. A semi-supervised annotation submodule is also included, providing a threshold initial segmentation and an interactive correction interface for petroleum engineers. It outputs a multi-morphological labeled dataset containing clustered trapped oil, porous adsorbed oil, droplet emulsified oil, columnar snap-off oil, and film-like wetted oil. The morphology recognition module has a built-in lightweight YOLOv11-seg inference engine, which includes a C3k2 multi-scale backbone network, a C2PSA position-sensitive attention fusion layer, a decoupled mask branch, a physical constraint submodule, and a LoRA low-rank adaptation submodule. It also runs a boundary-weighted segmentation loss calculation unit, which amplifies the loss contribution of the hole throat scuff area and the oil film stripping area through a dynamic edge weight map, thereby improving the recognition accuracy of the micro displacement front. Post-processing and seepage parameter inversion module: Equipped with isolated oil droplet removal unit, morphological closure operation optimization unit and time series reconstruction unit, the identification mask is reconstructed into a dynamic remaining oil distribution map; the parameter inversion unit accurately calculates the remaining oil saturation based on pixel area statistics method, derives the recovery rate by combining the initial oil saturation, and extracts the relative permeability curve through pore throat network topology, supporting the quantitative evaluation of displacement efficiency and oil sweeping mechanism; Closed-loop adaptive optimization module: integrates mIoU, S or Relative error, R f The system includes a multi-dimensional indicator monitor and strategy scheduler. When any indicator falls below the reservoir engineering threshold, it sequentially activates physical data augmentation based on capillary force-viscous force balance, efficient fine-tuning of LoRA parameters, and pseudo-label self-distillation training. If necessary, it triggers an active learning mechanism to prioritize pushing emulsified oil droplet images with high capillary counts or low confidence to expert annotation, ensuring that the model remains robust in the entire EOR scenario from conventional sandstone to unconventional tight reservoirs.

[0052] The preprocessing module suppresses fluorescence scattering noise through median filtering and nonlocal mean filtering, and highlights the oil-water interface tension gradient by using histogram truncation and contrast enhancement.

[0053] The C3k2 backbone network efficiently captures the edge and capillary trapping features of oil droplets at the pore throat scale; the C2PSA attention layer achieves cross-scale feature aggregation, accurately representing the evolution of viscous fingering and displacement fronts; the mask branch completes pixel-level morphological segmentation; the boundary constraint submodule introduces a graph Laplacian smoothing regularization term to suppress boundary spikes induced by fluorescence noise, ensuring oil-connectivity and physical authenticity; the LoRA low-rank adaptation submodule achieves rapid domain migration under small sample conditions, adapting to different wettability and displacement agent systems.

[0054] When the model experiences overfitting or generalization degradation, the performance optimization module comprehensively utilizes physical constraint data augmentation, transfer learning, pseudo-label iteration, and active learning strategies to significantly improve the model's stability under complex porous networks and multiphase flow conditions.

[0055] The post-processing and parameter inversion module uses the dynamically reconstructed residual oil distribution map and the area statistics method to accurately calculate Sor and Rf. It also supports relative permeability curve fitting, providing highly reliable digital basis for EOR scheme optimization and residual oil potential tapping.

[0056] The C3k2 backbone network preserves the transition information of the oil-water interface in multi-scale feature extraction; the C2PSA attention mechanism realizes the hierarchical representation of pore throat connectivity and fluid distribution; boundary constraints and LoRA adaptation work together to improve physical consistency and domain generalization ability; boundary-weighted segmentation loss focuses on training in difficult example regions, significantly improving the recognition accuracy of micron-sized droplet oil and film oil.

[0057] Therefore, this invention employs a microfluidic microscopic residual oil morphology identification device and method based on the YOLO model. By integrating the C3k2-C2PSA high-efficiency backbone, physical constraint mask branch, LoRA low-rank adaptation, and boundary weighted loss, it overcomes the bottlenecks of traditional image processing in real-time performance, small target missed detection, and generalization across displacement schemes. It provides a high-precision and robust digital analysis platform for residual oil morphology in microfluidic displacement experiments, helping to improve oil recovery and guide reservoir-scale EOR deployment.

[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A microfluidic residual oil morphology identification method based on the YOLO model, characterized in that, Includes the following steps: S1. Data Acquisition and Preprocessing: High-resolution fluorescence microscopic images were acquired in the microfluidic displacement experiment. The remaining oil morphology was labeled using a hybrid labeling strategy of threshold screening, interactive segmentation and petroleum engineer correction. The acquired high-resolution fluorescence microscopic images were then subjected to grayscale truncation and z-score normalization. S2. Feature Extraction and Encoding: The preprocessed image is input into the C3k2 multi-scale backbone network and combined with the C2PSA position-sensitive attention mechanism to achieve hierarchical feature extraction, including shallow pore throat edge capture, mid-layer oil connectivity characterization, and overall distribution of high-layer displacement front. S3. Boundary Constraints and Low-Rank Adaptation Fine-Tuning: A graph Laplacian smoothing regularization term is introduced to constrain the continuity of the oil-water interface. LoRA low-rank increments are injected into the C2PSA key layer to adapt to the microfluidic characteristics of different EOR schemes. S4. Decoding and segmentation loss optimization: The mask is refined pixel by pixel by decoupling the mask branch, and the loss contribution of the aperture throat card break area and oil film peeling area is magnified by boundary weighted FocalLoss. S5. Multi-scale feature fusion and mask refinement: Multi-scale features are fused based on PANet path aggregation and dynamic edge weight map to suppress boundary artifacts induced by fluorescence noise. S6. Morphological post-processing and EOR parameter extraction: Isolated oil droplet removal, morphological closing operation and temporal reconstruction are performed on the identification mask. The remaining oil saturation is calculated by pixel area statistics. The recovery rate is derived by combining the initial oil saturation. S7. Performance Verification and Iteration: FocalLoss loss rate and accuracy are used as evaluation metrics. When the metrics are below the threshold, physical data augmentation based on capillary force-viscous force balance, LoRA fine-tuning, pseudo-label self-distillation and active learning closed-loop optimization are triggered in sequence.

2. The microfluidic residual oil morphology identification method based on the YOLO model according to claim 1, characterized in that, The z-score normalization expression in S1 is: ; in, This represents the original pixel grayscale value, corresponding to the brightness of a certain location in the microfluidic image; The mean of the image region; The standard deviation of the image region; and Reflects the overall grayscale distribution characteristics of microfluidic images; It is a constant, generally .

3. The microfluidic residual oil morphology identification method based on the YOLO model according to claim 1, characterized in that, The expression for the Laplace smoothing regularization term in S3 is: ; in, For pixels Predicted probability vector; For pixels The predicted probability vector; The weights are determined by a combination of grayscale similarity and spatial proximity. ; in , These are the grayscale values ​​of pixels i and j, respectively; Let be the Euclidean distance between pixels i and j; , All are constant hyperparameters. Controlling the impact of grayscale differences on weights, Control the weight decay rate of spatial distance; The expression for the low-rank increment of LoRA is: ; in, This is the original weight matrix; A and B are both low-rank matrices.

4. The microfluidic residual oil morphology identification method based on the YOLO model according to claim 1, characterized in that, The weighted FocalLoss expression in S4 is: ; The combined boundary weight expression is: ; in, To predict probabilities; This is a constant focusing factor that controls the degree of focusing on difficult-to-separate samples; For category weights, This is a boundary weight graph.

5. The microfluidic residual oil morphology identification method based on the YOLO model according to claim 1, characterized in that, The expression for calculating residual oil saturation using pixel area statistics in S6: ; in, For the first The area of ​​the oil phase being tested; The total pore area; The total number of oil phases detected; The expression for recovery rate is: ; in, Remaining oil saturation This represents the initial oil saturation.

6. A microfluidic residual oil morphology identification device based on the YOLO model, applied to the microfluidic residual oil morphology identification method based on the YOLO model as described in claims 1-5, characterized in that, include: Data acquisition module: configured with fluorescence microscopy imaging interface and time-series slicing unit to record EOR parameters in real time; Image preprocessing module: integrates noise reduction, contrast enhancement and z-score normalization units, including a semi-supervised annotation submodule; noise reduction adopts a median filtering and nonlocal mean collaborative algorithm, and contrast enhancement enhances the oil-water interface through histogram truncation and local contrast stretching; Morphology recognition module: Built-in YOLOv11-seg engine, including C3k2 backbone, C2PSA attention, mask branch, boundary constraint and LoRA sub-module, running boundary weighted segmentation loss; Post-processing and parameter inversion module: equipped with isolation removal, morphological optimization, temporal reconstruction and Sor / Rf calculation units; Closed-loop optimization module: Monitors FocalLoss loss rate and accuracy metrics, and schedules physical augmentation, LoRA fine-tuning, pseudo-labeling, and active learning strategies.

7. A microfluidic microscopic residual oil morphology identification device based on the YOLO model according to claim 6, characterized in that, C3k2 skeleton captures throat edge features; The C2PSA layer aggregates cross-scale connectivity; the mask branch achieves pixel-level morphological segmentation; the boundary constraint submodule introduces graph Laplacian smoothing; and the LoRA submodule supports small sample domain adaptation.

8. A microfluidic microscopic residual oil morphology identification device based on the YOLO model according to claim 6, characterized in that, When the loss rate increases or the accuracy decreases, the closed-loop optimization module sequentially performs physical constraint enhancement, LoRA fine-tuning, pseudo-label training, and active learning.

9. A microfluidic microscopic residual oil morphology identification device based on the YOLO model according to claim 6, characterized in that, The post-processing and parameter inversion module calculates Sor and Rf using the area statistics method based on the time-series reconstruction diagram and fits the relative permeability curve.

10. A microfluidic microscopic residual oil morphology identification device based on the YOLO model according to claim 6, characterized in that, The morphology recognition module achieves high-precision recognition of micron-level droplet oil and film oil through efficient fusion of C3k2-C2PSA, boundary constraints and LoRA adaptation, which helps to optimize EOR solutions.