Let Ai help us draw a zongzi, what will it look like?
Contents of this article:
1. Current status of Ai drawing technology
2. See what Ai understands about rice dumplings
2.2. Generate different styles of rice dumplings
2.2.2. Zongzi in illustration style
2.2.3, 3D style rice dumplings
3. The interesting shape of Ai Zongzi
Four, love zongzi, what kind of stuffing will you pack for us?
6. Ai writes code to draw zongzi
1. Current status of Ai drawing technology
Artificial Intelligence Generated Content ( AIGC for short ) is one of the hottest concepts at the moment. AIGC is considered to be a new production method that uses artificial intelligence technology to automatically generate content after Professional Generated Content (PGC) and User Generated Content (UGC).
The forms of AI-generated content are quite rich. In addition to text, it can also be used for drawing, composing, singing, screenwriting, and designing. Text to Image, which has been very popular recently, is a very fashionable way to create pictures under the blessing of AI.
Among the AIGC open source projects, Stable Diffusion is undoubtedly one of the outstanding students. Stable Diffusion is a variation of the Diffusion Model called the Latent Diffusion Model , created by researchers and engineers at CompVis, Stability AI, and LAION.
It is trained using images from a subset of the LAION-5B database. Using this model, any image including a human face can be generated,
Because there is an open source pre-trained model, we can also run it on our own machine.
Stable Diffusion can generate a good picture through model calculation based on some prompt words we provide and some parameters that can be adjusted.
If we let AI draw a zongzi for us, what would it look like? I use Stable Diffusion to generate zongzi pictures, let's take a look.
2. See what Ai understands about rice dumplings
2.1. Basic Zongzi
Prompt: Zongzi Zongzi
The effect of the zongzi drawn by Ai is as follows:
2.2. Generate different styles of rice dumplings
2.2.1. Real-style Zongzi
The effect of the real-style zongzi drawn by Ai is as follows:
2.2.2. Zongzi in illustration style
The effect of the illustration style rice dumplings drawn by Ai is as follows:
2.2.3, 3D style rice dumplings
The effect of the 3D style Zongzi drawn by Ai is as follows:
2.2.4. Cartoon-style Zongzi
The effect of the cartoon-style Zongzi drawn by Ai is as follows:
3. The interesting shape of Ai Zongzi
Food modeling design is to carry out creative design and artistic processing of food, so as to form beautiful and interesting visual effects, making food more attractive and ornamental. The food shape design can be simple in the form of arranging plates, or it can be exquisite and innovative.
Food modeling design specifically includes the following aspects :
- Color matching : Through the color matching of ingredients, different aesthetic feelings and emotions are created.
- Shape innovation : Carry out creative cutting, cutting, carving and other processing on food materials to form food with aesthetic appearance.
- Overall structure : Combine the ingredients together to build a food structure with outstanding overall characteristics and vivid forms.
- Modeling materials : Use various ingredients, utensils, tableware and other materials to cooperate and innovate to create a variety of aesthetics.
No matter what kind of food design it is, it requires exquisite and innovative features, so that people can not only enjoy the taste of food, but also visually feel the designer's aesthetics and creative design.
Some of the zongzi drawn by Ai have interesting shapes. It turns out that zongzi can still be like this. If next time we make zongzi by hand, we will wrap the zongzi like a painting, and the people around us will be pleasantly surprised when they see it. . . ? Haha~~
Some of the Zongzi shapes drawn by Ai are as follows:
Four, love zongzi, what kind of stuffing will you pack for us?
Ai does not need to eat vegetables and other food like humans.
How well an AI understands food depends on the models and algorithms it is trained on.
For example, AI can be trained to recognize and classify different types of food, identify different ingredients and seasonings, and even evaluate the quality and taste of food.
AI can also be used to predict food demand and trends, nutritional value and health effects.
In addition, AI can also be used to help people develop personalized meal plans and provide healthy eating advice.
In conclusion, the capabilities of AI can be said to be diverse in terms of food and can provide a lot of useful information and insights to improve our eating habits and lifestyles.
Let's take a look at Ai Bao Zongzi, what kind of stuffing will we pack?
Some of the Zongzi fillings drawn by Ai are as follows:
5. Cartoon Zongzi drawn by Ai
Ai can help us create cartoon images with the theme of zongzi ,
Take a look at what image Ai drew this time:
6. Ai writes code to draw zongzi
The effect of Ai writing code and drawing pictures is really a bit speechless, and the effect is not ideal.
I tried to let Ai draw a zongzi with python, let's see the effect:
The code for Ai to draw zongzi with python:
#====================================================
#Ai用python 画粽子的代码,代码有问题,画不出粽子的样子
#====================================================
import turtle
# 设置画布大小和颜色
turtle.setup(600, 600)
turtle.bgcolor("pink")
# 画出粽子的身体
turtle.penup()
turtle.goto(-100, 0)
turtle.pendown()
turtle.begin_fill()
turtle.color("green")
turtle.circle(100, steps=4)
turtle.end_fill()
# 画出粽子的红绳子
turtle.penup()
turtle.goto(-70, 150)
turtle.pendown()
turtle.pensize(5)
turtle.color("red")
turtle.forward(140)
# 画出粽子的叶子
turtle.penup()
turtle.goto(-150, 0)
turtle.pendown()
turtle.begin_fill()
turtle.color("green")
turtle.circle(50)
turtle.end_fill()
turtle.penup()
turtle.goto(150, 0)
turtle.pendown()
turtle.begin_fill()
turtle.color("green")
turtle.circle(50)
turtle.end_fill()
turtle.penup()
turtle.goto(-75, 80)
turtle.pendown()
turtle.begin_fill()
turtle.color("green")
turtle.circle(50)
turtle.end_fill()
turtle.penup()
turtle.goto(75, 80)
turtle.pendown()
turtle.begin_fill()
turtle.color("green")
turtle.circle(50)
turtle.end_fill()
# 隐藏画笔
turtle.hideturtle()
# 显示窗口
turtle.done()
Most people write program codes by hand to achieve the effect of drawing zongzi:
from turtle import *
colormode(255)
def Zongzi(x, y):
penup()
home()
goto(x, y)
pendown()
pensize(2)
pencolor(0, 0, 0)
fillcolor(10,103,30)
begin_fill()
fd(200)
circle(15, 120)
fd(200)
circle(15, 120)
fd(200)
circle(15, 120)
end_fill()
fillcolor(10,103,30)
begin_fill()
fd(200)
circle(15, 60)
fd(100)
circle(15, 90)
fd(173)
circle(1, 150)
end_fill()
fd(205)
circle(-15, 120)
fd(197)
circle(-15, 120)
fd(200)
penup()
circle(-12, 120)
circle(-1, 60)
fd(100)
right(60)
back(105)
a = pos()
pendown()
color(60, 67, 0)
fillcolor(128,125,5)
begin_fill()
fd(122)
goto(a)
left(120)
fd(24)
right(120)
fd(150)
right(120)
fd(24)
right(60)
fd(124)
end_fill()
right(60)
fd(24)
begin_fill()
left(110)
fd(67)
left(100)
fd(24)
left(80)
fd(52)
end_fill()
penup()
goto(0, 0)
home()
pendown()
Zongzi(50, 0)
hideturtle()
mainloop()
Code running effect:
2
It can be seen that AI still needs to improve its algorithm and training mode in terms of code drawing.
7. Remarks
The effect of the Ai Vincent diagram largely depends on the selected model and the corresponding model training degree. Different models have different effects. This example is based on Stable Diffusion.
Recommended reading:
Tomcat11, tomcat10 installation configuration (Windows environment) (detailed graphics) |
Tomcat startup flashback problem solving set (eight categories in detail) |
|