{'fraction_non_alphanumeric': 0.014828544949026877, 'fraction_numerical': 0.0, 'mean_word_length': 5.101694915254237, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Feature Variance Loss: A Loss Function for Semantic Segmentation using Feature Space Distance

Semantic segmentation is a task that classifies all pixels in an image. In terms of the classification task, the segmentation network uses convolutional neural network(CNN) to extract the feature vectors of all pixels and infer which class they are. Pixels that correspond to the same class from the perspective of contrastive learning should have similar feature vectors extracted. Using the assumption that similar feature vectors should be extracted in the same class, we propose a Feature Variation(FV) loss function that induces the corresponding feature vectors of the same class to have similar values. This FV loss induces features extracted from the same class to be located closely in the feature embedding space. The proposed FV loss can be applied model-agnostic by adding it to the existing segmentation network. As demonstrated in the paper, the proposed FV loss improves the performance of the segmentation by inducing the feature vector of the same class to be closer.