Obesity is one of the main drivers of type 2 diabetes, but it is not uniformly associated with the disease. The location of fat accumulation is critical for metabolic health. Specific patterns of body fat distribution, such as visceral fat, are closely related to insulin resistance. There might be further, hitherto unknown, features of body fat distribution that could additionally contribute to the disease. We used machine learning with dense convolutional neural networks to detect diabetes-related variables from 2371 T1-weighted whole-body MRI data sets. MRI was performed in participants undergoing metabolic screening with oral glucose tolerance tests. Models were trained for sex, age, BMI, insulin sensitivity, HbA1c, and prediabetes or incident diabetes. The results were compared with those of conventional models. The area under the receiver operating characteristic curve was 87% for the type 2 diabetes discrimination and 68% for prediabetes, both superior to conventional models. Mean absolute regression errors were comparable to those of conventional models. Heatmaps showed that lower visceral abdominal regions were critical in diabetes classification. Subphenotyping revealed a group with high future diabetes and microalbuminuria risk. Our results show that diabetes is detectable from whole-body MRI without additional data. Our technique of heatmap visualization identifies plausible anatomical regions and highlights the leading role of fat accumulation in the lower abdomen in diabetes pathogenesis.