The study investigates skin cancer classification using multispectral imaging and autofluorescence photobleaching combined with a multihead neural network. This method addresses the challenge of high dimensionality of data and subtle differences between melanoma and non-melanoma tissues. It uses a proprietary multispectral data set enriched with tabulated autofluorescence photobleaching data. Each head of the network uses a different loss function to optimize specific parts of the classification, and the network learns simultaneously from multiple data modalities. Final classifications are created by averaging the outputs of all heads. The results show a significant improvement in accuracy and durability compared to single-head models. The approach achieves an AUC-PR score of 0.850 ± 0.032 on the proprietary dataset and 0.822 ± 0.022 on the ISIC dataset.