Due to the complex background information and excessive interference information, the detection accuracy of optical melanoma images collected by dermoscope is low, and there are some problems such as false detection and missing detection. Therefore, an optical melanoma image detection algorithm based on heavy parametric large nuclear convolution is proposed. Firstly, a new module C3_RepLK, which combines large nuclear convolution with C3, is designed in the backbone to increase the receptive field of the model and extract more effective information. Secondly, the receptive field module RFB is introduced to fuse the feature information of different scales to reduce the problem of error detection. Mixed dense and sparse convolutional GSConv and lightweight upsampling operator CARAFE are used in the neck network, which enables the network to capture rich context information and suppress the problem of missing detection. Finally, the second-order channel attention module SOCA is incorporated into the algorithm to strengthen the correlation between features and focus on more useful features. Experiments show that compared with the original YOLOv5 algorithm, the average accuracy of all categories is improved from 85.0% to 89.4%, which proves the effectiveness of the proposed algorithm in detecting melanoma.