Next Article in Journal
Binary Sand Cat Swarm Optimization Algorithm for Wrapper Feature Selection on Biological Data
Next Article in Special Issue
Polysilicon-Channel Synaptic Transistors for Implementation of Short- and Long-Term Memory Characteristics
Previous Article in Journal
Biomimetics Design of Tooth Root Zone at Cylindrical Gears Profile
Previous Article in Special Issue
Model of Neuromorphic Odorant-Recognition Network
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection and Dispersion Analysis of Water Globules in Oil Samples Using Artificial Intelligence Algorithms

by
Alexey N. Beskopylny
1,*,
Anton Chepurnenko
2,*,
Besarion Meskhi
3,
Sergey A. Stel’makh
4,
Evgenii M. Shcherban’
5,
Irina Razveeva
4,
Alexey Kozhakin
4,6,
Kirill Zavolokin
6 and
Andrei A. Krasnov
6
1
Department of Transport Systems, Faculty of Roads and Transport Systems, Don State Technical University, 344003 Rostov-on-Don, Russia
2
Strength of Materials Department, Faculty of Civil and Industrial Engineering, Don State Technical University, 344003 Rostov-on-Don, Russia
3
Department of Life Safety and Environmental Protection, Faculty of Life Safety and Environmental Engineering, Don State Technical University, 344003 Rostov-on-Don, Russia
4
Department of Unique Buildings and Constructions Engineering, Don State Technical University, 344003 Rostov-on-Don, Russia
5
Department of Engineering Geology, Bases, and Foundations, Don State Technical University, 344003 Rostov-on-Don, Russia
6
OOO VDK, SKOLKOVO, Bolshoi Boulevard, 42, 121205 Moscow, Russia
*
Authors to whom correspondence should be addressed.
Biomimetics 2023, 8(3), 309; https://doi.org/10.3390/biomimetics8030309
Submission received: 22 May 2023 / Revised: 1 July 2023 / Accepted: 12 July 2023 / Published: 13 July 2023
(This article belongs to the Special Issue Neuromorphic Engineering: Biomimicry from the Brain)

Abstract

:
Fluid particle detection technology is of great importance in the oil and gas industry for improving oil-refining techniques and in evaluating the quality of refining equipment. The article discusses the process of creating a computer vision algorithm that allows the user to detect water globules in oil samples and analyze their sizes. The process of developing an algorithm based on the convolutional neural network (CNN) YOLOv4 is presented. For this study, our own empirical base was proposed, which comprised microphotographs of samples of raw materials and water–oil emulsions taken at various points and in different operating modes of an oil refinery. The number of images for training the neural network algorithm was increased by applying the authors’ augmentation algorithm. The developed program makes it possible to detect particles in a fluid medium with the level of accuracy required by a researcher, which can be controlled at the stage of training the CNN. Based on the results of processing the output data from the algorithm, a dispersion analysis of localized water globules was carried out, supplemented with a frequency diagram describing the ratio of the size and number of particles found. The evaluation of the quality of the results of the work of the intelligent algorithm in comparison with the manual method on the verification microphotographs and the comparison of two empirical distributions allow us to conclude that the model based on the CNN can be verified and accepted for use in the search for particles in a fluid medium. The accuracy of the model was AP@50 = 89% and AP@75 = 78%.

1. Introduction

Global and Russian experiences with oil refineries show that one of the most significant and complex technological processes in the processing of an oil emulsion is the separation of the ballast (water and substances dissolved in it) from the oil. Insufficient efficiency in the process of dehydrating oil supplied for transportation and processing can lead to the corrosion of equipment and reductions in the service lives of process units and, as a result, worsens the quality-determining characteristics of the resulting oil products [1]. In this regard, the development of methods and tools for automating and digitalizing the oil dehydration process is an urgent task for the entire oil industry. The works [2,3,4] consider the microwave method, and in [5], the ultrashort wave method, which allows for the measurement of both high and low water contents in crude oil in an oil pipeline, is considered. The use of spectroscopic detection technology to measure the water content in crude oil was shown by researchers from China [6,7]. With the help of POF sensors, the water content in a water–oil emulsion (WOE) is considered in [8]. In addition, the water content of crude oil can be measured using a cavity resonator [9].
The near-infrared range, along with the partial least squares method, has been used to estimate the size distribution of water droplets in crude oil emulsions in a pressurized pipeline. The authors noted its high performance in that the models achieved for the pressurized system presented good predictions of the properties of the emulsion and its water content. The provided instrument for the online detection of water droplets via size and water content in crude oil emulsions in a pressurized pipeline has shown potential for real-world applications [10]. In addition, many studies have considered the detection of water droplets in solutions [11] and the separation of oil and water [12] using the electrochemical method [11], 2D materials [13], and electrospinning membranes [14]. The sizes and shapes of the particles affect the quality of the product. Real-time control of such characteristics in a multiphase system is difficult due to the low measurement accuracy of the existing instruments. However, the development of photo-optical methods now allows for accurate real-time measurements of the size, shape, and concentration of particles separated from each other in three-phase systems [15].
Recently, the concept of a “smart field” has been actively spreading, within the framework of which innovative technologies of intellectualization in the area of oil and gas production are being developed. An increasing number of “smart” algorithms based on computer vision are being introduced as systems for obtaining, processing, and monitoring data at all stages of the oil refining complex, including the dehydration of an oil emulsion [16,17]. The integration of methods and tools of artificial intelligence makes it possible to automate routine, labor-intensive, or computationally complex processes, as well as to increase their accuracy and reduce their speed of execution and the influence of the human factor [18]. Artificial intelligence methods are already being applied to predict the molecular weight of heavy oil. It is noted that an artificial neural network can predict oil characteristics with greater accuracy than regression models [19]. The gamma attenuation method, wavelet characteristics, and neural networks make it possible to determine and predict the types and different volume percentages of oil products inside a scaled pipe of different thicknesses. This will optimize the system and increase the productivity of the oil industry [20,21,22]. The issues of detecting oil on the surface of water [23] and underwater [24], the autonomous monitoring of oil slicks [25,26], and the separation of oil from water with the removal of heavy metals [27] have also received a significant amount of attention in modern research. In addition, there are studies on the possibility of predicting the distribution of water saturation in reservoirs [28], as well as predicting and monitoring various properties of oil products using artificial intelligence [29,30,31]. In [32], an algorithm for automatic counting and the measurement of particles in multiphase systems was implemented in MATLAB version 7.9 (R2009b). The program achieved a 95% match rate, with an error rate of less than 1% and a detection rate of 250 particles per minute depending on the system. In [33], the process of quantitatively analyzing polymer particles suspended in aqueous media was considered. The calculation was carried out using a special computer program developed in the language Visual Basic (VB) which calculates the area of the particles from the total area.
This review analysis presents the increasing relevance and popularity of the introduction of intelligent technologies which have already proven themselves in various industries [34,35,36,37] into the oil industry; for example, the use of e-management tools for the intellectualization of the production [38], analysis, and prediction of crude oil prices based on machine learning methods [39,40,41] and the use of intelligent algorithms to evaluate the efficiency of equipment and processes in production [42,43,44] and in the assessment of various characteristics of oil products [45,46]. There are also studies describing the process of water segmentation in images using a convolutional neural network (CNN) [47]. A convolutional neural network is effectively trained to detect particles, providing high-quality particle recognition for subsequent size and shape analyses under various experimental conditions [48]. However, as a result of an analysis of the literature, a shortage of works on the combined use of microscopy and machine learning methods to detect water droplets and their sizes in crude oil was revealed. The scientific novelty of this research lies in the following:
The application of an integrated method for detecting water globules in crude oil based on a microscopic method and computer vision, which allows for the effective automation and digitalization of the process of oil dehydration;
The creation of an empirical base of WOE microphotographs at characteristic points of the technological scheme, including the use of in situ microscopy technologies;
The expansion of the training sample using the authors’ augmentation algorithm;
The development of a computer vision algorithm to detect water globules in crude oil;
The optimization of the characteristics of the intellectual model based on the CNN YOLOv4;
An analysis of variance with respect to the size of detected particles;
A comparison of two empirical distributions obtained via manual detection method and the neural network method by calculating the Kolmogorov–Smirnov criterion.
In the present work, with the use of elements of computer vision, the detection of water globules is implemented, and a dispersion analysis of their sizes is also carried out. The main goal was to implement, debug, optimize, and test a detector based on the YOLOv4 convolutional neural network. The study completed the following tasks:
Collecting an empirical base of WOE microphotographs;
Substantiating and describing the chosen convolutional neural network, YOLOv4;
Expanding of the data set using the augmentation algorithm;
Implementing, debugging, and optimizing the developed detector;
Testing the detector and determining quality metrics for the detection of water globules in the WOE;
Identifying the nature of the WOE at key points of the technological scheme of the electric desalination plant (ELDP) by conducting a dispersion analysis of the size of the detected particles;
Comparing two empirical distributions using the Kolmogorov–Smirnov criterion.
The theoretical significance of the study lies in the expansion of ideas about the possibilities of using computer vision algorithms in the intellectualization of the oil industry. The practical significance of the work lies in the development of an applied and scalable algorithm within the concept of a “smart field”.

2. Materials and Methods

2.1. Materials and Stages of the Study

Crude oil is a stable inverted polydisperse emulsion in which formation water is distributed in the form of globules. The volume concentration of water in oil is 0.1–2%. The stability of emulsions, in addition to the physical and chemical properties of raw materials, is also determined by the size of the water globules and the lifetime of the emulsion.
The deep dehydration of oil reduces transportation costs and the amount of wastewater discharged by oil refineries. Therefore, the control of the dispersion band and the determination of the average size of the globules is the most important step in achieving petroleum products of the desired quality.
The preparation of an optimal WOE becomes critical to guaranteeing the protection of equipment from corrosion and ensuring the stability of the main technology since a forced increase in the consumption of alkali to neutralize corrosive agents will inevitably lead to an increase in the sodium content in the feedstock after ELDP.
This study proposes a solution for the detection of water globules in an oil emulsion and an analysis of their variance using an artificial intelligence method, specifically, a computer vision method based on the CNN YOLOv4. The sequence of the research stages is shown in Figure 1.

2.2. Preparing Data for an Intelligent Algorithm

The data source for this study comprises the results of a study by specialists from the research and production company OOO VDK (a resident of the Skolkovo Innovation Center), which were obtained during work on the WOE static mixer S-Mix-DS preparation complex [49,50], as well as during laboratory tests reproducing real operating conditions for elements of the mixer (Figure 2). Previously, OOO VDK used a manual method for the analysis of water–oil emulsions.
As an empirical base, 20 microphotographs of a WOE at characteristic points of the technological scheme, including those using in situ microscopy technologies, were used. The sampling was carried out using a hardware–software complex, including a Levenhuk D320L PLUS microscope (Levenhuk, St. Petersburg, Russia) with a resolution of 2048 × 1536 and a computer. When photographing, the presence of a significant light gradient should be avoided, since the latter significantly complicates further computer processing of the image and interpretation of the results.
Crude oil contains formation water in the form of a finely dispersed emulsion with an average microdroplet size of 7–8 µm. At the same time, a high content of globules 2–4 µm in size is observed (Figure 3).

2.3. Augmentation and Labeling of Crude Oil Micrographs

To represent the images as input data for the input of the neural network algorithm, it is necessary to markup water globules using bounding boxes. The markup was completed using the application Image Labeler, which provides a way to interactively create different shapes to label areas of interest.
Deep learning requires a large training set to obtain good model generalization results and reduce the effect of overfitting. If it is difficult to increase the volume of real data, researchers apply various methods of data inflation based on the available data [51]. In this study, the increase in the size of the original set was artificially carried out using the authors’ augmentation algorithm in which for each image, the coordinates of the bounding box are automatically recalculated [52].
The number of annotated images in the training sample was increased from 20 to 500. The possible modifications that carried out on the images before training the model are as follows.
  • Operations with color: changing the contrast, brightness, and saturation (Figure 4).
  • Geometric operations: image rotation/reflection, random image shifts along the Ox and Oy axes, and image rotation by 90°, 180°, and 270° [53,54].
Training on augmented data, which is a more complete set of possible variants of input images, will make it possible to achieve model stability against sudden noises in case they appear during photo capture.

2.4. The Implementation of an Intelligent Algorithm

In this study, a detector from the YOLO family, which belongs to the family of so-called state-of-the-art (SotA) advanced technologies, was used to detect water globules in oil. The single-stage YOLOv4 detector was chosen due to the fact that the architectural implementation of the algorithm implies the efficient use of computing resources, while the quality of the recognition of small objects in the object image is improved (Figure 5) [55].
The parameters that were changed during the study included the size of the training, validation, and test sets and the batch size, which were selected based on the limitations of the computing resources in terms of memory; the number of epochs, determined upon reaching the required accuracy and the time of access to computing resources; and the learning rate and optimizer at which the model showed the best quality.
The YOLOv4 architecture uses CSPDarknet53 as its backbone. In the neck block, feature aggregation occurs: “SPP (Spatial al pyramid pooling) is a method of acquiring both fine and coarse information by simultaneously pooling on multiple kernel sizes (1, 5, 9, 13)”. The main role of PANet is to improve the instance segmentation process by storing spatial information, which in turn aids with correct pixel localization for mask prediction. “The head processes the aggregated features and predicts the bounding boxes, objectness scores, and classification scores. The YOLO v4 network uses one-stage object detectors, such as YOLOv3, as detection heads” [56].
An important step in training the YOLOv4 CNN is the selection of its parameters (Table 1).
The data set was divided into training, validation, and test sets at the ratio 70/15/15. The “Batch Size” parameter determines the number of examples used in one epoch to train the neural network. The learning rate is one of the most important hyperparameters and allows the user to control the amount of weight correction at each iteration. The stochastic gradient descent (SGD) was used as an optimizer.
The intellectual model was trained on a high-performance OOO VDK cluster based on a two-processor server with an installed Intel (Santa Clara, CA, USA) Xeon E5-2683 v3 processor. The training time was 52 min. The model training graph is shown in Figure 6, in which the y-axis shows the error values between the predicted and actual bounding box, and the abscissa shows the epochs.
From the graph of the value of the error function during the training of the CNN, it follows that up to about 250 epochs, the error steadily decreases, but then it changes slightly, which indicates sufficient training.

3. Results and Discussion

The developed intellectual algorithm based on the CNN YOLOv4 makes it possible to detect particles in a fluid medium at the level of accuracy required by the researcher, which can be controlled at the stage of training the CNN. Figure 7 shows the result of the work of the intelligent algorithm, which is an image with localized globules in the bounding boxes.
When training a CNN to identify objects of a certain class, it is necessary that the intelligent model finds these objects regardless of their location and size in the image. Figure 7 shows that the model finds globules over the entire area of the image, both in places with a large accumulation of particles of different sizes and when they are located far from each other.
To evaluate the detection quality, the following metrics are usually used: precision (P), recall (R), and average precision (AP).
Precision and recall can be calculated using the formulas:
Precision ( P ) = T P T P + F P
Recall ( R ) = T P T P + F N
where “true positive (TP) is the correct detection made by the model; false positive (FP) is incorrect detection made by the detector; false negative (FN) is a true result missed (not detected) by the detector” [53,54].
AP@α is the area under the precision–recall curve (AUC–PR) estimated at the threshold α IoU. The intersection over union (IoU) is used to evaluate the object detection performance by comparing the ground truth bounding box to the predicted bounding box. IoU values range from 0 to 1, where 0 indicates no overlap and 1 indicates perfect overlap. The IoU threshold decides whether the prediction is a true positive (TP), false positive (FP), or false negative (FN). The formula for the calculation is as follows:
A P @ α = 0 1 P R d r
AP@50 and AP@75 values were calculated showing AP values calculated at IoU = 0.50 and IoU = 0.75 respectively” [53,54]; in this study, AP@50 = 89% and AP@75 = 78%. If the level of accuracy obtained using the indicated metrics is lower than the level of accuracy declared by the researcher (in practice, from 85%), then it is necessary to increase the number of images in the training set and/or add additional effects to the augmentation process and retrain the CNN.
Precision, recall, and average precision (AP) are key indicators for evaluating the effectiveness of algorithms for object detection. With a clear understanding of these metrics, one can evaluate how well the trained model solves the detection problem (Table 2).
Figure 8 shows a histogram comparing detection between the use of the manual detection method by a technologist and the intelligent detection method.
The number of globules detected via the manual method was 1192, and when using the neural network detection, it was 1088. The sizes of the globules are indicated along the Ox axis in pixels. When switching to standard diameter units, the following formula is used:
D = p × 0.629
where D is the globule diameter in µm, and p is the diameter of the globule in pixels (px).
According to Figure 8, in the presented WOE sample, the highest concentration of globules with diameters ranging from 2 to 5 μm is observed, both via the manual detection method and the neural network, which corresponds to the actual consistency of crude oil. As the sizes of the globules increase, their number decreases with the use of both methods of detection.
To compare two empirical distributions obtained via the manual method of detecting water globules in oil and the developed neural network algorithm, the Kolmogorov–Smirnov criterion was applied. This criterion allows for the identification of the point at which the sum of the accumulated discrepancies between the two distributions is the largest and for an assessment of the reliability of this discrepancy.
A comparison of two empirical probability distribution functions, the manual method of processing results and processing with the help of a CNN, is shown in Figure 9.
We put forward the following hypotheses:
Hypothesis 0 (H0).
Empirical distributions for the manual detection method and for the neural network method do not differ, that is, the differences between the two distributions are not significant.
Hypothesis 1 (H1).
The empirical distributions for the manual detection method and for the neural network method are different, that is, the differences between the two distributions are significant.
The algorithm for working with the criterion:
  • Calculate the accumulated empirical relative frequencies N1emp for the first distribution.
  • Calculate the accumulated empirical relative frequencies N2emp for the second distribution.
  • Calculate the empirical value of the criterion (5):
    λ e m p = max N 1 e m p N 2 e m p × n 1 × n 2 n 1 + n 2
    where n1 and n2 are sample sizes.
  • Define the critical points:
    λ c r = 1.36 ,   a t   γ = 0.95 1.63 ,   a t   γ = 0.99
    where γ is the confidence level.
  • The conclusion is that λ e m p 1.36 ; the differences between the distributions are significant.
The maximum discrepancy between the accumulated observed and theoretical frequencies is determined as follows:
λ e m p = 0.055 × 1092 × 1088 1092 + 1088 = 1.32
The level of statistical significance of the obtained value is p = 0.06.
For clarity, an axis of significance was built (Figure 10).
The axis shows critical values corresponding to the accepted levels of significance: λ c r 0.05 = 1.36 and λ c r 0.01 = 1.63 . To the right of the critical value λ c r 0.01 , the “significance zone” extends. It includes empirical values exceeding λ c r 0.01 , which are therefore unconditionally significant. To the left of the critical value λ c r 0.05 , the “zone of insignificance” extends. It includes empirical values that are below λ c r 0.05 , and are therefore certainly insignificant. Thus, λ e m p falls into the area of acceptance of the hypothesis H0, which means that the differences between the two distributions are not significant. Therefore, the empirical distributions for the manual detection method and for the neural network method do not differ.
An evaluation of the quality of the results of the work of the intelligent algorithm in comparison with the manual method allows us to conclude that the model based on a CNN can be verified and accepted for use in the search for particles in a fluid medium. The developed model is suitable for various types of water–oil emulsions if the liquid has similar features at the visual structure level. If there are significant differences, then the result is not known in advance and requires additional research.
Other methodologies that can achieve the goal of the current work include the manual method, semi-automatic methods that require human participation, classical computer vision methods, and laboratory sedimentation analyses.
Comparing the developed algorithm for detecting water globules in a WOE with methods based on the use of optical micro-resonator, fiber optic, microwave, and ultrasonic sensors, it can be noted that the equipment is sensitive to the physico-chemical properties of the sample (for example, to temperature) and also requires effort when used in the field, while the proposed intelligent model depends only on the quality of the micrographs proposed for analysis. The software proposed in [32,33] is ensured to be very reliable and able to compete with the human eye in complex images. At the same time, the computational speed is quite low. Thus, in [32], the time is almost proportional to the number of processed pixels and depends on the initial characteristics of the image, while the method proposed in this study provides a result in 3–5 min. It should also be noted that in [33], there is a complexity of software scaling due to its implementation in the VB language, while the implemented intelligent model was developed in the modern, high-level language Python. The use of a CNN in computer vision problems is the most popular choice of researchers, and the YOLOv4 architecture is optimal for use in terms of its AP (accuracy)/FPS (speed) at the time of the start of this study, which has been confirmed by other authors [48].

4. Conclusions

The article describes the process of creating a computer vision algorithm that allows a user to detect water globules in oil samples and analyze their sizes. The algorithm was developed on the basis of the YOLOv4 convolutional neural network. For this study, the use of the authors’ own empirical base was proposed, which comprised microphotographs of samples of raw materials and water–oil emulsions taken at various points and in different operating modes of an oil refinery. The increase in the number of images (data) by creating (generating) new images for training by applying transformations to the original set of images from the training set was carried out using the authors’ algorithm. To expand the adaptive properties of the algorithm and its stable operation under various laboratory and field conditions, the authors’ algorithm was applied, thanks to which the training set was supplemented with images containing visual effects, noise, and distortion.
The following conclusions can be made on the basis of the results obtained.
(1)
The developed intellectual algorithm based on the CNN YOLOv4 makes it possible to detect particles in a fluid medium with the level of accuracy required by the researcher, which can be controlled at the stage of training the convolutional neural network.
The required level of accuracy in these tasks was set to 85% by VDK technologists.
(2)
An evaluation of the quality of the results of the work of the intelligent algorithm in comparison with the manual method on the verification microphotographs and comparison of two empirical distributions allows us to conclude that the model based on the SNA can be verified and accepted for use in the search for particles in a fluid medium since the empirical distributions for the manual detection method and for the neural network method do not differ.
(3)
The manual marking of one microphoto by a technologist o can take up to 8 h, while the computer vision algorithm developed in this study allows for the localization of water globules in oil with an accuracy of AP@50 = 89% and AP@75 = 78% in 3–5 min.
A comparison with the manual method favors the developed intellectual model. In studies of this kind, comparison with the manual method of particle detection is the most characteristic (classical and correct). Comparisons with other modern methods are not possible as they are often commercial and require a specialist, as well as additional research.
(4)
The YOLOv4 architecture allows for the problem of object detection using low-performance devices to be solved while processing incoming data in real time at high speed. Thus, the developed intelligent model can be used to solve computer vision problems directly on a smartphone or when using an autonomous robot. In addition, the developed model is suitable for various types of water–oil liquids if the liquid has similar features at the visual structure level. If there are significant differences, then the result is not known in advance and requires additional research.
The prospects of research development are to increase the training data set under laboratory and field conditions, apply additional visual effects when expanding the training dataset, and test the algorithm online using in-situ microscopy technologies.

5. Patents

Beskopylny, A.N.; Mailyan, L.R.; Stel’makh, S.A.; Shcherban’, E.M.; Razveeva, I.F.; Beskopylny, N.A.; Dotsenko, N.A.; El’shaeva, D.M. The program for determining the me-chanical properties of highly functional lightweight fiber-reinforced concrete based on ar-tificial intelligence methods. Russian Federation Computer program 2022668999, 14 October 2022. Available online: https://www.fips.ru/registers-doc-view/fips_servlet?DB=EVM&DocNumber=2022668999&TypeFile=html (accessed on 11 May 2023)
Beskopylny, A.N.; Stel’makh, S.A.; Shcherban’, E.M.; Razveeva, I.F.; Kozhakin, A.N.; Beskopylny, N.A.; Onore, G.S. Image Augmentation Program. Russian Federation Com-puter program 2022685192, 21 December 2022. Available online: https://www.fips.ru/registers-doc-view/fips_servlet?DB=EVM&DocNumber=2022685192&TypeFile=html (accessed on 11 May 2023)

Author Contributions

Conceptualization, S.A.S., E.M.S., A.N.B., A.K., A.A.K., K.Z. and I.R.; methodology, A.K. and I.R.; software, A.C., I.R. and A.K.; validation, I.R., A.K., A.A.K., K.Z., S.A.S., E.M.S. and A.N.B.; formal analysis, A.C. and I.R.; investigation, A.C., S.A.S., E.M.S., A.N.B., A.K., A.K. and I.R.; resources, A.A.K., K.Z. and B.M.; data curation, S.A.S., E.M.S., A.K., A.A.K., K.Z. and I.R.; writing—original draft preparation, I.R., S.A.S., E.M.S. and A.N.B.; writing—review and editing, I.R., S.A.S., E.M.S. and A.N.B.; visualization, I.R., S.A.S., E.M.S. and A.N.B.; supervision, B.M.; project administration, B.M.; funding acquisition, A.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The study did not report any data.

Acknowledgments

The authors would like to acknowledge the administration of Don State Technical University for their resources and financial support.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Margolis, S.A.; Hagwood, C. The determination of water in crude oil and transformer oil reference materials. Anal. Bioanal. Chem. 2003, 376, 260–269. [Google Scholar] [CrossRef]
  2. Makeyev, Y.V.; Lifanov, A.P.; Sovloukov, A.S. On-line microwave measurement of crude oil water content. In Proceedings of the 2009 19th International Crimean Conference Microwave & Telecommunication Technology, Sevastopol, Ukraine, 14–18 September 2009; IEEE: New York, NY, USA, 2009. [Google Scholar]
  3. Makeev, Y.V.; Lifanov, A.P.; Sovlukov, A.S. Microwave measurement of water content in flowing crude oil. Autom. Remote Control 2013, 74, 157–169. [Google Scholar] [CrossRef]
  4. Sharma, P.; Lao, L.; Falcone, G. A microwave cavity resonator sensor for water-in-oil measurements. Sens. Actuators B Chem. 2018, 262, 200–210. [Google Scholar] [CrossRef] [Green Version]
  5. Chang, L.; Xiu, G.Y. Research on ultra short wave method to measure water content of crude oil. In Proceedings of the 2008 9th International Conference on Signal Processing, Beijing, China, 26–29 October 2008; IEEE: New York, NY, USA, 2008. [Google Scholar]
  6. Liu, K.; Gao, G.; Wang, F.; Wu, D.; Wu, Z.; Gong, Y. Research on oil-water two-phase water content detection model based on near-infrared spectroscopy, In Proceedings of the Third International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022), Xi’an, China, 16–18 September 2022; SPIE: Bellingham, WA, USA, 2023; Volume 12462.
  7. Qing, M.; Liang, H.; Zhang, J.; Zhan, H. The mechanism of detecting water content in oil-water emulsions using impedance spectroscopy. J. Pet. Sci. Eng. 2020, 188, 106863. [Google Scholar] [CrossRef]
  8. Leal-Junior, A.; Lopes, G.; Avellar, L.; Frizera, A.; Marques, C. Temperature-insensitive water content estimation in oil-water emulsion using POF sensors. Opt. Fiber Technol. 2023, 76, 103240. [Google Scholar] [CrossRef]
  9. Zhu, J.; Wang, G. Measurement of water content in heavy oil with cavity resonator. Results Phys. 2020, 18, 103192. [Google Scholar] [CrossRef]
  10. Borges, G.R.; Farias, G.B.; Braz, T.M.; Santos, L.M.; Amaral, M.J.; Fortuny, M.; Franceschi, E.; Dariva, C.; Santos, A.F. Use of near infrared for evaluation of droplet size distribution and water content in water-in-crude oil emulsions in pressurized pipeline. Fuel 2015, 147, 43–52. [Google Scholar] [CrossRef]
  11. Kim, P.; Moon, H.; Park, J.H. Electrochemical Detection of Surfactant-Encapsulated Aqueous Nanodroplets in Organic Solution. Chemosensors 2023, 11, 112. [Google Scholar] [CrossRef]
  12. Mir, S.; Naderifar, A.; Rahidi, A.; Alaei, M. Recent advances in oil/water separation using nanomaterial-based filtration methods for crude oil processing-a review. J. Pet. Sci. Eng. 2022, 215, 110617. [Google Scholar] [CrossRef]
  13. Li, J.; Li, Y.; Lu, Y.; Wang, Y.; Guo, Y.; Shi, W. Preparation of 2D Materials and Their Application in Oil–Water Separation. Biomimetics 2023, 8, 35. [Google Scholar] [CrossRef]
  14. Li, J.; Li, Y.; Lu, Y.; Shi, W.; Tian, H. PDMS/PVDF Electrospinning Membranes for Water-in-Oil Emulsion Separation and UV Protection. Biomimetics 2022, 7, 217. [Google Scholar] [CrossRef] [PubMed]
  15. Emmerich, J.; Tang, Q.; Wang, Y.; Neubauer, P.; Junne, S.; Maaß, S. Optical inline analysis and monitoring of particle size and shape distributions for multiple applications: Scientific and industrial relevance. Chin. J. Chem. Eng. 2019, 27, 257–277. [Google Scholar] [CrossRef]
  16. Liu, Q.; Chu, B.; Peng, J.; Tang, S. A Visual Measurement of Water Content of Crude Oil Based on Image Grayscale Accumulated Value Difference. Sensors 2019, 19, 2963. [Google Scholar] [CrossRef] [Green Version]
  17. Zhang, Y.; Niu, B.; Zhuang, X.; Liao, H. Water content ratio measurement with neural network based on simulated annealing. In Proceedings of the 2011 Seventh International Conference on Natural Computation, Shanghai, China, 26–28 July 2011; IEEE: New York, NY, USA, 2011. [Google Scholar]
  18. Sircar, A.; Yadav, K.; Rayavarapu, K.; Bist, N.; Oza, H. Application of machine learning and artificial intelligence in oil and gas industry. Pet. Res. 2021, 6, 379–391. [Google Scholar] [CrossRef]
  19. Stratiev, D.; Sotirov, S.; Sotirova, E.; Nenov, S.; Dinkov, R.; Shishkova, I.; Kolev, I.V.; Yordanov, D.; Vasilev, S.; Atanassov, K.; et al. Prediction of Molecular Weight of Petroleum Fluids by Empirical Correlations and Artificial Neuron Networks. Processes 2023, 11, 426. [Google Scholar] [CrossRef]
  20. Mayet, A.M.; Chen, T.-C.; Alizadeh, S.M.; Al-Qahtani, A.A.; Qaisi, R.M.A.; Alhashim, H.H.; Eftekhari-Zadeh, E. Application of Artificial Intelligence for Determining the Volume Percentages of a Stratified Regime’s Three-Phase Flow, Independent of the Oil Pipeline’s Scale Thickness. Processes 2022, 10, 1996. [Google Scholar] [CrossRef]
  21. Mayet, A.M.; Alizadeh, S.M.; Hamakarim, K.M.; Al-Qahtani, A.A.; Alanazi, A.K.; Grimaldo Guerrero, J.W.; Alhashim, H.H.; Eftekhari-Zadeh, E. Application of Wavelet Characteristics and GMDH Neural Networks for Precise Estimation of Oil Product Types and Volume Fractions. Symmetry 2022, 14, 1797. [Google Scholar] [CrossRef]
  22. Mayet, A.M.; Nurgalieva, K.S.; Al-Qahtani, A.A.; Narozhnyy, I.M.; Alhashim, H.H.; Nazemi, E.; Indrupskiy, I.M. Proposing a High-Precision Petroleum Pipeline Monitoring System for Identifying the Type and Amount of Oil Products Using Extraction of Frequency Characteristics and a MLP Neural Network. Mathematics 2022, 10, 2916. [Google Scholar] [CrossRef]
  23. Liu, J.; Lin, H.; Liu, Y.; Xiong, L.; Li, C.; Zhou, T.; Ma, M. Global Relation-Aware-Based Oil Detection Method for Water Surface of Catchment Wells in Hydropower Stations. Sustainability 2023, 15, 6966. [Google Scholar] [CrossRef]
  24. Otremba, Z.; Piskozub, J. Modelling the Spectral Index to Detect a Baltic-Type Crude Oil Emulsion Dispersed in the Southern Baltic Sea. Remote Sens. 2021, 13, 3927. [Google Scholar] [CrossRef]
  25. Dong, J.; Sitler, K.; Scalia, J.; Ge, Y.; Bireta, P.; Sihota, N.; Hoelen, T.P.; Lowry, G.V. Application of Transfer Learning and Convolutional Neural Networks for Autonomous Oil Sheen Monitoring. Appl. Sci. 2022, 12, 8865. [Google Scholar] [CrossRef]
  26. Amri, E.; Dardouillet, P.; Benoit, A.; Courteille, H.; Bolon, P.; Dubucq, D.; Credoz, A. Offshore Oil Slick Detection: From Photo-Interpreter to Explainable Multi-Modal Deep Learning Models Using SAR Images and Contextual Data. Remote Sens. 2022, 14, 3565. [Google Scholar] [CrossRef]
  27. Li, F.; Wang, J.; Wang, Z.; Ji, D.; Wang, S.; Wei, P.; Cao, W. Bio-Inspired Eco-Friendly Superhydrophilic/Underwater Superoleophobic Cotton for Oil-Water Separation and Removal of Heavy Metals. Biomimetics 2022, 7, 177. [Google Scholar] [CrossRef]
  28. Zhang, Q.; Wei, C.; Wang, Y.; Du, S.; Zhou, Y.; Song, H. Potential for Prediction of Water Saturation Distribution in Reservoirs Utilizing Machine Learning Methods. Energies 2019, 12, 3597. [Google Scholar] [CrossRef] [Green Version]
  29. Salehuddin, N.F.; Omar, M.B.; Ibrahim, R.; Bingi, K. A Neural Network-Based Model for Predicting Saybolt Color of Petroleum Products. Sensors 2022, 22, 2796. [Google Scholar] [CrossRef] [PubMed]
  30. Durrani, M.A.; Ahmad, I.; Kano, M.; Hasebe, S. An Artificial Intelligence Method for Energy Efficient Operation of Crude Distillation Units under Uncertain Feed Composition. Energies 2018, 11, 2993. [Google Scholar] [CrossRef] [Green Version]
  31. Jiao, D.; Urban, A.; Zhu, X.; Zhe, J. Oil property sensing array based on a general regression neural network. Tribol. Int. 2021, 164, 107221. [Google Scholar] [CrossRef]
  32. Maaß, S.; Rojahn, J.; Hänsch, R.; Kraume, M. Automated drop detection using image analysis for online particle size monitoring in multiphase systems. Comput. Chem. Eng. 2012, 45, 27–37. [Google Scholar] [CrossRef]
  33. Komarova, E.V.; Prosochkina, T.R.; Trapeznikova, E.F.; Nikitina, A.P. A Method of Quantitative Analysis of Polymeric Particles in Water Environments. Bash. Chem. J. 2021, 28, 56–61. [Google Scholar]
  34. Beskopylny, A.N.; Stel’makh, S.A.; Shcherban’, E.M.; Mailyan, L.R.; Meskhi, B.; Razveeva, I.; Chernil’nik, A.; Beskopylny, N. Concrete Strength Prediction Using Machine Learning Methods CatBoost, k-Nearest Neighbors, Support Vector Regression. Appl. Sci. 2022, 12, 10864. [Google Scholar] [CrossRef]
  35. Stel’makh, S.A.; Shcherban’, E.M.; Beskopylny, A.N.; Mailyan, L.R.; Meskhi, B.; Razveeva, I.; Kozhakin, A.; Beskopylny, N. Prediction of Mechanical Properties of Highly Functional Lightweight Fiber-Reinforced Concrete Based on Deep Neural Network and Ensemble Regression Trees Methods. Materials 2022, 15, 6740. [Google Scholar] [CrossRef]
  36. Beskopylny, A.; Lyapin, A.; Anysz, H.; Meskhi, B.; Veremeenko, A.; Mozgovoy, A. Artificial Neural Networks in Classification of Steel Grades Based on Non-Destructive Tests. Materials 2020, 13, 2445. [Google Scholar] [CrossRef]
  37. Beskopylny, A.N.; Mailyan, L.R.; Stel’makh, S.A.; Shcherban’, E.M.; Razveeva, I.F.; Beskopylny, N.A.; Dotsenko, N.A.; El’shaeva, D.M. The Program for Determining the Mechanical Properties of Highly Functional Lightweight Fiber-Reinforced Concrete Based on Artificial Intelligence Methods. Russian Federation Computer Program. 2022668999, 14 October 2022. Available online: https://www.fips.ru/registers-doc-view/fips_servlet?DB=EVM&DocNumber=2022668999&TypeFile=html (accessed on 11 May 2023).
  38. Davidenko, L.M. Intelligent technologies in the practice of the oil and gas sector. E-Management 2020, 3, 4–12. [Google Scholar] [CrossRef]
  39. Lu, Q.; Sun, S.; Duan, H.; Wang, S. Analysis and forecasting of crude oil price based on the variable selection-LSTM integrated model. Energy Inform. 2021, 4, 47. [Google Scholar] [CrossRef]
  40. Shen, F.; Chao, J.; Zhao, J. Forecasting exchange rate using deep belief networks and conjugate gradient method. Neurocomputing 2015, 167, 243–253. [Google Scholar] [CrossRef]
  41. Chen, Y.; He, K.; Tso, G. Forecasting Crude Oil Prices: A Deep Learning based Model. Procedia Comput. Sci. 2017, 122, 300–307. [Google Scholar] [CrossRef]
  42. Zarayev, V.F.; Cherentsov, D.A.; Mareyeva, A.Y.; Strekalov, A.V.; Pirogov, S.P. Applying machine learning to predict the effect of an anti-turbulence additive on the hydraulic efficiency of oil pipelines. Territ. Neft. 2021, 3–4, 14–22. [Google Scholar]
  43. Andronov, Y.V.; Strekalov, A.V. Research of the application of neural networks ensembles for improving the quality of solving of regression tasks. Neftegazov. Delo 2015, 13, 50–55. [Google Scholar]
  44. Huang, S.; Peng, L.; Sun, H.; Li, S. Deep Learning for Magnetic Flux Leakage Detection and Evaluation of Oil & Gas Pipelines: A Review. Energies 2023, 16, 1372. [Google Scholar] [CrossRef]
  45. Aladwani, F.; Elsharkawy, A. Improved prediction of heavy oil viscosity at various conditions utilizing various supervised machine learning regression. Pet. Sci. Technol. 2022, 41, 406–424. [Google Scholar] [CrossRef]
  46. Markovic, S.; Bryan, J.L.; Ishimtsev, V.; Turakhanov, A.; Rezaee, R.; Cheremisin, A.; Kantzas, A.; Koroteev, D.; Mehta, S.A. Improved Oil Viscosity Characterization by Low-Field NMR Using Feature Engineering and Supervised Learning Algorithms. Energy Fuels 2020, 34, 13799–13813. [Google Scholar] [CrossRef]
  47. Wagner, F.; Eltner, A.; Maas, H.-G. River water segmentation in surveillance camera images: A comparative study of offline and online augmentation using 32 CNNs. Int. J. Appl. Earth Obs. Geoinf. 2023, 119, 103305. [Google Scholar] [CrossRef]
  48. Panckow, R.P.; Bliatsiou, C.; Nolte, L.; Böhm, L.; Maaß, S.; Kraume, M. Characterisation of particle stress in turbulent impeller flows utilising photo-optical measurements of a flocculation system—PART 1. Chem. Eng. Sci. 2023, 267, 118333. [Google Scholar] [CrossRef]
  49. Shagalov, S.V. Hydrostatic Mixer and Method of its Manufacturing. 2013134954/05, 10 January 2015. Available online: https://patents.google.com/patent/RU2538885C1/en (accessed on 10 May 2023).
  50. Shagalov, S.V. Hydrostatic Mixer (Versions). 2011140413/05A, 10 June 2013. Available online: https://patents.google.com/patent/RU2483791C1/en?oq=2483791 (accessed on 10 May 2023).
  51. Buslaev, A.; Iglovikov, V.I.; Khvedchenya, E.; Parinov, A.; Druzhinin, M.; Kalinin, A.A. Albumentations: Fast and Flexible Image Augmentations. Information 2020, 11, 125. [Google Scholar] [CrossRef] [Green Version]
  52. Beskopylny, A.N.; Stel’makh, S.A.; Shcherban’, E.M.; Razveeva, I.F.; Kozhakin, A.N.; Beskopylny, N.A.; Onore, G.S. Image Augmentation Program. Russian Federation Computer Program. 2022685192, 21 December 2022. Available online: https://www.fips.ru/registers-doc-view/fips_servlet?DB=EVM&DocNumber=2022685192&TypeFile=html (accessed on 11 May 2023).
  53. Beskopylny, A.N.; Shcherban’, E.M.; Stel’makh, S.A.; Mailyan, L.R.; Meskhi, B.; Razveeva, I.; Kozhakin, A.; El’shaeva, D.; Beskopylny, N.; Onore, G. Discovery and Classification of Defects on Facing Brick Specimens Using a Convolutional Neural Network. Appl. Sci. 2023, 13, 5413. [Google Scholar] [CrossRef]
  54. Beskopylny, A.N.; Shcherban’, E.M.; Stel’makh, S.A.; Mailyan, L.R.; Meskhi, B.; Razveeva, I.; Kozhakin, A.; El’shaeva, D.; Beskopylny, N.; Onore, G. Detecting Cracks in Aerated Concrete Samples Using a Convolutional Neural Network. Appl. Sci. 2023, 13, 1904. [Google Scholar] [CrossRef]
  55. Bochkovskiy, A.; Wang, C.Y.; Mark Liao, H.Y. YOLOv4: Optimal Speed and Accuracy of Object Detection. Comput. Vis. Pattern Recognit. 2020, 2004, 10934. [Google Scholar] [CrossRef]
  56. Xu, S.; Deng, J.; Huang, Y.; Ling, L.; Han, T. Research on Insulator Defect Detection Based on an Improved MobilenetV1-YOLOv4. Entropy 2022, 24, 1588. [Google Scholar] [CrossRef]
Figure 1. The sequence of the stages of the study: (1) the preparation of the empirical base for the study; (2) markup and data augmentation; (3) the implementation, optimization, and testing of an intelligent algorithm; (4) the interpretation of the results.
Figure 1. The sequence of the stages of the study: (1) the preparation of the empirical base for the study; (2) markup and data augmentation; (3) the implementation, optimization, and testing of an intelligent algorithm; (4) the interpretation of the results.
Biomimetics 08 00309 g001
Figure 2. Conducting laboratory tests.
Figure 2. Conducting laboratory tests.
Biomimetics 08 00309 g002
Figure 3. Micrograph of crude oil.
Figure 3. Micrograph of crude oil.
Biomimetics 08 00309 g003
Figure 4. Operations with color during image augmentation: (a) change in brightness; (b) change in saturation.
Figure 4. Operations with color during image augmentation: (a) change in brightness; (b) change in saturation.
Biomimetics 08 00309 g004
Figure 5. YOLOv4 CNN architecture.
Figure 5. YOLOv4 CNN architecture.
Biomimetics 08 00309 g005
Figure 6. CNN training.
Figure 6. CNN training.
Biomimetics 08 00309 g006
Figure 7. Result of the detection of water globules in oil.
Figure 7. Result of the detection of water globules in oil.
Biomimetics 08 00309 g007
Figure 8. Histogram of an analysis of variance with the manual method and with the neural network method: —manual method; —neural network method.
Figure 8. Histogram of an analysis of variance with the manual method and with the neural network method: —manual method; —neural network method.
Biomimetics 08 00309 g008
Figure 9. Empirical probability distribution functions for manual processing and CNN.
Figure 9. Empirical probability distribution functions for manual processing and CNN.
Biomimetics 08 00309 g009
Figure 10. Significance axis. The colored circle highlights the criterion value of the zone of insignificance 1.32 < 1.36.
Figure 10. Significance axis. The colored circle highlights the criterion value of the zone of insignificance 1.32 < 1.36.
Biomimetics 08 00309 g010
Table 1. YOLOv4 training parameters.
Table 1. YOLOv4 training parameters.
ParameterValue
1Number of shots in the training set350
2Number of shots in the validation set75
3Number of shots in the test set75
4Batch size10
5Number of epochs300
6learning rate0.01
7SolverSGD
Table 2. Model quality estimates.
Table 2. Model quality estimates.
NumParameterIoU = 0.50IoU = 0.75
1Precision89%74%
2Recall73%64%
3Average precision89%78%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Beskopylny, A.N.; Chepurnenko, A.; Meskhi, B.; Stel’makh, S.A.; Shcherban’, E.M.; Razveeva, I.; Kozhakin, A.; Zavolokin, K.; Krasnov, A.A. Detection and Dispersion Analysis of Water Globules in Oil Samples Using Artificial Intelligence Algorithms. Biomimetics 2023, 8, 309. https://doi.org/10.3390/biomimetics8030309

AMA Style

Beskopylny AN, Chepurnenko A, Meskhi B, Stel’makh SA, Shcherban’ EM, Razveeva I, Kozhakin A, Zavolokin K, Krasnov AA. Detection and Dispersion Analysis of Water Globules in Oil Samples Using Artificial Intelligence Algorithms. Biomimetics. 2023; 8(3):309. https://doi.org/10.3390/biomimetics8030309

Chicago/Turabian Style

Beskopylny, Alexey N., Anton Chepurnenko, Besarion Meskhi, Sergey A. Stel’makh, Evgenii M. Shcherban’, Irina Razveeva, Alexey Kozhakin, Kirill Zavolokin, and Andrei A. Krasnov. 2023. "Detection and Dispersion Analysis of Water Globules in Oil Samples Using Artificial Intelligence Algorithms" Biomimetics 8, no. 3: 309. https://doi.org/10.3390/biomimetics8030309

APA Style

Beskopylny, A. N., Chepurnenko, A., Meskhi, B., Stel’makh, S. A., Shcherban’, E. M., Razveeva, I., Kozhakin, A., Zavolokin, K., & Krasnov, A. A. (2023). Detection and Dispersion Analysis of Water Globules in Oil Samples Using Artificial Intelligence Algorithms. Biomimetics, 8(3), 309. https://doi.org/10.3390/biomimetics8030309

Article Metrics

Back to TopTop