# Packaging Design Image Segmentation Based on Improved Full Convolutional Networks
## 3 Methods and Materials
### FCN-Based Superpixel Assisted ISS Model  
In response to packaging design issues, this paper proposes an ISS model with FCN. In packaging design, small elements such as trademarks, text, patterns, etc., may not occupy a large area in the image, but they are crucial for conveying brand information and attracting consumer attention. However, in existing deep learning models, small target elements are easily difficult to accurately identify due to loss of details when performing continuous pooling and convolution operations [17; 18]. Therefore, this study first introduced superpixel technology to assist the FCN ISS model. Superpixel technology is an image segmentation algorithm that divides an image into multiple regions with strong homogeneity and clear boundaries, which are called superpixels. Figure 1 illustrates the process of the FCN with superpixel-assisted ISS model. In Figure 1, the model first uses FCN to perform preliminary semantic segmentation on the entire image. Although this step can identify large targets in the image, the recognition  
Figure 1: The Flow of Superpixel-Assisted ISS Model Based on FCN. of small targets is not accurate enough. Therefore, after obtaining preliminary segmentation results, the model further extracts the position information of small targets and uses superpixel technology to segment the original image, generating more detailed region divisions. Superpixel technology can better preserve the local features and boundary information of images. The model performs a detailed internal review of the superpixel region where each small target is located, recording and analyzing the distribution of category labels of pixels within the region [19; 20]. By identifying the most concentrated categories within the region, the model can provide more accurate semantic labels for these small targets, effectively improving the granularity and accuracy of segmentation [21; 22]. According to the above process, this study divided the model into three modules and conducted detailed functional design, namely the preliminary semantic segmentation and large target recognition module, the superpixel-assisted small target precise positioning module, and the small target semantic label refinement module. There are four steps in the preliminary semantic segmentation and large-object recognition module. The first step is for the model to extract semantic features and perform preliminary semantic segmentation on the input image using FCN. Key semantic features in the image are captured. Subsequently, through deconvolution operations, the model integrates feature maps of different levels to enhance the expressiveness of features. The second step is to optimize the segmentation results, which involves thresholding the segmentation results from the first step and converting them into binary images, where each pixel is divided into foreground or background based on the set threshold. The third step is target contour recognition, as shown in Figure 2.  
In Figure 2, the process of target contour recognition first requires determining the grayscale values of pixel points and their neighborhoods to identify contour points and then extracting contour information from the binary image. Next, the findContours function of OpenCV is used for global contour search, and the coordinates and sequence numbers of each contour are recorded. For each contour, the ContourArea function is used to calculate its area, and whether it is a small target is determined. Subsequently, the contour coordinates of the small target are obtained, and an external matrix containing all contour pixels is constructed. Furthermore, by determining whether the pixels inside the external matrix are within the contour, the boundaries of small targets are accurately located. Finally, the coordinates of these pixel points are output, and the recognition of small target contours is completed. The fourth step of the module is target localization.