Lung cancer is said to be a serious disorder if it develops in the lung tissue and is not treated in its early stages. Due to its size and shape, it is still complex to cure. The shape of this disease creates a challenge in identifying the healthy and unhealthy tissues. However, there were several existing techniques designed to treat lung cancer, but due to false positive rates and less visibility of tumor layers may create difficulties in identifying the cancer-affected area. Hence, recently Computer Tomography (CT) has been used to detect lung disease due to its image observations and high resolution of the lung layers. To identify lung cancer in its beginning stage and detect the disease automatically with accurate diagnosis, an effective algorithm is required. So, a novel model is developed to solve the issues found in diagnosing the diseases. CT images are required to provide an effective analysis in lung cancer detection. At first, for the segmentation process, the CT images from the various sources are gathered and get transferred. Here, the segmentation is performed using the Dilated Transformer Recurrent Residual U-Net (DTR2Unet++). It identifies the small lung nodules and provides high functionality for image segmentation. The Transformer network in the DTR2Unet++ model provides the flexibility to learn complex relationships between different image regions. Finally, the DTR2Unet++ provides accurate and effective segmented medical images as the outcome. Then, for the classification process, the segmented images are given to the RCNN-RA. This model can easily capture long-range dependencies and contextual informations within a sequence. Moreover, the parameters such as number of epoch, hidden neuro count, and activation function are optimized by the Arbitrarily Revised Beluga Whale Optimization (ARBWO) algorithm to maximize the False Emission Rate (FOR) and accuracy. By combining the strengths of RCNN with Region Attention (RA) and ARBWO, the developed ARCNN-RA mechanism provides an effective classification outcome. To assess the performance of the developed framework, various experiments are conducted over conventional recognition models. By considering the sigmoid activation, the accuracy of the existing VGG model is 77.28%, MobileNet is 90.19%, ResNet is 84.15%, and RCNN-RA is 93.32%, and accuracy of the introduced model is 97.22%. The performance measures such as False Positive Rate (FPR), Matthews Correlation Coefficient (MCC), Precision, Threshold (PT), Prevalence sensitivity, accuracy, specificity, dice coefficient, and Intersection over Union (IOU) are used by the developed model. These metrics provide a quantitative way to estimate the performance of the lung cancer diagnosis model. Hence, the developed ARCNN-RA model allows complexity reduction and early detection of lung malignancy in the classification of tumors. It is highly efficient in automated lung cancer diagnosis and also reduces the confines of the existing models.