Journal of Sensors
Volume 2021 (2021), Article ID 9699110, 7 pages
https://doi.org/10.1155/2021/9699110

Research Article

Application of Image Style Transfer Technology in Interior Decoration Design Based on Ecological Environment

Shan Liu,¹ Yun Bo,¹ and Lingling Huang²

¹Design Art College, Xijing University, Xi’an Shaanxi 710123, China
²Public Art Department, Xi’an Academy of Fine Arts, Xi’an Shaanxi 710065, China

Correspondence should be addressed to Shan Liu; 249838340@qq.com

Received 11 September 2021; Revised 9 October 2021; Accepted 26 October 2021; Published 25 November 2021

Academic Editor: Mu Zhou

Copyright © 2021 Shan Liu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

With the further development of the social economy, people pay more attention to spiritual and cultural needs. As the main place of people’s daily life, the family is very important to the creation of its cultural atmosphere. In fact, China has fully entered the era of interior decoration, and people are paying more and more attention to decorative effects and the comfort and individual characteristics of decoration. Therefore, it is of practical significance to develop the application of decorative art in interior space design. However, the transfer effect of current interior decoration art design tends to be artistic, which leads to image distortion, and image content transfer errors are easy to occur in the process of transfer. The application of image style transfer in interior decoration art can effectively solve such problems. This paper analyzes the basic theory of image style transfer through image style transfer technology, Gram matrix, and Poisson image editing technology and designs images from several aspects such as image segmentation, content loss, enhanced style loss, and Poisson image editing constrained image spatial gradient. The application process of style transfer in interior decoration art realizes the application of image style transfer in interior decoration art. The experimental results show that the application of image style transmission in interior decoration art design can effectively avoid the contents of the interior decoration errors and distortions and has a good style transfer effect.

1. Introduction

The purpose of interior decoration is to meet the needs of contemporary people for social activities and the urgent needs of daily life and to create a beautiful, comfortable, and convenient indoor living environment, which has gradually become a kind of comprehensive art in modern society [1]. The interior decoration industry has now become a rising and popular industry, which has also produced many interior decoration design companies. Contemporary interior decoration design has evolved from product design to culture, environment, and atmosphere design. Regarding the interior decoration art design, there are also many studies at home and abroad, including the original and simple table and chair layout, the ancient magnificent architectural interior layout, and the current home style design [2].

Nowadays, a single household style can not meet the needs of people’s life and, people began to pursue higher quality, more free household style design. Therefore, it is very necessary to apply image style transfer technology to modern interior decoration art design [3]. Using two different styles of image migration to complete the interior decoration migration effect map, people can more intuitively understand the aesthetics of interior decoration art and then choose the interior decoration art design that suits them and satisfies their needs. The soul of the traditional art of ethnic minorities in China is fully reflected in the decoration of traditional buildings [4]. Although time has changed, traditional architectural art still has the value of eternal inheritance, and it will have a great influence on the interior and exterior decorative arts of current buildings as the role of inspiration and reference. As China gradually enters the postindustrial era, in essence, the material foundation has reached a certain level, characterized by the acceleration and strength of the service economy. Therefore, people’s appreciation standards for architectural art are also getting higher and higher. The single modern decorative art with modernism as the main source of ideas has long been unable to meet people’s increasingly diversified indoor and outdoor decorative needs, so it is necessary to inherit the traditional architectural decorative art context of ethnic minorities and save the shortcomings of the development of modern decorative art. The method is to combine the traditional architectural decoration art of ethnic minorities with the innovative integration of modern indoor and outdoor decoration culture. With the visual and artistic characteristics of decorative materials, the visual expression methods of decorative materials and their role in interior design are specified [5]. Combined with the theories of indoor space artistic conception and artistic creation, the application of decorative materials is innovated. We take it as the material basis of interior design, propose several methods of decoration material innovation, use graphic combinations to create different layers, enhance the visual depth of space, and use texture conversion to create unexpected visual design effects. These methods are used to further enhance the innovation of interior design in artistic expression.

2. Materials and Methods

2.1. Image Style Transfer Technology

Different image styles are used to express the semantic content of images, and the way to complete the processing of images is the transfer of image styles [6]. The simple explanation is to display an ordinary image in another image style while preserving the central content and structure of the original image. For example, there are two images: one is a style image and the other is a content image [7]. Firstly, we must retain the content and structure images of all content, extract the main feature style of the image, then use the extracted features to complete the image reorganization of the original content, and finally transform the style image and content image into an image output image. Its structure is shown in Figure 1.

Figure 1: Image style transfer flow chart.

2.2. Gram Matrix

Image style transfer requires a content image to be converted and a style image. The correlation between the two image features is calculated through the Gram matrix, and the amount of each feature in the image is found to grasp the whole style of the image [8]. The mathematical form of Gram matrix calculation is

In practical application, Gram matrix is the inner product operation of matrix and can also be regarded as the eccentric covariance matrix between image features. In the interior decoration art feature image, each number represents the strength of a feature, and the elements on the diagonal of the Gram matrix precisely reflect the amount of each feature in the interior decoration art image, which helps better grasp the general style of interior decoration art. By using the difference between Gram matrices, we measure the difference between interior decoration art design images and realize the style transfer of interior decoration art design images [9].

2.3. Poisson Image Editing Technology

The image used for image style transfer is generally blurred. Logically speaking, a blurred image is an image with inconspicuous contours of the object and insufficient grayscale changes in the contour edges, resulting in a weak sense of hierarchy. If we want to generate a clear image, we need to calculate the rate of change of the image gray level and then obtain a clearer style transfer image. When completing the interior decoration art design, we must also pay special attention to not let the entire decoration look fuzzy. We need to find the “change rate of image grayscale” and then complete the pixel fusion of the source image and the target image. The schematic diagram of image pixel construction in the fusion area is shown in Figure 2.

Figure 2: Schematic diagram of image pixel construction in the fusion area.

In Figure 2, represents the source image gradient field, represents the interior decoration source image, represents the boundary of the image, represents the merged result of images other than , represents the area covered by the image, and represents the images within .

2.4. Research on Image Style Transfer in Interior Decoration Art

Because the style migration of interior decoration art design images has authenticity and complexity in content, it is necessary to maintain the consistency of the content and images during the migration process, and the style should also be consistent, so that no interior will be generated. Errors or distortions occur in the image content of decorative art design during the migration, which makes the effects of interior decorative art real and effective [10]. The realization process of style transfer is shown in Figure 3.

Figure 3: The application process of image style transfer in interior decoration art.

2.4.1. Image Segmentation

Due to the different styles of the interior decoration art design, the design styles are not consistent, so in the process of calculating the style loss of the entire interior decoration art image, the content of the art image will not be considered [11]. The texture of the interior decoration art design image will be mapped to an area that does not correspond to the texture semantics, and the image content could be different. The interior decoration art design style is directed to other parts of the image, the content of the style content image appears inconsistent with the style on the style image, and the content of the interior decoration art image and the content of the migration change do not match [12].

The image semantic segmentation method can be applied to complete the style transmission of similar semantic content in interior decoration art design images. First, it is divided into the input content image and style image, and then, the same type of interior decoration art design image is marked with the same mask color. Different colors are used for different categories of interior decoration art design images, which highlight the difference in style of each semantic category without causing losses. Then, the style image and content image are used as input images to substitute into the VGG-19 [13] network of the fully connected layer, and the basic features of each image at different levels are extracted to complete the migration between semantically equivalent subregions; thus, the mapping on each subregion can be unified [14].

2.4.2. Content Loss

For interior decoration art, we define its style image as , content image as and white noise image, input them into the VGG-19 network, and extract the style of interior decoration art image through low-level response. Responding to extract the content of the interior decoration art design image, the random white noise map is used as the initial input [15]. In this way, we can make up the content defect of the content feature map and the white noise feature map and get many feature maps under the action of the convolution layer and take conv3_2 and conv 4_2 layers as the content image of interior decoration art design. Images in interior decorative art design, similar to content image C [16] in content design, were generated. The average loss function is translated into the calculation of content loss; the calculation formula is

Among them, represents the convolutional layer, and represents the feature matrix of the image in the interior decoration art design.

Using the related theory of error direction propagation, the gradient value of the generated image in the interior decoration art design is calculated, and it is updated as the input image, so that the initial random image keeps changing until the content image appears the same response in the interior decoration art design network .

2.4.3. Enhanced Style Loss

The style of the image is expressed by the correlation between the features. The image style is the texture information, which refers to the calculation of the relationship between the features through the Gram matrix, thereby capturing the texture information of the interior decoration art design image. The conv2_1, conv1_1, conv4_1, conv3_1, and conv5_1 are used as image styles, and the white noise image gradient descent mode is used to match images similar to the image style [17]. Also, we mark the segmented image in another channel and use it as the input mode to form a style loss for each semantic category [18]. We use the segmentation channel to enhance the algorithm of the convolutional neural network and form the output image and loss of style between images through the calculation of the function:

Among them, represents the calculation method of the Gram matrix, that is, the inner product between interior decoration art design drawings, and represents the number of semantic segmentation mask categories in the interior decoration art design.

The loss function of the interior decoration art design image is

The loss function is minimized and the stylized image of interior decoration art design is obtained.

2.4.4. Poisson Image Editing Constrains Image Spatial Gradient

In order to generate a clear style transfer effect map in the interior decoration art design, the interior decoration art design image after stylization is used as input; then, the gradient field of the content image can be expressed as

While completing the constraints on the image spatial gradient, it also needs to meet

Based on the objective function of the spatial gradient constraint, the Poisson equation is established, which is expressed as

Among them, represents the relative weight between the control content image and the style image.

3. Results and Analysis

3.1. Experimental Dataset

For the application experiment of image style transfer in interior decoration art, we select the indoor scene dataset. The original dataset included a total of 22 million indoor scenes. The design style is the same as the modern interior scene.

This article studies the image style migration in the interior decoration art design. Therefore, we randomly select 10,000 indoor scenes of different styles from the 2200 indoor scenes as the pretraining dataset, pretrain the VGG-19 network model, obtain the model parameters, and construct a network model suitable for interior decoration art design scenes, saving model training time [19].

3.2. Analysis of Experimental Results

In the experiment process, using different types and scenes of interior decoration art design style images, through calculation, it can be obtained that the image style transfer effect is the best as , , and . In order to obtain a more satisfactory migration effect of the interior decoration art design style image, the experimental test needs to complete two rounds of iterations; each iteration number is 2000 times. Before the experimental test starts, we reextract the interior decoration art design image style so as to minimize the objective function [20].

In the process of precise segmentation of the semantic content of the interior decoration art design image, different color marks are generally used, and the mask operation method is used [21]. Masking refers to a baffle layer on the original layer. Through the change of the gray color value, the gray color value with a different transparency is formed and projected to different layers, so that the transparency of different parts of the layer can occur. The corresponding changes form the protection of the original picture content [22].

The specific steps are as follows: We import the style image in Photoshop, create a new blank layer in the Layers panel, fill it with a full color, make the background image consistent with the image style, select the Style image in the Layers panel, click the Add Layer Mask button, and change the selected mask’s foreground color and background color to black and white. Then, we select the brush tool to complete the drawing of the image of the same area in the style image, adjust the size of the brush, and modify the front and back background colors to draw the semantic content of the image. After the segmentation is performed, we mark the color that it is filled and finally fill the background layer with different colors repeatedly, until all the style content is marked with different colors and the segmentation is implemented, and the content image is also operated in the same way. The steps of style migration for interior decorative art design images are as follows.

Step 1. We input the interior decoration art design style image, interior decoration art design content image, and the segmented images of the two together into the trained VGG-19 network, complete the initialization of the white noise map of the image pixels, and input them into VGG-19 together in the network.

Step 2. In the conv3_2and conv4-2 layers of the VGG-19 network, we extract the content feature matrix of the interior decoration art design content image and calculate the content loss value between the image pixel white noise map and the content map.

Step 3. In the conv1_1 layer, conv2-1 layer, conv3_1 layer, conv4-1 layer, and conv5-1 layer in the VGG-19 network, we extract the style feature matrix of the interior decoration art design style image and divide the color-coded segmented image as another channel of image style transfer. After connecting all the segmentation channels, we calculate the enhanced style loss value of the image pixel white noise map and the style image.

Step 4. We calculate the total loss function of the interior decoration art design image used for training in terms of content loss and style loss.

Step 5. By training the interior decoration art design image, the white noise gradient of the image pixels can be reduced, thereby minimizing the total loss function. After multiple iterations of calculation, the total loss function is adjusted to obtain the stylized image of the interior decoration art [23]. Poisson image editing technology completes the gradient constraint on the programmed image and obtains the image style of interior decoration art design style and the image content migration effect of interior decoration art design content [24].

It can be seen from the migration results in Figure 4 that the content image corresponding to the kitchen art design scene (Figure 4(a)) belongs to the American style, the corresponding style image belongs to the modern minimalist style, and a good migration effect can be produced between the content image and the style image. The kitchen art design scene (Figure 4(b)) is to test the style conversion effect of interior decoration art design images with the same style and different content. The corresponding style images and content images are American styles, but they can still produce a good migration effect.

(a) Kitchens of different styles

(b) Kitchens of the same style

(c) Living room

(d) Restaurant

(e) Bedroom

Figure 4: The effect of image style migration of interior decoration art design.

The content image corresponding to the living room art design scene belongs to the modern style, and the corresponding style image belongs to the minimalist style. In this decorative art, the pictures on the wall can also complete the image style transfer, but the effect of the transfer depends on the interior decoration art design Image segmentation mark map. Restaurant art design scene corresponding content image belongs to European style, corresponding style image belongs to industrial style. After the image style is transferred, the color changes to fusion color. The content image corresponding to the bedroom art design scene belongs to the new Chinese style; the corresponding style image belongs to the retro style. Overall, the image style transfer effect is good, especially on the left wall of the bedroom art design scene, which achieves a very reliable image style transfer.

4. Conclusion

(1)This article proposes to introduce the image style transfer technology into the field of modern home style images for interior decoration design. The semantic content of modern interior decoration style design images is complex, the color is varied, and the layout is exquisite. In the field, a good image style transfer effect can be achieved, and the content of the content image and the style image can be effectively prevented from causing the migration overflow phenomenon(2)Image style transfer technology can effectively specify whether a semantic content needs to be transferred and maintain the authenticity of the image. Using Poisson image editing method to constrain the gradient of the image, we can obtain a clear migration image that meets the needs of modern home style design(3)The result of image transfer proves the effectiveness of image style transfer in interior decoration art. It shows that the image style transfer technology is very robust and can realize various art design scenes and various types of image style transfer in interior decoration. The application of image style transfer to interior decoration art can not only achieve a better transfer effect but also will not cause distortion of interior decoration art design images, showing good application prospect

Data Availability

The labeled dataset used to support the findings of this study is available from the corresponding author upon request.

Conflicts of Interest

The authors declare no competing interests.

Acknowledgments

This study is supported by the General Special Scientific Research Project of Shaanxi Provincial Department of Education: Research on the Innovative Application of Northern Shaanxi’s Folk Cloth and Pasting Art Elements in Modern Fiber Art under the Background of Traditional Cultural Renaissance (21JK0415).

References

R. M. Mcelhaney, “Algorithms for graphics and image processing,” Proceedings of the IEEE, vol. 71, no. 9, pp. 1116-1117, 1982.

M. van Heel, G. Harauz, E. V. Orlova, R. Schmidt, and M. Schatz, “A new generation of the IMAGIC image processing system,” Journal of Structural Biology, vol. 116, no. 1, pp. 17–24, 1996.

L. Alvarez, F. Guichard, P. L. Lions, and J. M. Morel, “Axioms and fundamental equations of image processing,” Archive for Rational Mechanics & Analysis, vol. 123, no. 3, pp. 199–257, 1993.

G. A. Mckinley, “An introduction to digital image processing,” Clinical Microbiology Newsletter, vol. 12, no. 12, pp. 89–92, 1990.

T. Gorji, E. Sertel, and A. Tanik, “Recent satellite technologies for soil salinity assessment with special focus on Mediterranean countries,” Fresenius Environmental Bulletin, vol. 26, no. 1, pp. 196–203, 2017.

R. P. Roesser, “A discrete state-space model for linear image processing,” IEEE Transactions on Automatic Control, vol. 20, no. 1, pp. 1–10, 1975.

N. C. Andreasen, G. W. Cohen, G. Harris, T. Cizadlo, and V. W. Swayze, “Image processing for the study of brain structure and function: problems and programs,” Journal of Neuropsychiatry, vol. 4, no. 2, pp. 125–133, 1992.

K. S. Kwan, A. C. Evans, and G. B. Pike, “MRI simulation-based evaluation of image-processing and classification methods,” IEEE Transactions on Medical Imaging., vol. 18, no. 11, pp. 1085–1097, 1999.

P. Salembier and L. Garrido, “Binary partition tree as an efficient representation for image processing, segmentation, and information retrieval,” IEEE Transactions on Image Processing, vol. 9, no. 4, pp. 561–576, 2000.

J. B. Heymann and D. M. Belnap, “Bsoft: image processing and molecular modeling for electron microscopy,” Journal of Structural Biology., vol. 157, no. 1, pp. 3–18, 2007.

A. C. Davies, H. Y. Jia, and S. A. Velastin, “Crowd monitoring using image processing,” Electronics & Communication Engineering Journal, vol. 7, no. 1, pp. 37–47, 1995.

M. Reuter and B. Fischl, “Avoiding asymmetry-induced bias in longitudinal image processing,” NeuroImage, vol. 57, no. 1, pp. 19–21, 2011.

S. Zhang, L. Yao, A. Sun, and Y. Tay, “Deep learning based recommender System,” ACM Computing Surveys, vol. 52, no. 1, pp. 1–38, 2019.

A. K. Jain, “Advances in mathematical models for image processing,” Proceedings of the IEEE., vol. 69, no. 5, pp. 502–528, 1981.

U. Veit and H. Moser, “Ecotoxicological test assays with macrophytes,” Fresenius Environmental Bulletin, vol. 12, no. 6, pp. 545–549, 2003.

I. Bloch, “Fuzzy spatial relationships for image processing and interpretation: a review,” Image & Vision Computing, vol. 23, no. 2, pp. 89–110, 2005.

A. Asher, W. A. Segal, S. A. Baccus, L. P. Yaroslavsky, and D. V. Palanker, “Image processing for a high-resolution optoelectronic retinal prosthesis,” IEEE Transactions on Biomedical Engineering, vol. 54, no. 6, pp. 993–1004, 2007.

W. Huber, “Ebimage—an R package for image processing with applications to cellular phenotypes,” Bioinformatics, vol. 26, no. 7, pp. 979–981, 2010.

U. Handmann, T. Kalinke, C. Tzomakas, M. Werner, and W. V. Seelen, “An image processing system for driver assistance,” Image & Vision Computing, vol. 18, no. 5, pp. 367–376, 2000.

P. C. Cosman, K. L. Oehler, E. A. Riskin, and R. M. Gray, “Using vector quantization for image processing,” Proceedings of the IEEE, vol. 81, no. 9, pp. 1326–1341, 2014.

J. Yang, J. H. Kim, K. Abdel-Malek, T. Marler, S. Beck, and G. R. Kopp, “A new digital human environment and assessment of vehicle interior design,” Computer-Aided Design, vol. 39, no. 7, pp. 548–558, 2007.

K. I. Lantitsou and G. D. Panagiotakis, “Thermal analysis of residencies based on solar design principles - a case study in Thessaloniki,” Greece. Fresenius Environmental Bulletin, vol. 26, no. 2, pp. 1254–1262, 2017.

C. L. Ruff and M. A. Olson, “The attitudes of interior design students towards sustainability,” International Journal of Technology & Design Education, vol. 19, no. 1, pp. 67–77, 2009.

C. Goksel, D. E. Mercan, S. Kabdasli, F. Bektas, and D. Z. Seker, “Definition of sensitive areas in a lakeshore by using remote sensing and GIS,” Fresenius Environmental Bulletin, vol. 13, no. 9, pp. 860–864, 2004.