Detection and Analysis of Oil Spill using Image Processing

—Thousands of oil spills occur every year on offshore oil production platforms. Moreover, ships that crosses rivers to reach the harbor cause spills each year. The current study focuses on IRAQI marine and rivers, especially Al-Bakr, Khor al-Amaya, ABOT oil terminal and SHAT AL-Arab river inside Al Başrah oil terminal. In order to mitigate and manage oil spill impacts, an unmanned aerial vehicle has proven to be a valuable tool in mitigating and managing incidents. To achieve high accuracy, the objective of the current research is to analyze captured images for rivers, identify oil pollution and determine its location. The images were taken from the Iraqi Regional Organization for the Protection, General Company for Ports of Iraq, Iraqi Ministry of Environment and online websites. In the current paper is presented a software framework for detecting oil spills, pollution in rivers and other kinds of garbage. The framework based on artificial intelligence is divided into two parts: a training model and an operational model. In the training model part, a machine learning model is applied, which is one of the fastest and most accurate methods, integrated inside PipelineMLML. Thus, the object detection technique used can identify one or more categories of objects in a picture or video. Furthermore, the locations of objects can be identified with the help of neural networks. In the operational mode, models can identify oil spills in images.


I. INTRODUCTION
Oil spills damage the environment, destroy natural resources, and harm public health. The environment is often exposed to huge pollution following oil spill incidents. As proof of the significant pollution risk associated with offshore oil and shipping crude oil products through these waters, one only needs to consider the British Petroleum Deepwater Horizon incident in 2010 and the huge marine disaster. The information technology era has always been important for different industries, therefore, software systems based on machine learning models have been developed to perform object detection in the past years. The accuracy and efficiency of object detection improved dramatically with the advent of machine learning and deep learning. As a result, these technologies were pivotal for the advancement of computers. The common programming library, PipelineMLML, is designed to enhance the accuracy and reliability of an object detection system.
Deep neural networks (DNN), convolutional neural networks (CNN) have gained fame for their ability to process visual data. Recently, sensor image-based Artificial intelligence has become a key component in a wide range of software applications because of its capability to solve several problems [7]. It can, for example, identify objects and recognize them as one of these issues. A set of applications that use these features are autonomous driving, video surveillance, and healthcare [8,9,10].
The current research combines these advances in artificial intelligence, especially in the detection and recognition of objects in the oil and gas industry in order to avoid unwanted incidents based on video monitoring and machine learning. Drones are used to capture photographs or video of the observed regions which oil spills can occur. The triggered files are uploaded on the system's framework to be further analyzed and visualized from a ground station by an oil and gas expert. Machine learning models have been created for two cases, when an oil spill happens in the environment, as well as when it is not present. The models are used to be consumed and to predict the occurrence of oil spill disasters. The overall solution is appropriate spill management and continuous surveillance, speeding up the decision making process. Drones can quickly collect critical data. A big challenge, like reflectance can be solve by adding to the drone"s camera a polarizing filter. The problem of oil dissolution is tackled by our solution, as it analyzed four factors, namely a normal spill, areas of water color retreat, leaks in surrounding soil based on their color and crude oil spills.
The limitations of the proposed solution are given by battery life and weather conditions, like extreme wind. Gasoline engines for drones can be an alternative, but they will be noisy and emit exhaust.
Due to there being no effective method of automatic detection for oil pipelines, it forces oil companies to dedicate a lot of human resources to patrol them manually [1]. As a result, operating costs of enterprises are high, while the used detection methods cannot stop oil pollution. This is because manual checks or different technologies that exist are not able to detect oil spills on time.
In the current study the design and development of an intelligent and automated method for detecting oil spills using image merge with deep convolutional neural networks (DCNNs) and a cluster of algorithms. By using these www.ijacsa.thesai.org technologies, one of the most effective solutions for identifying and recognizing spills can be created. In summary, this study contributes to: 1. provide a method to ensure a smooth and uninterrupted flow of river environments monitoring; 2. provide full vision and awareness of oil pollution and different garbage.
The paper is organized according to the following structure: Section 2 describes related work regarding object detectors based on ML.NET, Artificial intelligence detection. Section 3 specifies the materials and methods included in the current paper, concerning drone data. The processing model method is outlined in Section 4. Section 5 mentions usage of the detection method and discusses the results obtained based on experimental analysis. Finally, Section 6 summarizes the main conclusions drawn from the current study, while Section 7 details the ideas for future development of the applied detection, recognition, and tracking algorithms.
II. LITERATURE REVIEW Geographic information systems, spatial statistical methods and computational modeling are used to assess the impacts of oil spills [11,12,13,14,15]. Special attention must be provided in order to monitor and predict the appearance, existence of oil spills that endanger the marine environment, having a crucial impact over time.
Several closely related works have been analyzed in the context of oil spills in the surrounding environment. Existent state-of-the-art models for oil spill risk assessment include multiple factors and focus on uncertainty. A research regarding the Baltic Sea spills from ship wrecks included into its state-ofthe-art model a probabilistic calculation of the sum of factors (construction work, corrosion, diving, earth quakes, military activity, ship traffic, extreme weather and trawling) that can lead to dangerous consequences [21]. The gap which exists in this model, but is considered by our proposed system is that real-time events happen in a short amount of time and drones ease decision making. Other oil spill models [22] do not consider oil dissolution [23,24]. The paper"s model analysis this factor, along with watercolor retreat areas and learks in surrounding soil.
A solution used in Brazil involved the usage of radars in order to determine marine oil rig spills as well as it can determine features and feed based on a logistic regression classifier method [2]. The methods included convolutional neural networks and logistic regression classifiers. The best results were obtained for vertical direction of electromagnetic waves, namely polarized ones. In the case of polarized images, more target information is obtained by the object as the light gets reflected [20]. Polarization ensured accuracy of the acquired image information.
Another research done by Germans and Mongolians focused on oil spill detection in the Caspian Sea, also based on radar images, the water surface images which presented dark slicks on a bright background were analyzed using the EnviView and NEST programs [3]. The outcomes were obtained after doing the comparison between their contamination and navigation maps. The training part of the machine learning algorithm consists in automatically image annotations and matching them with infrared images to generate a dataset, but the training stopped when the neural network has failures when it cannot improve during five consecutive epochs. 7 CNN segmentation architectures and 8 feature extractors are used during the analysis.
A researcher from Belgium [4] studied the Antwerp port environment using drones with thermal infrared cameras. As in paper [2], the used method involved convolutional neural networks. The accuracy reached 89% when involving infrared cameras for oil spill detection in water. A group of researchers from Algeria and France experienced a hybrid swarm UAV monitoring, The UAV swarm plan the trajectory and gather nautical data based on a modified Boustrophedon algorithm, along with an unsupervised natural image classification.
Crude oil spillage is another factor which was analyzed in the current paper. Cases were reported in Southern Iraq, at Rumaila, Basra [18]. Based on the extracted soil samples, it was found that the international standard limits of heavy metals content were exceeded. The contaminated soil can affect the neighboring regions. Our research does not imply physical samples of soil. Real-time image processing coming from drones is sufficient to determine the risk of an oil spill.
A group of researchers studied the impact of crude oil spill using the multispectral satellite Landsat 8 OLI imagery [19]. The analysis was done using machine learning models. 1205 polluted vegetation and wetland hectares were studied during 2015-2018. In the following two years, based on the normalized difference vegetation index and chlorophyll index vegetation, it was found that the region started to recover according to remediation initiatives. The downside of the multispectral Landsat 8-OLI remote sensing imagery is that its" measurements are influenced by irradiance variation, sensor calibration and drift, atmospheric attenuation and radiance path. The drone of our solution can scan the observer region from distance, as well as closely. Moreover, the drone will be trained to navigate in regions with reflectance of the surrounding terrain.
The researcher did not study the influence of unmanned aerial vehicle (UAV) speed variations which have an effect upon the consumed energy [5], reaching a lower level of energy consumption. Another group of researchers from Latvia [6] also included a group strategy, as for paper [5], based on multi remote piloted aircrafts, such that oil spills are analyzed.
The previous mentioned papers are analyzed in Table 1 from the point of view of strengths and weaknesses. Our contribution is also specified as a comparison to the analyzed closely related work (selection made; similar conclusions can be drown for other reported research as well).
The result of the conducted analysis shows that the purpose of the current paper is clearly defined. Three core areas are combined to provide a solution to mitigate oil spills, sense danger at distance, determine geographic information and perform computational modeling. www.ijacsa.thesai.org

A. Materials and Work Component
This research focus to determine oil spills relies upon images. At present, deep learning can be used to analyze images so that UAVs in the future work, are able to detect oil spills automatically and accurately.
The current paper describes a framework for object detection and recognition based on drones equipped with a high-resolution camera and gimbal path controller. The used computer for the simulation of the proposed framework was a Macbook Pro laptop with an i9 processor, 2.30 GHz, and 16 GB RAM. The framework uses computer neural networks to locate and recognize objects in images or videos in real-time. Object detection and recognition can be performed in many programming languages. In this paper, the algorithm is built using ML.NET, an open-source, cross-platform, and machine learning framework designed by Microsoft and publicly released in 2018 to offer the power of machine learning (ML) www.ijacsa.thesai.org to .NET applications to cover various scenarios, like sentiment analysis, oil price prediction, recommendations, and classification of images.
The system identifies the class of objects (oil pollution and illegal bilge water dumping), and their precise location. Classification can predict objects in an image. Object recognition and detection modules were designed for use with oil and gas pipelines. The solution can also be adapted to different environments by adjusting these frameworks according to the same structure.

B. Study Area
As part of Phase 2, part of the images with which the model is trained are taken from the deep sea south of Iraq (for a more detailed description of all areas from where images are taken for training see next section) the main oil harbor at Al Başrah [16], known as ABOT, the marine loading terminal for oil being located at almost 50 kilometers south-east the Al-Faw Peninsula, in the Persian Guf. Together with its other terminal, the Khawr al "Amīyah Oil Terminal, KAAOT, both terminals offer the main export source for more than 80% of Iraq's gross domestic product. The SHAT AL-Arab river is used to reach the Al Başrah oil terminal and its fauna and flora are put in danger in case of a disaster, like an oil spill.
The exported crude oil which is produced in the southern Iraqi oil fields, is carried via three 1.2 m diameter pipelines to the southern part of the Al-Faw peninsula, as well as undersea to the ABOT platform [16]. One 1.2 m and two 0.81 m pipelines supply the KAAOT platform.
The facilities of ABOT are able to transfer daily up to 3 million barrels (Mbbl) of oil when all four supertanker berths operate at maximum capacity and have a maximum draft of 21 m [17]. Three single-point mooring systems (SPM) were included in the year 2012, each having a design rating of 800 thousand barrels of oil daily, and two additional SPMs to increase the total loading capacity to 6.4-6.6 Mbbl of oil per day [17]. The KAAOT facility possesses a shallower depth and its two berths can be used for Suezmax oil tankers with capacities up to 1 Mbbl and has a transfer capacity of about 240 kbbl of oil daily [17].

C. Oil Spill Dataset
In this research to identify oil spills, the dataset gathered with help of: 1) http://ropme.org (Regional Organization for the Protection -ROPME) was initially established in 1979, was convened in Kuwait, 1978. The Conference adopted in 1978 included the Action Plan for the Protection and Development of the Marine Environment and the Coastal Areas of Bahrain, Iran, Iraq, Kuwait, Oman, Qatar, Saudi Arabia and the United Arab Emirates the Kuwait Regional Convention for Cooperation on the Protection of the Marine Environment from Pollution. ROPME Information regards the geographic coordinates and timestamps of the pollution provided by the General Company for Ports of Iraq through the pollution department. 2) General Company for Ports of Iraq / pollution department; 3) Ministry of environment / Southern office; 4) online websites.

IV. PROCESSING MODEL METHOD
The current processing model used images taken from the Iraqi Regional Organization for the Protection, General Company for Ports of Iraq, Iraqi Ministry of Environment and online websites.
The future research will focus on how the raw dataset will be gathered from several aerial images. The trained model which was used in the current paper will analyze and identify an oil spill based on the main algorithm framework explained in the present article. The analysis process will be in real-time or after transferring data to the ground station. Moreover, the operator will make sure to double-check the spill detection alert.
Every image will be resized and segmented on board. When oil is detected, the system will gather all related information. The information will regard two major factors. The first factor, onboard cameras, will capture raw aerial images that provide information about spill size and locations. The second factor, UAV hardware will provide altitude, flight speed, flight path and GPS coordinates to help identify both the UAV and spill locations during data collection. Moreover, the triggered data will be sent to the ground station, where actions can be taken.
The current paper application developed with ML.NET contains several steps (Fig. 1):  Load data -Raw data is loaded into memory.
 Create a pipeline -The pipeline contains the steps that transform data or train a machine learning algorithm. ML.NET offers different transformational steps, like one-hot encoding and several machine learning algorithms.
 Train a machine learning model -When the pipeline is created, training can begin. This is done based on the Fit() method.
 Evaluate -The evaluation of the model can be done at any point and supplementary decisions can be taken according to evaluations.
 Save -When the model is trained, it is saved into a file. The resulting application is created based on one microservice which trains and evaluates the machine learning model, and the other microservice uses it.
 Load -The created machine learning model can be loaded and applied for further predictions. www.ijacsa.thesai.org

V. DETECTION METHOD AND RESULTS
The system is designed to capture pictures and video along pipelines that extend in or out of fields and through the trained model, the algorithm begins to analyze collected data either in real-time or after transmission to the ground station where it starts to analyze data.
The following factors are taken into consideration to detect possible leaks:  A normal spill occurred.
 Areas of water color retreat were identified.
 Leaks in surrounding soil were detected by observing their color.
 A crude oil spill occurred.
UAVs also have the capability to detect anomalies along with pipeline networks normal category spills, such as construction or roadwork that might compromise pipeline integrity. If any unusual situations occur, namely leaks, explosions, attacks, or any other unusual events, they provide real-time video and alert notifications. In order to assist the teams to value different situations and provide clear information to emergency crews, the detection framework is depicted in Fig. 2.   The probabilities of the studied leak factors based on 127 different images are displayed in Fig. 5. On the X axis are placed the studied situations, namely normal spill, watercolor retreat areas, leaks in surrounding soil and crude oil spill. On the Y axis are the true and false probabilities for every studied case, the values varying between 0 and 1. The rectangles represent the most frequent range of points belonging to every category. All the dots are probability values.  The true positive, false positive, false negative and true negative values for all the analyzed cases are displayed in Table 2. The determined accuracies were 71.67% for normal spills, 70.88% for watercolor, 73.13% for soil leaks and 79.74% for crude oil spills.
According to the overall results, it was clear that in 99% of the cases, the triggered situation was a broken ship / pipe, while for 28 cases, the situation was good. The following table shows the probabilities for the four analyzed situations.
The highest certainty value was obtained for leaks in surrounding soil, namely 90%, followed by normal spills, with a probability of 87.77%. Close by were the water retreat areas with 85.88% and crude oil spill with 84.79%. The overall true positive rate in case of an oil spill was 87.11%, with a false positive value equal to 12.38%. The false negative value was determined to be 21.93% and true negative of 78.06%. Precision, recall, accuracy and F1-measure formulas as illustrated in Fig. 6. Precision (PR) indicates how accurate the proposed oil detection model is and it is equal to 87.55%. Recall (RE) computes how many actual positives are captured in the model and the value for it is equal to 79.88%. Accuracy (CA) is influenced by true negative values and it is equal to 82.80%. A better measure is represented by F1-measure which is a means to determine a balance between precision and recall. The value for it is equal to 83.54%.

VI. CONCLUSION
Oil pollution prevention and response in marine accidents consists of a series of steps and procedures. In this study, it was demonstrated how deep learning and artificial intelligence can be used to accomplish this goal.
The framework proposes a clearly useful method despite its condition being dependent on hypothetical parameters of any given event (normal spill, watercolor retreat areas, leaks in surrounding soil, crude oil spills). 127 cases were analyzed and the results provide good outcomes. Dangerous situations have been correctly determined based on the precision, recall, accuracy and F1-measure values which have been computed, proving that the solution can be further used in real-case scenarios. The system proved that it filled the gap of oil dissolution detection.

VII. FUTURE WORK
The proposed system will be useful especially in waterways near populated areas. The reason is caused by the fact that densely populated settlements have narrow passageways, canals and straits, leading to extensive oil transportation. Accurate decisions and speed are imperative in such sensitive areas. For the responsible coastal authority, accident response management is crucial and the costs for cleaning oil spills need to be decreased.
Future work will include an oil spill system modeling which will help to integrate breakthroughs. The demand for oil will not decrease soon and the production of spill accidents will also endure. Models will be created to understand the emergence of oil spills, spatiotemporal dynamics and to enhance the response to mitigate such situations. Moreover, different datasets will be tested to prove the scalability of the currently proposed work.