An automated annotation pipeline for underwater object detection on sonar images is proposed in this paper. Most of underwater robot tasks such as exploration, inspection and rescue require the robot’s capability to detect and identify certain objects. Thus, the interest in underwater object detection methods using artificial intelligence (AI) is increasing. Object detection under water is mainly performed with acoustic images since optical images captured by cameras are strongly affected by turbidity and, therefore, can be used only in very close range. Object detection based on AI significantly depends on the quality, quantity and labelling of the training dataset which requires a lot of manual work. Unfortunately, it is difficult or even impossible to find open-source training datasets in underwater environment. Furthermore, the data depends on the type of the sonar device used and the target objects which makes individualized acquisition and preparation of the training dataset unavoidable. The automated collection and annotation pipeline proposed in this work addresses this problem and generates training datasets for object detection using a forward-looking imaging sonar allowing an effective AI training procedure for object detection.