Identifying skin diseases by using digital images of skin that are also automated, efficient, and accurate is essential for biomedical image analysis. Many researchers have developed numerous machine-learning techniques for the prediction and diagnosis of various diseases that help clinicians identify infections early and provide crucial data for virus management. In this work, we use the inherent attributes of PSO, such as exploration and exploitation, to identify images for monkeypox virus prediction and diagnosis. Alongside, monkeypox, chickenpox, smallpox, cowpox, measles, tomato flu, and normal skin images were all considered in this study for monkeypox virus prediction and diagnosis. We collect photos from the International Skin Imaging Collaboration (ISIC) for analysis and experimentation purposes. Finally, we compare the proposed model PSOMPX for monkeypox virus identification with four distinct pre-trained deep learning models (e.g., VGG16 [29], ResNet50 [29], InceptionV3 [31], and Ensemble [30]), and the classifier hidden Markov model along with the GLCM-SVM is used in the diagnostic test to separate monkeypox skin lesions from other skin infections. The four performance evaluation metrics—accuracy, precision, recall, and F1 score—evaluate the model and analyze the outcomes of experiments. Finally, the experimental results obtained through the PSOMPX model significantly outperformed other models due to its numerous traits, with a total accuracy of 90.01% (F1-Score: 85.87%) achieved.