# Mask R-CNN-Based Stone Detection and Segmentation for Underground Pipeline Exploration Robots
## 1 Introduction  
In recent decades, with the proliferation of cities, tens of thousands of underground pipes have been installed to serve a multitude of functions. It is not common for oil and gas pipelines to carry large solid objects like stones or rocks. But any abnormality or pipeline break due to natural disaster may cause pipeline blockage through solid materials like stones and sand aggregates. At the same time, efficient transportation of gravel and sand aggregates through pipelines is essential for a variety of industries, from construction to mining. In order to ensure a seamless flow of materials, maintaining the integrity of these pipelines is crucial for their continued operation. There is a substantial risk in this domain of stones, rocks, or other solid debris entering into the pipeline, which can lead to disruptions, blockages, and structural damage. Therefore, routine checking and maintenance are essential. It is difficult for workers to explore inside a tiny pipe. Even with large-diameter pipes, workers are at risk of severe and often deadly injuries. Taking all the facts into account, a robotic solution came into place and has been increasingly deployed in extremely difficult environments, including underground pipeline exploration. A large number of pipeline inspection robots have been developed over the past decades and can be operated in various pipelines such as water, oil, and gas, Sewerage systems, or any specific pipeline where regular inspection is inevitable [1; 2; 3]. However, for the underground pipeline exploration robot, it is important to understand the pipeline environment and identify potential objects that could block the pipeline and interrupt its usual activities. Currently, computer vision technology is extensively employed in robot inspection systems to understand an inspection site. Several studies have been conducted on vision-based systems. In a previous work [4], a pipe-inspection robot was developed based on YOLOv3 for defect detection and localization in a sewage pipeline. Also, another study worked on a deep learning-based method for underground sewage pipeline defect classification and location recognition [5]. However, the above studies were conducted for defect detection in pipes, but identifying objects inside the underground pipe is still very challenging, and stones are the most commonly found objects on the internal pipeline surface. Therefore, to recognize stones and their precise positioning along the underground pipeline, a robotic system with stone detection is needed. The primary challenges in vision-based stone grasping are to develop robust and accurate stone detection algorithms that can effectively detect stones in different background and lighting conditions in an underground pipeline. In the past few years, many researchers have worked on rock detection and segmentation problems. For example, ref. [6] proposed an object detection model that was designed based on a modified U-net to recognize complex rock fragments. Further, a visual system with online rock mass assessment was developed based on semantic segmentation [7]. Rocks located in natural scenes were taken into account for another work [8], and a superpixel segmentation algorithm was developed to detect and locate rocks with an exact border. Furthermore, deep learning methods were utilized in the detection and segmentation processes of rock blast fragments [9]. Numerous research studies have been carried out on segmenting rocks and stones using Mask R-CNN. In reference [10], researchers explored dump particle segmentation and achieved a training accuracy of 97.2%. In another study [11], the author focused on blast fragmentation, achieving a precision score of 92%. In reference [12], a 93.18% detection accuracy was achieved by analyzing thin rock slices. The training dataset influences identification accuracy, particularly when it concerns recognizing small particles.