# A Semantic Segmentation Algorithm Using FCN with Combination of BSLIC
## 3 Proposed Algorithm
### Superpixel Semantic Annotation  
Based on the framework mentioned above, superpixel semantic annotation (Algorithm 1) combines the FCN pixel-level classification map and the BSLIC superpixel segmentation map, and it finally gets the revised semantic segmentation result.  
The core of the Superpixel semantic annotation is the four criteria, which can simplify the process of analyzing and calculating. According to the four criteria, the combination of FCN and BSLIC can be classified into four situations. Based on this simple and complete classification, the corresponding solutions are designed to combine FCN and BSLIC. All the four criteria are described as follows:  
Figure 3: Flow chart of image semantic segmentation algorithm based on FCN and BSLIC.  
* _Criterion 1:_ Situation: there is no image edge in the superpixel, and the FCN semantic of all pixels are the same; Solution: use the FCN pixel-level classification map to label all the pixels in this superpixel.
* _Criterion 2:_ Situation: there is no image edge in the superpixel, but the FCN semantic of the pixel is different; Solution: use the category of the largest proportion \(C_{t}(t=0,\ 1,\ 2,\ 3,\ldots)\) to label all of the pixels in this superpixel.
* _Criterion 3:_ Situation: there are image edges in the superpixel, but the FCN semantic of all the pixels are the same; Solution: use the FCN pixel-level classification map to label the pixels in this superpixel.
* _Criterion 4:_ Situation: there are edges in the superpixel, and the FCN semantic of the pixels are different. Solution 1: if there is any proportion \(C_{t}\) more than 80%, and then label all of the pixels in this superpixel as the category of the largest proportion \(C_{t}\).  
Solution 2: if there is no proportion \(C_{t}\) more than 80%, then maintain the FCN pixel-level classification result.  
As shown in Figure 4, an example of superpixel semantic annotation is given to explain how to use the four criteria. Based on the superpixel segmentation map (Figure 4a) obtained by BSLIC, the detailed explanation is discussed as follows.  
In Figure 4b, the situation of superpixel \(Sp_{219}\), which is the local area of the aeroplane, meets criterion 1. The pixels of superpixel \(Sp_{219}\) (447 pixels) are labeled as aeroplane (category 1) in the FCN pixel-level classification map, so the pixels in this superpixel can be labeled as aeroplane directly.  
In Figure 4c, the situation of superpixel \(Sp_{400}\), which is the junction of wing and background, meets criterion 2. FCN model labels 75.5% of the pixels in the superpixel as background, and labels 24.5% of the pixels as aeroplane. Therefore, the classification of the pixels in this superpixel is background.  
In Figure 4d, the situation of superpixel \(Sp_{178}\), which is the area of fuselage, meets criterion 3. FCN model labels the pixels in this superpixel as aeroplane. Therefore, the pixels in this superpixel can be labeled as aeroplane directly.  
In Figure 4b, the situation of superpixel \(Sp_{233}\), which is the fuzzy edge of the image, meets criterion 4. 499 pixels (91.6%) in this superpixel are labeled by FCN as background. Consequently, the superpixel can be labeled as background directly.  
Figure 4: Example of superpixel semantic annotation. (**a**) The superpixel segmentation map; (**b**) region 1 in (**a**); (**c**) region 2 in (**a**); and, (**d**) region 3 in (**a**).