CN113706645A - Information processing method for landscape painting - Google Patents

Information processing method for landscape painting Download PDF

Info

Publication number
CN113706645A
CN113706645A CN202110739036.1A CN202110739036A CN113706645A CN 113706645 A CN113706645 A CN 113706645A CN 202110739036 A CN202110739036 A CN 202110739036A CN 113706645 A CN113706645 A CN 113706645A
Authority
CN
China
Prior art keywords
landscape painting
image
image segmentation
landscape
segmentation unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110739036.1A
Other languages
Chinese (zh)
Inventor
周乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kuzhan Ningbo Creative Technology Co ltd
Original Assignee
Kuzhan Ningbo Creative Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kuzhan Ningbo Creative Technology Co ltd filed Critical Kuzhan Ningbo Creative Technology Co ltd
Priority to CN202110739036.1A priority Critical patent/CN113706645A/en
Publication of CN113706645A publication Critical patent/CN113706645A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The information processing method for landscape painting comprises the steps of after a landscape painting sample set is obtained, segmenting each landscape painting sample image to obtain a plurality of image segmentation units; performing line extraction on the landscape painting in each image segmentation unit to obtain a line set which corresponds to each image segmentation unit and is used for expressing the texture of the landscape painting; establishing a loop to generate an confrontation network model; and carrying out iterative training on the network model, and randomly determining a line set corresponding to the image segmentation unit and randomly determining the image segmentation unit as a training sample in each training process. The method has the advantages that the mapping from the sketch domain to the landscape painting domain can be more flexible by training the circularly generated confrontation network model, so that the problem that the intelligent drawing of landscape paintings cannot be realized in the related technology is solved, the problem that the sketch requirement on the sketch domain is high when the mapping from the sketch domain to the painting domain is carried out is solved, and the painting with a specific artistic style generated by the method has limitation.

Description

Information processing method for landscape painting
Technical Field
The disclosure relates to the technical field of data processing, in particular to an information processing method for landscape painting drawing.
Background
In the field of image processing, artistic stylization has matured and has a wide application range. However, most of the works are designed to simulate the effects of oil paintings and water paintings. Artistic rendering focuses on applying style transitions to 2D images and generating a rendering of artistic style words. Such as brush-based rendering (SBR) and region-based rendering (RBR). SBR gradually adds synthetic strokes to a canvas to simulate a specific style pattern on the basis of a source photograph, adjusts the positions of the strokes using RBRs at a region-divided part, and enhances the effect of artistic style generation by fine details. However, the style of the brush has certain limitations, and good iterative superposition can be realized on a specific style, so that the flexibility is lacked.
Thus, example-based rendering has been proposed to generate various artistic styles. Hertzman et al developed a mapping function module from the source highlight that to the target image with a specific stylization, called image analogy. Through comprehensive training, it can generate various artistic styles. However. It is limited to associating genres with content and lacks the features of advanced images. In general, artistically stylized algorithms perform well in generating specific styles, but have significant limitations for implementation of diversity and flexibility.
Disclosure of Invention
The main purpose of the present disclosure is to provide an information processing method for landscape painting.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided an information processing method for landscape painting, including: after a landscape painting sample set is obtained, segmenting each landscape painting sample image to obtain a plurality of image segmentation units; performing line extraction on the landscape painting in each image segmentation unit to obtain a line set which corresponds to each image segmentation unit and is used for expressing the texture of the landscape painting; establishing a loop to generate an confrontation network model; and carrying out iterative training on the network model, and randomly determining a line set corresponding to the image segmentation unit and randomly determining the image segmentation unit as a training sample in each training process.
Optionally, the building of the cycle generating confrontation network model comprises: establishing two generators G and F, wherein the structures of the two generators are the same, and the generator G is used for generating the same as the generator GAn image G (x) similar to the landscape painting in the image segmentation unit; the generator F is used for generating a similar line set corresponding to the image segmentation unit; two discriminators D are establishedXAnd DYWherein, a discriminator DYThe line set is used for distinguishing the generated similar image G (x) from the line set corresponding to the image segmentation unit; discriminator DXThe image segmentation unit is used for generating a set of similar lines; establishing loss function, L (G, F, DX, DY) being LGAN(G,DY,X,Y)+LGAN(F,DX,Y,X)+λLcyc(G, F); wherein L isGAN(G,DY,X,Y)、LGAN(F, DX, Y, X) is antagonistic loss; l iscyc(G, F) is the cycle consistency loss, λ is used to balance the regularization term; establishing a training target of the network model: g, F ═ arg min max L (G, F, D)X,DY)
G,F DX,DY。
Optionally, the performing line extraction on the landscape painting in each image segmentation unit includes:
configuring an edge detector; and performing line extraction on the image segmentation unit by using the edge detector.
Optionally, before segmenting each of the landscape painting sample images, the method further comprises: acquiring an original landscape painting scanning image containing a plurality of types; and/or, carrying out binarization processing on the original landscape painting scanned image to determine a boundary corresponding to the scanned image; adaptively calculating the threshold value of each binarized image; carrying out noise reduction processing on the image after binarization processing; and deleting frames outside the boundary to obtain a landscape painting sample set comprising a plurality of types.
Optionally, iteratively training the network model further comprises: pairing the line set and the image segmentation unit in advance; and in each training process, training by taking the paired line set and the image segmentation unit as samples.
Optionally, in the iterative training process of the network model, the learning rate is set to 0.0002, and the batch size is 1.
Optionally, each generator comprises 3 convolutional layers, 9 residual blocks, and 3 convolutional layers in sequence; each discriminator uses 70 × 70 patches GAN containing convolution layers, which classifies the authenticity of each 70 × 70 patch in an image, and averages all the results and outputs them.
According to a second aspect of the present disclosure, there is provided an information processing method for landscape painting, including: obtaining a contour line; inputting the contour line into a generator G in a training-finished loop generation countermeasure network; randomly outputting a type of landscape painting; or outputting at least one type of landscape painting.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium storing computer instructions for causing a computer to execute the information processing method for landscape painting according to any one of the implementation manners of the first aspect.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to cause the at least one processor to execute the information processing method for landscape painting according to any one of the implementations of the first aspect.
The information processing method for landscape painting drawing in the embodiment of the disclosure comprises the steps of after a landscape painting sample set is obtained, segmenting each landscape painting sample image to obtain a plurality of image segmentation units; performing line extraction on the landscape painting in each image segmentation unit to obtain a line set which corresponds to each image segmentation unit and is used for expressing the texture of the landscape painting; establishing a loop to generate an confrontation network model; and carrying out iterative training on the network model, and randomly determining a line set corresponding to the image segmentation unit and randomly determining the image segmentation unit as a training sample in each training process. The method has the advantages that the mapping from the sketch domain to the landscape painting domain can be more flexible by training the circularly generated confrontation network model, so that the problem that the intelligent drawing of landscape paintings cannot be realized in the related technology is solved, the problem that the sketch requirement on the sketch domain is high when the mapping from the sketch domain to the painting domain is carried out is solved, and the painting with a specific artistic style generated by the method has limitation.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of an information processing method for landscape painting according to an embodiment of the present disclosure;
fig. 2 is an application scene diagram of an information processing method for landscape painting according to an embodiment of the present disclosure;
fig. 3 is another application scenario diagram of an information processing method for landscape painting according to an embodiment of the present disclosure.
Fig. 4 is a diagram of still another application scenario of an information processing method for landscape painting according to an embodiment of the present disclosure;
fig. 5 is a flowchart of an information processing method for landscape painting drawing according to another embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those skilled in the art, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure may be described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
According to an embodiment of the present disclosure, there is provided an information processing method for landscape painting, as shown in fig. 1, the method including steps 101 to 104 as follows:
step 101: after the landscape painting sample set is obtained, each landscape painting sample image is segmented to obtain a plurality of image segmentation units.
In the embodiment, the word "landscape" means "mountain and water", which is also called as a Chinese painting, is an east Asian style Chinese painting, uses ink, and relates to natural landscape. As a key element of the literary art or amateur art of scholars, which is said by chinese, mountain water has been accompanied by their education in the past, and chinese scholars have received this form of art training. This artistic form is an essential part of the whole group mental life of ancient Chinese knowledge in a long history.
As an optional implementation manner of this embodiment, before segmenting each of the landscape painting sample images, the method further includes: acquiring an original landscape painting scanning image containing a plurality of types; and/or, carrying out binarization processing on the original landscape painting scanned image to determine a boundary corresponding to the scanned image; adaptively calculating the threshold value of each binarized image; carrying out noise reduction processing on the image after binarization processing; and deleting frames outside the boundary to obtain a landscape painting sample set comprising a plurality of types.
Referring to fig. 2, chinese landscape painting files may be collected from the data platform opened in the palace museum, for example, 108 painting files are obtained, or a chinese landscape painting is purchased on an online shopping platform. After the original landscape painting is obtained, the frame can be removed first, and a landscape painting sample set is obtained.
In this alternative implementation, removal of the frame from which the landscape painting is removed is achieved. Because the landscape painting is an artwork, the original landscape painting file is framed on the fabric, along with some annotations, as shown in fig. 2 (a). The chinese landscape painting literature has mostly a dark color in its long history, while the frame of the fabric is usually new with a bright luster. Therefore, each original landscape painting scanned image can be subjected to binarization, the boundary of the landscape painting is obtained, and the threshold value is calculated on each image in a self-adaptive mode. Morphological operations such as erosion and dilation can be used to eliminate some of the noise after binarization. Finally, the frames outside the landscape picture boundary are deleted as shown in fig. 2 (b).
It is understood that the process of adaptively calculating the threshold may include: and calculating the proportion of 0 in the image after binarization to the whole image, and when the proportion value is greater than a preset value, repeatedly and progressively adjusting the threshold value of the binarization gray value and recalculating the binarization image until the proportion reaches or is less than the preset value. Different gray value thresholds are dynamically assigned to landscape paintings with different fabric backgrounds and different oxidation colors through self-adaptive threshold calculation so as to obtain an accurate landscape painting boundary area, and therefore the obtained landscape paintings are more accurate.
In particular, the size and the aspect ratio of the Chinese landscape painting literature are very different. Thus, each landscape picture (H W) can be first divided in half (H W/2, assuming W is along the long side H), as shown in FIG. 2(c), and then each portion can be evenly divided into square cells (W/2W/2)5, as shown in FIG. 2 (d).
Specifically, the original landscape painting scanned image in the embodiment contains various types of landscape paintings, and based on this as a sample, when mapping a sketch domain to a painting domain by using a model, any type of landscape paintings can be randomly generated, rather than being limited to only simulating existing landscape paintings.
In particular, the landscape painting style may include a "blue-green landscape" style, for example, fig. 3(a) (this type of landscape has a large number of gold and green paintings (colors not shown in the figures) and is popular with the former chinese dynasty). But in addition to this, other sub-styles (e.g., fig. 3(b) - (f))) are difficult to mark as any existing style. For example, the drawing shown in FIG. 3(c) will gradually change to gray, while white represents apparently flowing water. This is a new landscape style that represents a strong ink-wash style.
Step 102: and performing line extraction on the landscape painting in each image segmentation unit to obtain a line set which corresponds to each image segmentation unit and is used for representing the texture of the landscape painting.
In this embodiment, since the landscape painting literature is created by a professional painter without any draft, it is difficult to obtain sketch data (sketch field) although the conventional chinese landscape painting literature (painting field) can be scanned. Therefore, the manner of determining the samples of the sketch field in the present embodiment may include: edge lines are extracted from each image segmentation unit based on canny, and a line set corresponding to each unit is obtained, for example, as shown in fig. 2 (e). And then, taking the landscape painting and the line set of the landscape painting as a training data set.
As an optional implementation manner of this embodiment, the performing line extraction on the landscape painting in each image segmentation unit includes: configuring an edge detector; and performing line extraction on the image segmentation unit by using an edge detector.
In this embodiment, in order to make the sketch composed of the extracted set of landscape draw lines more match with the landscape painting, the dense lines in the landscape painting may be extracted by first configuring parameters of the edge detector (which may include configuring values of canny _ thresh1 and canny _ thresh2, and configuring other parameters), and then taking the cut square picture as input, and obtaining an edge image based on the threshold values of canny _ thresh1 and canny _ thresh2 by using the canny edge detection algorithm of openCV, thereby implementing the line extraction for each unit sample by using the edge detector.
Step 103: and establishing a loop to generate a confrontation network model.
In this embodiment, in order to finally implement the translation (mapping) from the sketch to the landscape painting by using the trained network model, a loop generation confrontation network model may be used.
As an optional implementation manner of this embodiment, the establishing a loop generation countermeasure network model includes: establishing two generators G and F, wherein the two generators have the same structure, and the generator G is used for generating an image G (x) similar to the landscape painting in the image segmentation unit; the generator F is used for generating a similar line set corresponding to the image segmentation unit; establishing two discriminators DX and DY, wherein the discriminator DY is used for distinguishing the generated similar image G (x) and a line set corresponding to the image segmentation unit; the discriminator DX is used for distinguishing the generated similar line set and the landscape painting in the image segmentation unit; establishing a loss function, L (G, F, DX, DY) being LGAN (G, DY, X, Y) + LGAN (F, DX, Y, X) + lambda Lcyc (G, F); wherein LGAN (G, DY, X, Y) and LGAN (F, DX, Y, X) are functions of resisting loss; lyc (G, F) is a cyclical consistency loss function, and λ is used to balance the regularization term; establishing a training target of the network model:
G*,F*=arg min max L(G,F,DX,DY)
G,F DX,DY。
in the present embodiment, when the cyclic generation countermeasure network model is established, two generators (G and F) and two discriminators (D) may be establishedXAnd DY). The generator G tries to generate an image G (x) similar to the image from the landscape domain Y, and the discriminator DYDifferentiating the generated mountainWater painting g (x) and real landscape painting y. This loss of antagonism is denoted LGAN(G,DYX, Y). Likewise, another countermeasure loss LGAN(F,DXY, X) is used to map the function F: y → X and discriminator D thereofX. Furthermore, a cycle consistency penalty L is addedcyc(G, F) as a regularization term, the mappings G and F used for preventing learning contradict each other, namely x → G (x) → F (G (x)) ≈ x and y → F (y) → G (F (y)) ≈ y, and the L1 norm is used for evaluating the consistency, namely, the result based on F (G (x)) -x can be used as a measure of the consistency of the two.
Therefore, the total loss function of the periodic GAN model is L (G, F, DX, DY) ═ LGAN(G,DY, X,Y)+LGAN(F,DX,Y,X)+λLcyc(G,F);
The final goal is to solve the following tasks:
G*,F*=arg min max L(G,F,DX,DY)
G,F DX,DY
i.e. during training, G and F are least lost, DX,DYThe loss is the largest, the countermeasure training is realized, the generated similar images of G and F are more and more similar in the training process, and the judgment of the discriminator is more and more strong.
As an optional implementation manner of this embodiment, each generator sequentially includes 3 convolutional layers, 9 residual blocks, and 3 convolutional layers; each discriminator uses 70 × 70 patches GAN containing convolution layers, and performs authenticity classification on each 70 × 70 patch in an image, and averages all the results and outputs the result.
Step 104: and carrying out iterative training on the network model, and randomly determining a line set corresponding to the image segmentation unit and randomly determining the image segmentation unit as a training sample in each training process.
In this embodiment, because the mapping from the sketch domain to the drawing domain in the prior art has very little flexibility, which is reflected in that the requirement for sketch strokes of the sketch is very high, that is, an accurate sketch is required to map to the drawing domain; on the other hand, there is a limitation in that specific contents are mapped in a specific style (e.g., color filling, style filling).
In order to solve the above problem, the present embodiment generates the countermeasure network based on a loop, and in each training process, samples from a sketch field (X) and a drawing field (Y) are required, and for each sketch sample (line set), a landscape painting (image segmentation unit) is randomly selected from a drawing field sample set as a drawing sample without adopting paired sample pair model training, in this way, the mapping from the learned sketch to landscape represents a general landscape style in the field Y, instead of transferring the style of the selected landscape painting. Therefore, the defects of poor flexibility and limitation in the related technology are overcome.
As an optional implementation manner of this embodiment, in the iterative training process of the network model, the learning rate is set to 0.0002, and the batch size is 1.
In this alternative implementation, λ may be set to 10, the entire network is trained from zero (i.e., from the initial state (or from the beginning) without any transfer learning, using the PyTorch code implementation of the loop generation countermeasure network model), the learning rate is 0.0002, and the batch size is 1. The system can run on a Linux server, has 6 GTX1080Ti and Ubuntu64 bit operating systems, and requires about 30 hours for the training process.
Compared with other models, such as other generation countermeasure networks (conditional GAN) with input conditions, for example, image to image transformation (image to image transformation, compared with VAE variant auto-encoder (VAE auto-encoder), or style transfer (style transfer) models, the model of this embodiment does not require one-to-one matching of data samples during the training process, and the final training completion generator can flexibly generate a plurality of styles.
Specifically, compared with a network for translating images such as pix2pix and the like, the method has the greatest advantage that in the training process, sketches and landscape paintings do not correspond to each other one by one, and therefore the model can be generalized and learn multiple styles simultaneously; while multiple styles can exist in the dataset and be viewed as a whole, and as a more general and generalized style.
Compared with VAE, the maximum feature in the method we choose does not need to specifically define the corresponding generation conditions with respect to the different style generation, i.e. it does not need to specifically control and trigger the corresponding style generation with one parameter, but can freely generate different styles at random.
Compared to the learning of a fixed single style for style migration, the model of the present embodiment will learn and generate multiple styles flexibly and freely in training.
As an optional implementation manner of this embodiment, the iteratively training the network model further includes: pairing the line set and the image segmentation unit in advance; and in each training process, training by taking the paired line set and the image segmentation unit as samples.
In this optional implementation, an optional training mode is shown, and besides a training mode without matching samples, a matching training mode may also be used to implement mapping from the sketch domain to the drawing domain.
Referring to fig. 4, in this embodiment, the generator G for generating the countermeasure network based on the training-completed loop can generate any corresponding landscape painting (columns 2 and 4) without fine drawing by arbitrarily drawing (columns 1 and 3), and the generated landscape painting includes black and white, and may also include colors (for example, yellow-green and yellow-tea backgrounds, and the drawn background color or local color cannot be displayed due to the specification of the specification drawing). That is, the sketch line may be any painted line, and is not limited to a line similar to a landscape outline, that is, any line set composed of lines in any form (straight lines and curved lines) may be used as the sketch line, and the generator G of the countermeasure network is generated by using a trained loop, and a corresponding landscape painting may be generated based on the any line set.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present disclosure, there is also provided an information processing method for landscape painting using a network model, as shown in fig. 5, the method including:
step 501: obtaining a contour line;
in this embodiment, a set of drawn contour lines may be acquired.
Step 502: inputting the contour line into a generator G in a training-finished loop generation countermeasure network;
the training method for circularly generating the countermeasure network is the same as the model training method in the previous embodiment, and is not described herein again.
Step 503: randomly outputting a type of landscape painting; or outputting at least one type of landscape painting.
In the embodiment, generators (sketch field to drawing field) in the confrontation network model can be generated based on a pre-trained loop, and any type of landscape painting can be randomly generated.
In this embodiment, the generator G capable of generating the countermeasure network based on the training completed cycle can generate any corresponding landscape paintings (columns 2 and 4) without fine drawing by drawing arbitrarily (columns 1 and 3), and the generated landscape paintings include black and white, and may also include colors (for example, yellow green and tea yellow backgrounds, and the drawn background colors or local colors cannot be displayed due to the specification of the specification drawing), so that the generation of the landscape paintings based on the network model of this embodiment can be more flexible, and the drawing requirement for the painter is lower (only a letter pen is doodle).
The embodiment of the present disclosure provides an electronic device, as shown in fig. 6, the electronic device includes one or more processors 61 and a memory 62, and one processor 63 is taken as an example in fig. 6.
The controller may further include: an input device 63 and an output device 64.
The processor 61, the memory 62, the input device 63 and the output device 64 may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The processor 61 may be a Central Processing Unit (CPU). The processor 61 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 62, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the control methods in the embodiments of the present disclosure. The processor 61 executes various functional applications of the server and data processing by running the non-transitory software programs, instructions and modules stored in the memory 62, that is, implements the information processing method for landscape painting of the above-described method embodiment.
The memory 62 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a processing device operated by the server, and the like. Further, the memory 62 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 62 may optionally include memory located remotely from the processor 61, which may be connected to a network connection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 63 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the server. The output device 64 may include a display device such as a display screen.
One or more modules are stored in the memory 62, which when executed by the one or more processors 61, perform the method as shown in fig. 1.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the motor control methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), a flash memory (FlashMemory), a hard disk (hard disk drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. An information processing method for landscape painting, comprising:
after a landscape painting sample set is obtained, segmenting each landscape painting sample image to obtain a plurality of image segmentation units;
performing line extraction on the landscape painting in each image segmentation unit to obtain a line set which corresponds to each image segmentation unit and is used for expressing the texture of the landscape painting;
establishing a loop to generate an confrontation network model;
and carrying out iterative training on the network model, and randomly determining a line set corresponding to the image segmentation unit and randomly determining the image segmentation unit as a training sample in each training process.
2. The information processing method for landscape painting according to claim 1, wherein the creating of a cyclic generation confrontation network model includes:
establishing two generators G and F, wherein the two generators have the same structure, and the generator G is used for generating an image G (x) similar to the landscape painting in the image segmentation unit; the generator F is used for generating a similar line set corresponding to the image segmentation unit;
two discriminators D are establishedXAnd DYWherein, a discriminator DYThe line set is used for distinguishing the generated similar image G (x) from the line set corresponding to the image segmentation unit; discriminator DXThe image segmentation unit is used for generating a set of similar lines;
establishing loss function, L (G, F, DX, DY) being LGAN(G,DY,X,Y)+LGAN(F,DX,Y,X)+λLcyc(G, F); wherein L isGAN(G,DY,X,Y)、LGAN(F, DX, Y, X) is antagonistic loss; l iscyc(G, F) is the cycle consistency loss, λ is used to balance the regularization term;
establishing a training target of the network model:
G*,F*=arg min max L(G,F,DX,DY)
G,F DX,DY。
3. the information processing method for landscape painting according to claim 1, wherein performing line extraction on the landscape painting in each image segmentation unit includes:
configuring an edge detector;
and performing line extraction on the image segmentation unit by using the edge detector.
4. The information processing method for landscape painting according to claim 1 or 3, wherein before segmenting each landscape painting sample image, the method further comprises:
acquiring an original landscape painting scanning image containing a plurality of types;
and/or, carrying out binarization processing on the original landscape painting scanned image to determine a boundary corresponding to the scanned image;
adaptively calculating the threshold value of each binarized image;
carrying out noise reduction processing on the image after binarization processing;
and deleting frames outside the boundary to obtain a landscape painting sample set comprising a plurality of types.
5. The information processing method for landscape painting according to claim 1, wherein iteratively training the network model further comprises:
pairing the line set and the image segmentation unit in advance;
and in each training process, training by taking the paired line set and the image segmentation unit as samples.
6. The information processing method for landscape painting according to claim 1, wherein in the iterative training process of the network model, a learning rate is set to 0.0002, and a batch size is 1.
7. The information processing method for landscape painting according to claim 2, wherein each generator sequentially contains 3 convolutional layers, 9 residual blocks, and 3 convolutional layers;
each discriminator uses 70 × 70 patches GAN containing convolution layers, and performs authenticity classification on each 70 × 70 patch in an image, and averages all the results and outputs the result.
8. An information processing method for landscape painting, comprising:
obtaining a contour line;
inputting the contour line into a generator G in a training-finished loop generation countermeasure network;
randomly outputting a type of landscape painting; or outputting at least one type of landscape painting.
9. A computer-readable storage medium characterized by storing computer instructions for causing a computer to execute the information processing method for landscape painting drawing according to any one of claims 1 to 7.
10. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the information processing method for landscape painting according to any one of claims 1 to 7.
CN202110739036.1A 2021-06-30 2021-06-30 Information processing method for landscape painting Pending CN113706645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110739036.1A CN113706645A (en) 2021-06-30 2021-06-30 Information processing method for landscape painting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110739036.1A CN113706645A (en) 2021-06-30 2021-06-30 Information processing method for landscape painting

Publications (1)

Publication Number Publication Date
CN113706645A true CN113706645A (en) 2021-11-26

Family

ID=78648215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110739036.1A Pending CN113706645A (en) 2021-06-30 2021-06-30 Information processing method for landscape painting

Country Status (1)

Country Link
CN (1) CN113706645A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376582A (en) * 2018-09-04 2019-02-22 电子科技大学 A kind of interactive human face cartoon method based on generation confrontation network
CN110968725A (en) * 2019-12-03 2020-04-07 咪咕动漫有限公司 Image content description information generation method, electronic device, and storage medium
JP6676744B1 (en) * 2018-12-28 2020-04-08 株式会社Cygames Image processing method, image processing system and program
CN111476294A (en) * 2020-04-07 2020-07-31 南昌航空大学 Zero sample image identification method and system based on generation countermeasure network
CN112614199A (en) * 2020-11-23 2021-04-06 上海眼控科技股份有限公司 Semantic segmentation image conversion method and device, computer equipment and storage medium
CN113034523A (en) * 2021-04-23 2021-06-25 腾讯科技(深圳)有限公司 Image processing method, image processing device, storage medium and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376582A (en) * 2018-09-04 2019-02-22 电子科技大学 A kind of interactive human face cartoon method based on generation confrontation network
JP6676744B1 (en) * 2018-12-28 2020-04-08 株式会社Cygames Image processing method, image processing system and program
CN110968725A (en) * 2019-12-03 2020-04-07 咪咕动漫有限公司 Image content description information generation method, electronic device, and storage medium
CN111476294A (en) * 2020-04-07 2020-07-31 南昌航空大学 Zero sample image identification method and system based on generation countermeasure network
CN112614199A (en) * 2020-11-23 2021-04-06 上海眼控科技股份有限公司 Semantic segmentation image conversion method and device, computer equipment and storage medium
CN113034523A (en) * 2021-04-23 2021-06-25 腾讯科技(深圳)有限公司 Image processing method, image processing device, storage medium and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
卢倩雯;陶青川;赵娅琳;刘蔓霄;: "基于生成对抗网络的漫画草稿图简化", 自动化学报, no. 05, pages 75 - 89 *

Similar Documents

Publication Publication Date Title
US10748324B2 (en) Generating stylized-stroke images from source images utilizing style-transfer-neural networks with non-photorealistic-rendering
US10839575B2 (en) User-guided image completion with image completion neural networks
CN110378985B (en) Animation drawing auxiliary creation method based on GAN
CN108352083B (en) 2D image processing for stretching into 3D objects
CN108961303A (en) A kind of image processing method, device, electronic equipment and computer-readable medium
CN109191414A (en) A kind of image processing method, device, electronic equipment and storage medium
CN111243050B (en) Portrait simple drawing figure generation method and system and painting robot
GB2559446A (en) Generating a three-dimensional model from a scanned object
CN111199531A (en) Interactive data expansion method based on Poisson image fusion and image stylization
CN106846390B (en) Image processing method and device
CN109377445A (en) Model training method, the method, apparatus and electronic system for replacing image background
CN109472249A (en) A kind of method and device of determining script superiority and inferiority grade
US10204447B2 (en) 2D image processing for extrusion into 3D objects
JP6929322B2 (en) Data expansion system, data expansion method, and program
KR20230097157A (en) Method and system for personalized 3D head model transformation
Zhou et al. An interactive and generative approach for chinese shanshui painting document
CN112634282B (en) Image processing method and device and electronic equipment
Radhakrishnan et al. Creative intelligence–automating car design studio with generative adversarial networks (GAN)
Mould et al. Developing and applying a benchmark for evaluating image stylization
KR20230085931A (en) Method and system for extracting color from face images
Uchida et al. Stylized line-drawing of 3D models using CNN with line property encoding
He Application of local color simulation method of landscape painting based on deep learning generative adversarial networks
CN113706645A (en) Information processing method for landscape painting
CN110516202A (en) Acquisition methods, document structure tree method, apparatus and the electronic equipment of document generator
CN112529978B (en) Man-machine interactive abstract picture generation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination