Let Ai help us draw a zongzi, what will it look like?

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.1. Basic Zongzi

2.2. Generate different styles of rice dumplings

2.2.1. Real-style Zongzi

2.2.2. Zongzi in illustration style

2.2.3, 3D style rice dumplings 

2.2.4. Cartoon-style Zongzi 

3. The interesting shape of Ai Zongzi

Four, love zongzi, what kind of stuffing will you pack for us?

5. Cartoon Zongzi drawn by Ai

 6. Ai writes code to draw zongzi

7. Remarks


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:

Change the background color of the photo (python+opencv) Twelve categories of cats Virtual digital human based on large model__virtual anchor instance

Computer Vision__Basic Image Operations (Display, Read, Save) Histogram (color histogram, grayscale histogram) Histogram equalization (adjust image brightness, contrast)

 Speech recognition practice (python code) (1)

 Artificial Intelligence Basics

 Basics of Computer Vision__Image Features

93d65dbd09604c4a8ed2c01df0eebc38.png

 Quick check of matplotlib's own drawing style effect display (28 types, all)

074cd3c255224c5aa21ff18fdc25053c.png

Detailed explanation of Three.js example ___ rotating elf girl (with complete code and resources) (1)

fe88b78e78694570bf2d850ce83b1f69.png

cb4b0d4015404390a7b673a2984d676a.png

Three-dimensional multi-layer rose drawing source code__Rose python drawing source code collection

 Python 3D visualization (1)

 Make your work better - the method of making word cloud Word Cloud (based on python, WordCloud, stylecloud)

e84d6708316941d49a79ddd4f7fe5b27.png

938bc5a8bb454a41bfe0d4185da845dc.jpeg

0a4256d5e96d4624bdca36433237080b.png

 Usage of python Format() function___Detailed example (1) (full, many examples)___Various formatting replacements, format alignment printing

 Write romance with code__Collection (python, matplotlib, Matlab, java to draw hearts, roses, front-end special effects roses, hearts)

Python love source code collection (18 models)

dc8796ddccbf4aec98ac5d3e09001348.jpeg

0f09e73712d149ff90f0048a096596c6.png

40e8b4631e2b486bab2a4ebb5bc9f410.png

 Usage of the Print() function in Python___Detailed examples (full, many examples)

 The complete collection of detailed explanations of Python function and method examples (updating...)

 "Python List List Full Example Detailed Explanation Series (1)" __ series general catalog, list concept

09e08f86f127431cbfdfe395aa2f8bc9.png

Celebrate the Mid-Autumn Festival with code, do you want to have a bite of python turtle mooncake?

 directory of python exercises

03ed644f9b1d411ba41c59e0a5bdcc61.png

daecd7067e7c45abb875fc7a1a469f23.png

17b403c4307c4141b8544d02f95ea06c.png

Strawberry bear python turtle drawing (windmill version) with source code

 ​Strawberry Bear python turtle drawing code (rose version) with source code

 ​Strawberry bear python drawing (Spring Festival version, Christmas countdown snowflake version) with source code

4d9032c9cdf54f5f9193e45e4532898c.png

c5feeb25880d49c085b808bf4e041c86.png

 Buzz Lightyear python turtle drawing__with source code

Pikachu python turtle turtle drawing (power ball version) with source code

80007dbf51944725bf9cf4cfc75c5a13.png

1ab685d264ed4ae5b510dc7fbd0d1e55.jpeg

1750390dd9da4b39938a23ab447c6fb6.jpeg

 Node.js (v19.1.0npm 8.19.3) vue.js installation and configuration tutorial (super detailed)

 Color and color comparison table (1) (hexadecimal, RGB, CMYK, HSV, Chinese and English names)

A number of authoritative organizations in April 2023____Programming language rankings__Salary status

aa17177aec9b4e5eb19b5d9675302de8.png

38266b5036414624875447abd5311e4d.png

6824ba7870344be68efb5c5f4e1dbbcf.png

 The phone screen is broken____how to export the data inside (18 methods)

[CSDN Cloud IDE] Personal experience and suggestions (including ultra-detailed operation tutorials) (python, webGL direction)

 Check the jdk installation path, realize the coexistence solution of multiple java jdk on windows, and solve the terminal garbled characters after installing java19

Vue3 project building tutorial (based on create-vue, vite, Vite + Vue)

fea225cb9ec14b60b2d1b797dd8278a2.png

bba02a1c4617422c9fbccbf5325850d9.png

37d6aa3e03e241fa8db72ccdfb8f716b.png

The second part of the 2023 Spring Festival blessings - send you a guardian rabbit, let it warm every one of you [html5 css3] drawing and moving bunny, cool charging, special font

 Unique, original, beautiful and romantic Valentine's Day confession album, (copy is available) (html5, css3, svg) confession love code (4 sets)

Detailed explanation series of SVG examples (1) (overview of svg, difference between bitmap and vector graphics (diagram), SVG application examples)

5d409c8f397a45c986ca2af7b7e725c9.png

6176c4061c72430eb100750af6fc4d0e.png

1f53fb9c6e8b4482813326affe6a82ff.png

[Programming Life] Python turtle drawing of World Cup elements in Qatar (with source code), 5 World Cup theme front-end special effects (with source code) HTML+CSS+svg draws exquisite colorful flashing lights Christmas tree, HTML+CSS+Js real-time New Year countdown (with source code)

 The first part of the 2023 Spring Festival Blessing Series (Part 1) (flying Kongming lanterns to pray for blessings, wishing everyone good health) (with complete source code and resources for free download)

fffa2098008b4dc68c00a172f67c538d.png

5218ac5338014f389c21bdf1bfa1c599.png

c6374d75c29942f2aa577ce9c5c2e12b.png

 Tomcat11, tomcat10 installation configuration (Windows environment) (detailed graphics)

 Tomcat port configuration (detailed)

 Tomcat startup flashback problem solving set (eight categories in detail)

Guess you like

Origin blog.csdn.net/weixin_69553582/article/details/131428543