  Marine debris poses a significant threat to the survival of marine wildlife,
often leading to entanglement and starvation, ultimately resulting in death.
Therefore, removing debris from the ocean is crucial to restore the natural
balance and allow marine life to thrive. Instance segmentation is an advanced
form of object detection that identifies objects and precisely locates and
separates them, making it an essential tool for autonomous underwater vehicles
(AUVs) to navigate and interact with their underwater environment effectively.
AUVs use image segmentation to analyze images captured by their cameras to
navigate underwater environments. In this paper, we use instance segmentation
to calculate the area of individual objects within an image, we use YOLOV7 in
Roboflow to generate a set of bounding boxes for each object in the image with
a class label and a confidence score for every detection. A segmentation mask
is then created for each object by applying a binary mask to the object's
bounding box. The masks are generated by applying a binary threshold to the
output of a convolutional neural network trained to segment objects from the
background. Finally, refining the segmentation mask for each object is done by
applying post-processing techniques such as morphological operations and
contour detection, to improve the accuracy and quality of the mask. The process
of estimating the area of instance segmentation involves calculating the area
of each segmented instance separately and then summing up the areas of all
instances to obtain the total area. The calculation is carried out using
standard formulas based on the shape of the object, such as rectangles and
circles. In cases where the object is complex, the Monte Carlo method is used
to estimate the area. This method provides a higher degree of accuracy than
traditional methods, especially when using a large number of samples.
