COVID-19 has been spread around the world and has caused a huge number of deaths. Early detection of this disease is the most efficient way to prevent its rapid spread. Due to the development of internet technology and edge intelligence, developing an early detection system for COVID-19 in the medical environment of the
Internet of Things (IoT)
can effectively alleviate the spread of the disease. In this paper, a detection algorithm is developed, which can detect COVID-19 effectively by utilizing the features from
Chest X-ray (CXR)
images. First, a pre-trained model (ResNet18) is adopted for feature extraction. Then, a
discrete social learning particle swarm optimization
algorithm
(DSLPSO)
is proposed for feature selection. By filtering redundant and irrelevant features, the dimensionality of the feature vector is reduced. Finally, the images are classified by a
Support Vector Machine (SVM)
for COVID-19 detection. Experimental results show that the proposed algorithm can achieve competitive performance with fewer features, which is suitable for edge computing devices with lower computation power.