Diabetes mellitus is a common disease worldwide. In progressive diabetes patients, deterioration of kidney histology tissue begins. Currently, the histopathologic examination of kidney tissue samples has been performed manually by pathologists. This examination process is time-consuming and requires pathologists' expertise. Thus, automatic detection methods are crucial for early detection and also treatment planning. Computer-aided diagnostic systems based on deep learning show high success rates in classifying medical images if a large and diverse image set is available during the training process. Herein, transfer learning-based convolutional neural network model was proposed for the automatic detection of diabetes mellitus using only rat kidney histopathology images. The model monitors structural changes, especially in the glomerulus and also other parts of the kidney caused by the damages of diabetes. According to the simulation results, the proposed model has reached 97.5% accuracy. As a result, the recommended model can quickly and accurately classify histopathology images and helps pathologists as the second reader in critical situations (C) 2021 The Authors. Published by Atlantis Press B.V.