Onions are known for having nutrients that are good for human health, like high protein, ascorbic acid, and phenols that aid in combatting major health problems like heart disease, osteoporosis, and irregular blood sugar levels and foster a healthy digestive system. Nowadays, this essential crop is affected by several bacteria and viruses that cause harm to the farmers’ fields. Since onions are widely consumed and valued in agriculture and medicine, it’s vital to identify and manage their diseases using an automated system promptly. This study aims to diagnose the onion diseases into six classes, including Botrytis Blight (BB), Downy Mildew (DM), Purple Blotch (PB), Stemphylium Leaf Blight (SLB), Iris Yellow Spot (IYS), and Xanthomonas Leaf Blight (XLB) utilizing an automated process. In this study, we employed several augmentation methods to the raw images and achieved around 6,596 augmented images. Afterward, optimal image processing techniques were employed to eliminate the artifacts, noises and enhance the image quality. After annotating our images, we classified them using a Mask R-CNN and multiple deep-learning models, including VGG16, VGG19, and ResNet50. Consequently, the Mask R-CNN model outperformed with an accuracy rate of 95.39% in multi-class classification compared to the other models. Therefore, this model can play a vital role in onion leaf disease detection in real time.