This paper focuses on addressing the urgent need for efficient and accurate automated screening tools for COVID-19 detection. Inspired by existing research efforts, we propose two framework models to tackle this challenge. The first model combines a conventional CNN architecture as a feature extractor with XGBoost as the classifier. The second model utilizes a classical CNN architecture with a Feedforward Neural Network for classification. The key distinction between the two models lies in their classification layers. Bayesian optimization techniques are employed to optimize the hyperparameters of both models, enabling a “cheat-start” to the training process with optimal configurations. To mitigate overfitting, transfer learning techniques such as Dropout and Batch normalization are incorporated. The CovidxCT-2A dataset is used for training, validation, and testing purposes. To establish a benchmark, we compare the performance of our models with state-of-the-art methods reported in the literature. Evaluation metrics including Precision, Recall, Specificity, Accuracy, and F1-score are employed to assess the efficacy of the models. The hybrid model demonstrates impressive results, achieving high precision (98.43%), recall (98.41%), specificity (99.26%), accuracy (99.04%), and F1-score (98.42%). The standalone CNN model exhibits slightly lower but still commendable performance, with precision (98.25%), recall (98.44%), specificity (99.27%), accuracy (98.97%), and F1-score (98.34%). Importantly, both models outperform five other state-of-the-art models in terms of classification accuracy, as demonstrated by the results of this study.