Despite well-defined criteria for radiographic diagnosis of atypical femur fractures (AFFs), missed and delayed diagnosis is common. An AFF diagnostic software could provide timely AFF detection to prevent progression of incomplete or development of contralateral AFFs. In this study, we investigated the ability for an artificial intelligence (AI)-based application, using deep learning models (DLMs), particularly convolutional neural networks (CNNs), to detect AFFs from femoral radiographs. A labelled Australian dataset of pre-operative complete AFF (cAFF), incomplete AFF (iAFF), typical femoral shaft fracture (TFF), and non-fractured femoral (NFF) X-ray images in anterior-posterior view were used for training (N = 213, 49, 394, 1359, respectively). An AFFnet model was developed using a pretrained (ImageNet dataset) ResNet-50 backbone, and a novel Box Attention Guide (BAG) module to guide the model's scanning patterns to enhance its learning. All images were used to train and internally test the model using a 5-fold cross validation approach, and further validated by an external dataset. External validation of the model's performance was conducted on a Sweden dataset comprising 733 TFF and 290 AFF images. Precision, sensitivity, specificity, F1-score and AUC were measured and compared between AFFnet and a global approach with ResNet-50. Excellent diagnostic performance was recorded in both models (all AUC >0.97), however AFFnet recorded lower number of prediction errors, and improved sensitivity, F1-score and precision compared to ResNet-50 in both internal and external testing. Sensitivity in the detection of iAFF was higher for AFFnet than ResNet-50 (82 % vs 56 %). In conclusion, AFFnet achieved excellent diagnostic performance on internal and external validation, which was superior to a pre-existing model. Accurate AI-based AFF diagnostic software has the potential to improve AFF diagnosis, reduce radiologist error, and allow urgent intervention, thus improving patient outcomes.