For the machine to see, it aims to develop an artificial system with the capabilities of a human visual system. CV examines images for scenes, objects, faces, and other content in videos, photos, and pictures, using a variety of machine learning (ML) or DL algorithms. In the last ten years, DL has developed and expanded significantly in tandem with the rapid advancement of technology for automation and visual analysis. Numerous fields have utilized DL methods extensively. Automatic WCE diagnosis and analysis are increasingly using DL algorithms, which have produced excellent outcomes. DL algorithms have the potential to improve diagnostic accuracy while also assisting in reducing physician workload. In the meantime, some researchers use DL to estimate WCE's depth and motion. In WCE data, DL methodologies have demonstrated great potential and will be of great assistance to future WCE technology and enhancing this technology [7]. In this paper, we introduce the ILRC mechanism designed to optimize the training of DL models. The ILRC adaptively adjusts the LR based on the progress of the training process, which improves the speed of convergence and decreases the likelihood of overfitting. We tested this mechanism on various DL models, including EfficientNet-B0, ResNet101v2, InceptionV3, and InceptionResNetV2. Furthermore, we enhanced the model layers in conjunction with traditional transfer learning, freezing layers, fine-tuning techniques, residual learning, and modern regularization methods. As a result, the four models achieved better accuracy than other advanced models while requiring fewer parameters and FLOPs. These models were fine-tuned using the Kvasir-Capsule and KVASIR v2 datasets, which consist of images obtained from WCE. To tackle the problem of the class imbalance of the Kvasir-Capsule dataset, we implemented an under-sampling technique to ensure an even distribution of images across classes. In addition, we applied a data augmentation technique (over-sampling) to generate additional WCE images from existing ones, effectively increasing the size of the two datasets. This technique involved modifying the values of five attributes of the existing WCE images. Moreover, we scaled the resolution of the dataset images to 336 \(\times\) 336 pixels and normalized the contrast of the images. The models--EfficientNet-B0, ResNet101v2, InceptionV3, and InceptionResNetV2-- exhibited outstanding performance compared to the current state of the art, achieving accuracies of 99.906%, 98.765%, 98.312%, 99.344%, and 99.719%, respectively, on the Kvasir-Capsule dataset. Additionally, they achieved accuracies of 97.770%, 97.375%, 98%, 98.0625%, and 98.062%, respectively, on the Kvasir-v2 dataset. The integration of the ILRC, traditional transfer learning, freezing layers, fine-tuning techniques, residual learning, and modern regularization methods in our proposed models offers a robust solution for automating the detection of GI abnormalities in WCE images, thereby improving diagnostic efficiency and accuracy in clinical settings. Below is a summary of this research's contributions:  
1. We introduced the ILRC mechanism designed to optimize the training of DL models. The ILRC adaptively adjusts the LR based on the progress of the training process, which improves the speed of convergence and decreases the likelihood of overfitting. 2. The integration of the ILRC, traditional transfer learning, fine-tuning techniques, residual learning, and modern regularization methods for the EfficientNet-B0, ResNet101, ResNet101v2, InceptionV3, and InceptionResNetV2 models offers a robust solution for automating the detection of GI abnormalities in WCE images, thereby improving diagnostic efficiency and accuracy in clinical settings. 3. We lowered the parameter cost by truncating or compressing layers and partially freezing some layers. 4.