.The worldwide spread of the coronavirus disease 2019 (COVID-19) has had a significant impact on healthcare systems globally. Timely and accurate diagnosis is crucial for controlling and preventing outbreaks. Computed tomography (CT) has been demonstrated as an effective diagnostic tool for COVID-19. Deep learning techniques have been applied in related fields to solve relevant problems. Normally, they achieve good performance on large datasets directly. However, due to the need to protect patient privacy and the sudden outbreak of the epidemic, the amount of publicly available CT data is insufficient for utilizing these methods. In addition, some natural images, which are used for model pre-training, are quite different from chest CT images, causing some inevitable errors. To address these issues, a targeted self-supervised attention network based on an improved inception ResNet called SIRANet is proposed. SIRANet incorporates a self-supervised learning method during the pre-training process and introduces a attention module to improve feature selection and focus on key informative features. Moreover, a transfer learning-based strategy for COVID-19 detection is presented and experiments are conducted on three widely used datasets, including ImageNet, an unlabeled chest CT dataset, and a COVID-19 CT dataset. Experimental results show that SIRANet outperforms other state-of-the-art techniques in terms of accuracy, precision, recall, and f1-score, demonstrating its effectiveness in capturing key informative features from unlabeled and labeled images. The implementation of SIRANet is available at https://github.com/Xiiin6/COVID-19.