In the present magnetically confined plasmas, the prediction of particle loading on material surfaces is a primary concern in view of the protection of plasma facing components for next step devices. Thus, an understanding of filament dynamics is needed. In this context, this work aims to develop an automatic detector for filaments arising in the MAST-U plasma. The identification of the filaments has been done starting from 2D images acquired with a fast visible camera. Therefore, it can be faced as an image object recognition problem. Currently, the object recognition is a key output of deep learning and machine learning algorithms. In this paper, a database of several thousands of images generated by a synthetic diagnostic, which reproduces the statistical properties of experimental filaments in terms of position, size and intensity has been used. The synthetic images are pre-processed by mapping them onto the toroidal midplane of the machine. Then a Faster R-CNN is customized to the problem of identifying the filaments. In particular, in order to enhance the performance of the detector, a suitable definition of the target-boxes defining the filament positions and sizes is adopted with good results.