# Privacy-Preserved Visual Simultaneous Localization and Mapping Based on a Dual-Component Approach
## 3 Method
### Image Inpainting  
#### 3.2.1 Network Model  
The method consists of two networks: YOLOv8, and EdgeConnect. The former utilizes multi-size feature fusion to identify privacy-sensitive areas in images, and the latter utilizes two-stage image generation to inpaint those privacy-sensitive areas.  
The structure of YOLOv8 is shown in Figure 2. Inspired by the cross-stage partial (CSP) idea [24], the backbone network implements the Feature Pyramid Network (FPN) concept and consists of six components: P1 through P5, along with a Spatial Pyramid Pooling Fast (SPPF) module. P1 incorporates a CBS convolution module, while the subsequent four components feature both a CBS convolution module and a C2f residual module. These five components gradually reduce the spatial resolution of the input image, while  
Figure 1: Structure of our dual-component approach.  
increasing the number of feature channels. As a result, YOLOv8 can obtain feature maps at various resolutions.  
Following the processing of these components, the SPPF module extracts and encodes features from images at different scales. Additionally, it resizes input images of any size to a fixed size, generating a fixed-length feature vector. This backbone network conveys strong semantic features in a top-down manner and aggregates feature maps across different scales for multi-scale feature fusion.  
In the neck component of the network, YOLOv8 utilizes the Path Aggregation Network (PAN) concept, which combines features of varying resolutions through concatenation and upsampling. This approach enhances the bottom-up transmission of robust localization features and facilitates further multi-scale feature fusion. Consequently, this multi-scale feature fusion enables YOLOv8 to detect objects of various sizes, ranging from individuals to vehicles. Finally, YOLOv8 utilizes three detection heads to analyze images at different resolutions, allowing for the effective identification of privacy-sensitive objects.  
As illustrated in Figure 3, EdgeConnect comprises two generative adversarial networks (GANs), namely, EdgeGenerator and InpaintGenerator. These networks are designed to predict contours and inpaint privacy-sensitive areas detected by YOLOv8, respectively. Each network consists of a generator and a discriminator.  
The generator is primarily divided into three components: the encoder, residual module, and decoder. In the encoder, the spatial resolution of the image is downsampled twice through three convolutional layers, effectively extracting various features from the image. The residual module includes eight ResNet residual blocks, which enhance the model's feature extraction capability, ensuring that the deep network retains more information. Subsequently, the decoder performs upsampling through two deconvolution modules to restore the image to its original resolution. Additionally, by employing upsampling in conjunction with instance normalization, the decoder achieves a balance between global information and local details, thereby improving the quality of both edge and image generation.  
Notably, both the convolutional and residual blocks in EdgeGenerator incorporate Spectral Normalization to enhance the stability of the generated edges. The discriminator utilized is a \(70\times 70\) PatchGAN [27], which assesses whether overlapping image blocks of size \(70\times 70\) are real.  
Figure 3: Architecture of EdgeConnect [26].  
Figure 2: Architecture of YOLOv8 [25].