Skin cancer, which can be lethal, is essentially the improper proliferation of skin tissues. It has recently developed into one of the most dangerous sorts of additional malignancies in humans. Early detection may help the patient endure. Skin cancer is notoriously difficult to detect. Currently, computer vision performs incredibly well when used to diagnose medical images. Along with technological development and the rapid rise in computer accessibility, several machine learning algorithms and deep learning algorithms have been developed for the interpretation of medical images, especially images of skin lesions. According to our paper, there are five fast-ai CNN pre-trained models with various image pre-processing techniques that enhance the classification capability of skin lesions and make them more precise than other existing models. The HAMIOOOO dataset’s benign and malignant cancer lesions are distinguished by utilizing a number of pre-processing methods. The experimental findings showed that the suggested model improved its accuracy to 97% in both training and testing.