Deep learning has made identifying breast cancer lesions in mammography images an easy task in modern medicine, which has helped improve the diagnosis efficiency, sensitivity and accuracy by precisely identifying breast cancer from mammography images, contributing to timely detection and maintaining consistent performance. This paper presents the steps and strategies to develop a deep learning (DL) model to detect lesions in mammography images, based on U-Net architecture for precise segmentation, which has been developed for biomedical image segmentation, and incorporating ResNet34 as its encoder to extract features. Next, we employ the FastAI library, which simplifies and accelerates the model training tasks. For the data, studies and available resources lead us to INbreast, which is built with full-field digital mammograms contrary to other digitized mammograms. We obtained a high accuracy of 98% on the INbreast database, which is very challenging compared to stateof-the-art results.