Picture generation method, electronic equipment and medium
Патент · CN B
Полный текст
The invention discloses a picture generation method, electronic equipment and a medium, wherein the method comprises the following steps of obtaining an original text, a first concept and a second concept with the meaning opposite to that of the first concept; the method comprises the steps of encoding an original text, a first concept and a second concept to obtain an original text vector, a first concept vector and a second concept vector, subtracting the first concept vector and the second concept vector to obtain a concept rendering vector, adding the concept rendering vector and the original text vector after scaling to obtain a rendering text vector, splicing a learnable prefix in front of the original text to obtain a target text, encoding the target text to obtain a target text vector, obtaining an optimal target text closest to the rendering text by maximizing cosine similarity between the rendering text vector and the target text vector, and inputting the original text and the optimal target text into a text-to-text graph model to obtain an original picture and a target picture.