Sports image classification is a complex undertaking that necessitates the utilization of precise and robust techniques to differentiate between various sports activities. This study introduces a novel approach that combines the deep neural network (DNN) with a modified metaheuristic algorithm known as novel tuna swarm optimization (NTSO) for the purpose of sports image classification. The DNN is a potent technique capable of extracting high-level features from raw images, while the NTSO algorithm optimizes the hyperparameters of the DNN, including the number of layers, neurons, and activation functions. Through the application of NTSO to the DNN, a finely-tuned network is developed, exhibiting exceptional performance in sports image classification. Rigorous experiments have been conducted on an extensive dataset of sports images, and the obtained results have been compared against other state-of-the-art methods, including Attention-based graph convolution-guided third-order hourglass network (AGTH-Net), particle swarm optimization algorithm (PSO), YOLOv5 backbone and SPD-Conv, and Depth Learning (DL). According to a fivefold cross-validation technique, the DNN/NTSO model provided remarkable precision, recall, and F1-score results: 97.665 ± 0.352%, 95.400 ± 0.374%, and 0.8787 ± 0.0031, respectively. Detailed comparisons reveal the DNN/NTSO model's superiority toward various performance metrics, solidifying its standing as a top choice for sports image classification tasks. Based on the practical dataset, the DNN/NTSO model has been successfully evaluated in real-world scenarios, showcasing its resilience and flexibility in various sports categories. Its capacity to uphold precision in dynamic settings, where elements like lighting, backdrop, and motion blur are prominent, highlights its utility. The model's scalability and efficiency in analyzing images from live sports competitions additionally validate its suitability for integration into real-time sports analytics and media platforms. This research not only confirms the theoretical superiority of the DNN/NTSO model but also its pragmatic effectiveness in a wide array of demanding sports image classification assignments.