A significant collection of images for the dataset of crude oil slicks on the sea surface is required to provide the reliable operation of this element. This software element for the recognition of oil slicks on the sea surface is a complete product and may already be used separately if the measurement of slick thickness is not required. The measurement of the slick area may also be done with no necessity to determine the types of oil products. In this case, autonomous optical remote sensing is  
Figure 1: Oil slick detection using the AI elements of HSFW1. realized with one video camera and the raspberry pi 3 microcomputer, and it represents a very reasonable option for detecting oil slicks on the sea surface. An AI element was developed as a software component with appropriate neural network architecture for image and video analysis to solve a more complex problem of thin slick (semantic segmentation) classification. The Python programming language was used to create this software component. To work with images, a library of computer vision algorithms, image processing, and general-purpose numerical algorithms with open-source OpenCV was used. The Mask R-CNN neural network architecture [20], implemented using the Keras library with the Tensorflow framework, was chosen as a system with an object segmentation component. The component was taught to detect and analyze images of marine fuel slicks on the water surface using deep learning methods. The Mask R-CNN architecture is a further development of the Faster R-CNN architecture with an additional branch that predicts the position of the mask covering the found object and, thus, solves the segmentation problem in this method. This also applies to image recognition. Datasets with real pollution monitoring of bunkering accidents were used for learning. The operation of the element is based on the system of codes proposed in the Bonn Agreement. Each code identifies a slick that has a specific color and can be assigned to a specific range of thicknesses. Table 1 shows the correspondences of codes and slick thicknesses taken from [16]. The operation of the element was verified in the process of autonomous monitoring of a marine fuel slick that occurred during bunkering of the vessel. When an oil slick is detected, which can be attributed to thin slicks of oil products, the area in the image is outlined along the contour of the detected object and, hence, segmentation is carried out. The analyzed spot is represented as a highlighted area in the image. The area already selected by segmentation can be divided into several others related to different codes (rainbow, sheen, metallic, etc. ), has along with its thickness. The pixels of the image related to the rainbow are highlighted, and the area of the rainbow slick is determined. The remainder of the program element refers to other codes (sheen, metallic, etc.). Having selected the spots, one can make an approximate estimate of the slick area and assign certain thicknesses to all the spots that were previously assigned to the color codes. The oil slick volume is estimated using the percentage of these areas and their area. Figure 1(a),b show an image of a marine fuel slick, which was recorded by the detection element (Figure 1(a)) and the result of the operation of the AI element according to the classification of an oil slick (Figure 1(b)). In Figure 1(b), colors show different fragments of the spot, which are classified as different types of slick in terms of thickness and assigned to different codes. The dark gray color marked \"a\" corresponds to code 3--\"metal\", green fragment of the slick, \"b\" corresponds to code 2--\"rainbow\", fragment, and \"c\" corresponds to code 1--\"silver-gray\". A computer that is more productive than the raspberry pi 3 is required to implement this kind of remote sensing. Here, we used NVIDIA Jetson TX2, which can also be installed on a small-sized drone.