The carbon residue formed from calcination of flame retardant materials is crucial to evaluate their performance and ensure quality control. The complex shape and texture variations of the charcoal dross make traditional segmentation methods difficult to perform accurately. We propose an enhanced SwinUNet method to achieve more precise segmentation of the charcoal residue region in flame retardant materials. Improvements involve adapting the original encoder to utilize a convolutional approach and adding a transformer to the skip connection for processing the feature map. Annotate images are fed into an encoder based on a convolutional neural network to extract features, which are then up-sampled in a Swin Transformer-based decoder and connected with shallow feature maps of different scales produced during the encoding phase. Finally, the improved SwinUNet method is compared to several classical image segmentation methods. The results demonstrate significant outperformance of the remaining methods with about a 2% improvement over SwinUnet on Dice. These findings offer an effective tool and guidance for evaluating the performance of flame retardant materials.