COVID‐19 has had a profound global impact, necessitating the development of infection detection systems based on machine learning. This paper presents a Multi‐task architecture that addresses the classification and segmentation tasks for COVID‐19 detection. The model comprises an encoder for feature representation, a decoder for segmentation, and a multi‐layer perceptron for classification. Evaluations conducted on two datasets demonstrate the model's performance in both classification and segmentation. To enhance efficiency and diagnosis accuracy, CT‐scan images undergo pre‐processing using image processing algorithms like histogram equalization, median filtering, and mathematical morphology operations. The combination of the median filter pre‐processing and the proposed model yields impressive results in the classification task, achieving high accuracy, sensitivity, and specificity, with values of 0.97, 0.97, and 0.96, respectively, for dataset 1, and 0.96 in mentioned metrics for dataset 2. For segmentation, the proposed model, particularly with the average morphology pre‐processing, exhibits excellent performance with high accuracy, low mean squared error, high peak signal‐to‐noise ratio, high structural similarity index, and a mean dice coefficient of 88.86 ± 0.05 for dataset 1, and 87.97 ± 0.02 for dataset 2. Furthermore, the pre‐trained models consistently demonstrate the superiority of the median filter and proposed model in the classification task on the same datasets. In conclusion, the proposed multi‐task model, incorporating image processing techniques, achieves remarkable results in both classification and segmentation. The utilization of pre‐processing algorithms and the multi‐task framework significantly contribute to superior performance metrics. This study encourages further exploration of combining diverse image processing algorithms to advance infection diagnosis and treatment.