Accurate classification of mammography images into normal and cancerous categories is critical for the early detection of breast cancer. This study utilizes transfer learning and deep learning models to extract and diversify features from a combined dataset consisting of the Mini Digital Database for Screening Mammography (DDSM, containing 7808 images) and the Mammographic Image Analysis Society (MIAS) dataset (containing 322 images). The preprocessing steps involve image cropping, removal of artifacts, and enhancement of contrast using Contrast-Limited Adaptive Histogram Equalization (CLAHE). Data augmentation techniques, including the application of median and Gaussian blur, were used to improve the robustness of the models. Three pre-trained networks—Residual Networks with 50 layers (ResNet-50), Visual Geometry Group Network with 19 layers (VGG-19), and Residual Networks with 152 layers Version 2 (ResNet-152V2)—were fine-tuned specifically for mammography data. Image segmentation and the removal of the pectoral muscle significantly improved classification accuracy. The VGG-19 model achieved an Area Under the Receiver Operating Characteristic Curve (AUC) of 0.80 for segmented images and 0.86 for non-segmented images. A stacked generalization model, which combined features from all three networks, further optimized performance. Artificial Neural Network (ANN) and Extreme Gradient Boosting (XGBoost) models achieved AUCs of 0.897 and 0.890, respectively, for segmented images. Data augmentation improved performance by 2.7%–4%.