Utilising Fastai and PyTorch, a deep learning model for classifying lung cancer was created. The model, which is based on the ResNet-30 architecture, was trained using a dataset that included the classes \"lung_aca,\" \"lung_n,\" and \"lung_scc.\" Rotation and scaling were added to the dataset as enhancements. The training and validation sets each had 30 samples, and the model attained a high level of accuracy. Loss plots were employed to display the outcomes and the Fastai library was utilised for simple model construction and training. The Fastai and PyTorch versions of this model have been modified for best performance, and it is a potent tool for precise lung cancer categorization.
Introduction
I. INTRODUCTION
The need for early detection and accurate categorization for efficient treatment options makes lung cancer a severe global health concern. In answer to this requirement, we provide a deep learning model specifically designed for the categorization of lung cancer. The ResNet-34 architecture, which is recognised for its skill in picture classification tasks, forms the basis of the model, which also makes use of the Fastai framework and PyTorch. Our study is focused on creating an accurate and dependable classification system for lung cancer that can distinguish between the three key subtypes of lung cancer: adenocarcinoma, normal lung tissue, and squamous cell carcinoma ('lung_aca'). We enable the model to generalise successfully, reducing overfitting problems and improving its performance on various medical pictures by upgrading the dataset using techniques like rotation and scaling.
To thoroughly evaluate the model's performance, the dataset meticulously divided 30 samples into training and validation sets. We carefully track critical variables like accuracy and loss during the training process. Loss plots are also used to visualise training progress and provide insights into the dynamics of the model's learning. Our model is positioned as an effective method for classifying lung cancer due to the combination of deep learning capabilities, the user-friendly Fastai library, and the reliable PyTorch platform. It has the potential to greatly enhance clinical outcomes and patient care by assisting medical practitioners in establishing accurate and fast diagnoses. The efficiency of the model in classifying lung cancer is demonstrated in the next sections, which go into further detail on the model architecture, training approach, and thorough findings.
II. RELATED WORK
In recent years, significant advancements have emerged in the domain of cancer categorization and detection. Innovative techniques have been proposed to enhance cancer categorization and diagnostic approaches. For instance, a deep learning-based automated classification method has been introduced for lung tumor cytological images [1]. Another study harnessed deep neural networks to accurately classify histologic patterns in lung cancer slides obtained from excised tumors, achieving pathologist-level accuracy [2]. Furthermore, artificial neural networks (ANN) have demonstrated their efficacy in accurately classifying and predicting lung cancer using machine learning and image processing techniques [3]. Additionally, variations of the ResNet-18 model have been utilized to identify colorectal cancer in images of colon glands [4].
Unique methods for cancer detection and classification have also been proposed. Some researchers utilized the Dark-Net19, SVM, equilibrium optimizer, and manta ray foraging optimization algorithms to recognize disease types in images of lung and colon cancer [5]. Another method, known as FPSOCNN, was developed, which employs cutting-edge feature extraction techniques to detect and classify lung cancer [6]. In another approach, logistic regression was enhanced using a brute force technique, resulting in improved ROC curves and greater precision in distinguishing between malignant and benign tissue [7]. Moreover, some studies have explored the relationship between lung cancer and concurrent colon cancer [8].
In addition to cancer classification, models for the automatic identification of COVID-19 patients from chest X-ray images have been developed, such as DeepCoroNet and COVIDDetectionNet [9,10]. Finally, methods for the automatic detection of endometrial cancer have been introduced, utilizing hysteroscopic images and deep learning, including neural networks like Xception, MobileNetV2, and EfficientNetB0 [11,12]. Collectively, these investigations underscore the potential of machine learning and deep learning techniques in advancing cancer detection and classification.
III. PROPOSED METHOD
A. Augmentation and Preprocessing of Data
Included classes like "lung_aca," "lung_n," and "lung_scc" in the organisation and labelling of collection of lung cancer images. Preprocessing on the input images may entail resizing, normalisation, or other essential transformations to get the images ready for more processing. augmentation is used to produce different versions of the images by applying random transformations like rotation, flipping, and zooming. This improves the training set's diversity and strengthens the model's foundation.
D. Unfreeze and Find Learning Rate
To enable fine-tuning of all layers, not just the classifier layer, the model's layers have been unfrozen. The learning rate finder, which assists in determining an appropriate learning rate while training the model, is used to determine the optimal learning rate.
E. Model Training
The model is trained using the one-cycle policy across a constrained number of epochs (in this case, two epochs).This entails training with a learning rate that initially starts out low, rises, and then falls once more.
F. Evaluate Model
After training, the model's accuracy and other important parameters, its performance is assessed on the set of validation data.
G. Results
The model's predictions are interpreted using the Classification Interpretation class from Fastai. This allows us to analyze the top losses and confusion matrix to understand where the model made the worst predictions and which classes were most misclassified. It gives the output as the image and to which class the image belongs with the probability.
IV. DISCUSSIONS
A. Model Architecture
Built a classifier using a pre-trained ResNet34 model. Transfer learning was used, which allowed us to modify the model for our particular job. The three subtypes of lung cancer were accommodated in the final categorization layer.
The essential equation for transfer learning is:
α_finetuned = α_pretrained+? α_custom
where
α_finetuned is a fine-tuned model parameter.
α_pretrained is pre-trained model parameter.
? α_custom is the custom classification layer parameter.
The categorization of lung cancer subtypes using the model used in this study, which used Fastai and the ResNet34 architecture, had an extraordinary accuracy rate of 98%. Its potential clinical value is shown by its accuracy and the absence of misclassifications as seen in the confusion matrix. This degree of performance demonstrates the model's ability to help doctors accurately classify lung cancer subtypes, a crucial step in choosing the best treatment options and enhancing patient outcomes. Furthermore, the model's dependability in real-world circumstances is suggested by its robustness, which is demonstrated by its reliable and consistent predictions. Beyond its effectiveness in this particular assignment, this model establishes a positive precedent for AI-driven diagnostic tools in medical picture analysis, opening the door for other applications in the healthcare industry. These results are encouraging, but more investigation is needed to determine the model's performance on bigger datasets and its interpretability in order to increase its therapeutic usefulness.
B. Results
The results of the model include loss vs learning rate graph, accuracy and confusion matrix.
Conclusion
Fastai and ResNet are used in a deep learning method to categorize three kinds of lung cancer. When comparing lung_aca, lung_n, and lung_scc, the model demonstrated encouraging results. In the area of medical image analysis for cancer detection, this study advances current attempts to use AI.
References
[1] Atsushi Teramoto, Tetsuya Tsukamoto, Yuka Kiriyama, Hiroshi Fujita, \"Automated Classification of Lung Cancer Types from Cytological Images Using Deep Convolutional Neural Networks\", BioMed Research International, vol. 2017, Article ID 4067832, 6 pages, 2017.
[2] Wei, J.W., Tafe, L.J., Linnik, Y.A. et al. Pathologist-level classification of histologic patterns on resected lung adenocarcinoma slides with deep neural networks. Sci Rep 9, 3358 (2019).
[3] Sharmila Nageswaran, G. Arunkumar, Anil Kumar Bisht, Shivlal Mewada, J. N. V. R. Swarup Kumar, Malik Jawarneh, Evans Asenso, \"Lung Cancer Classification and Prediction Using Machine Learning and Image Processing\", BioMed Research International, vol. 2022, Article ID 1755460, 8 pages, 2022.
[4] Devvi Sarwinda, Radifa Hilya Paradisa, Alhadi Bustamam, Pinkie Anggia, Deep Learning in Image Classification using Residual Network (ResNet) Variants for Detection of Colorectal Cancer, Procedia Computer Science,Volume 179, 2021, ISSN 1877-0509.
[5] Mesut To?açar, Disease type detection in lung and colon cancer images using the complement approach of inefficient sets, Computers in Biology and Medicine, Volume 137, 2021.
[6] A. Asuntha and Andy Srinivasan. Deep Learning for lung cancer detection and classification. Multimed Tools Appl 79, 7731–7762 (2020).
[7] L. Khairaunnahar, M.A. Harib, R.H. Bin Rezanur, M.S. Islams, and M.K. Classification of malignant and benign tissue with logistic regression, Informatics in Medicine Unlocked, Volume 16, 2019.
[8] Kurishima, K., Miyazaki, K., Watanabe, H., Shiozawa, T., Ishikawa, H., Satoh, H., & Hizawa, N. (2018). Lung cancer patients with synchronous colon cancer. Molecular and Clinical Oncology, 8, 137-140.
[9] Fatih Demir, DeepCoroNet: A deep LSTM approach for automated detection of covid19 cases from chest X-ray images, Applied Soft Computing, Volume 103, 2021.
[10] Turkoglu, M. COVIDetectioNet: COVID-19 diagnosis system based on X-ray images using features selected from pre-learned deep features ensemble. Appl Intell 51, 1213–1226 (2021).
[11] Takahashi, Y., Sone, K., Noda, K., Yoshida, K., Toyohara, Y., Kato, K., Inoue, F., Kukita, A., Taguchi, A., Nishida, H., Miyamoto, Y., Tanikawa, M., Tsuruga, T., Iriyama, T., Nagasaka, K., Matsumoto, Y., Hirota, Y., Hiraike-Wada, O., Oda, K., . . . Fujii, T. (2021).
[12] S. Wang, T. Wang, L. Yang, D.M. Yang, J.Fujimoto, F. Yi, X. Luo, S. Lin, C. Moran, J. Minna, Y. Xie and G. Xiao, VonvPath: A software tool for lung adenocarcinoma digital pathological image analysis aided by a convolutional neural network, 2019, PMID: 31767541 PMCID: PMC6921240 DOI:10.1016/j.ebiom.2019.10.033.