The shortage of necessary micronutrients in plants and the development of diseases result in economic losses that lead to diminished sugar industry production volumes nationwide and internationally. Plants receive better protection from destruction, and practitioners achieve maximum precision farming system efficiency through the early implementation of modern technology-based plant health assessments. The proposed system combines pre-trained Convolutional Neural Networks (CNNs) with a Vision Transformer (ViT) to develop an advanced detection technique to identify sugarcane agricultural diseases during their early nutrient deficiency stages. Researchers benefit from the non-local means (NLM) noise reduction filter because it protects essential image attributes during cleaning operations so data remains accurate. Combining DenseNet-201, Inception-V3 VGG16, and ViT leads to self-attention analysis for developing highly advanced deep feature extraction methods that obtain precise insights about crop health from image data. The Starfish Optimization Algorithm (SOA) is an optimization tool that provides exact model performance at high speed when creating models. The research evaluation procedure involves a detailed assessment of ViT using comparison tests with DenseNet-201 Inception V1 and VGG16 to determine their applications in agriculture. An automated disease-diagnosis system based on Python provides accurate detection and reliable operational capabilities to enable scalable assessments of sugarcane nutrient deficiencies to secure food supplies sustainably.