PK creative Spring Festival, I am participating in the “Spring Festival creative submission contest”, please see: Spring Festival creative submission Contest

PaddleBoBo: The year of the Tiger

  1. Video address: www.bilibili.com/video/BV11F…
  2. Aistudio address: aistudio.baidu.com/aistudio/pr…

A, introducing

The main ideas are as follows:

  • PaddleHub’s Ernie_gen_Couplet model is used to generate a year of the Tiger related couplet
  • Use PaddleBoBo to create a video of the virtual anchor picture and the couplet

1. The Spring Festival couplets

Spring Festival couplets are a kind of red festive element “Nian Hong” pasted during the Spring Festival. They depict good images and express good wishes with neat, concise and exquisite words. They are a unique literary form in China and an important custom of Chinese people during the Spring Festival. When people put up nian Hong (Spring Festival couplets, fu characters, paper-cuts, etc.) on their homes, it means the Spring Festival officially begins.

Spring Festival couplets come from peach symbols. According to the Book of Etiquette of the Later Han Dynasty, taofu is six inches long and three inches wide, and the two deities of “Shen Cha” and “Yu Lei” are written on the peach board. “On the first day of the first month, taofu was made into a household, named fairy wood, feared by ghosts.” During the Five Dynasties, in the court of The Western Shu state, some people wrote couplets on the peach characters. Qing Dynasty “Yanjing age record” said: “Spring Festival couplets, that is, the peach symbol.”

Another source of Spring couplets is spring paste, the ancients in the beginning of spring day pasted “Yichun2” two characters, later gradually developed into spring couplets, expressed the Chinese working people a good wish to ward off evil, to avoid disaster, welcome good luck.

After the Eastern Han Dynasty, the cultural rules and regulations of the door god were formed to strengthen the functions of the door god, such as exorcism, opening ghosts, guarding family homes, safeguarding peace, helping utility, and lowering auspicousness. In ancient times, there was a special term called “seal” for pasting New Year pictures and Spring Festival couplets. Whether it was hanging peach symbols, pasting New Year pictures and Spring Festival couplets, there were operating rules. “Seal”, refers to the closure has been cleaned up, clean up the internal presence, so that the evil atmosphere can no longer enter the home. “Seal”, is closed, barrier meaning; “Seal”, is marked in the visible and hidden, I have sealed up.

It is said that this custom began in the Song Dynasty, in the Ming Dynasty began to prevail, to the Qing Dynasty, the ideological and artistic Spring Festival couplets have been greatly improved. Now sticking Spring Festival couplets has become a custom, red couplets stuck on the door, the house immediately shine. As the poem says: “beaming linmen red yan, every family stick Spring Festival couplets; The old year bids farewell to the new, and the wheels of the sequential wheel always move forward.”

2. The Year of the Tiger

Tiger is the third in the 12 Chinese zodiac, and is assigned to Yin in the 12 branches of the earth. Therefore, Yin shi in the 12 hours of a day is also called “Tiger Time” from 3 a.m. to 5 a.m. In ancient times, there were lions but no tigers in the sign. Because of the lion’s fierce nature and bad reputation, the Jade Emperor, who was in charge of animal labeling, wanted to remove the lion from the list, but he had to add an animal who was in charge of forests. At this time, the Jade Emperor thought of the tiger guard in front of the palace.

Tiangong’s tiger guardian was once just an unknown animal on the ground. It learned from the cat master scratch, lunge, bite, shear, rush, jump, folding, such as 18 martial arts, become a warrior in the mountains. Those who fight him die or perish. From then on, the tiger dominated the forest. Later, the Jade Emperor heard that the tiger was so brave that he decreed the tiger to heaven. After the tiger ascended to heaven, he fought with the jade Emperor’s guards and won. Since then, the tiger has become the front guard of the palace. Who knows before long, the birds and beasts on the ground see no one town tube, began to run riot. Caused a disaster to the world, this thing alarmed the god of the land, the god of the land hurriedly reported to heaven, please send the Jade Emperor tianshen zhen all animals. The Jade Emperor then sent the tiger down to earth, and the tiger asked that every time he won, he would be credited with one merit. The Jade Emperor wanted nothing but peace and granted the tiger’s request. When he came to earth, the tiger learned that the lion, the bear and the horse were the three most powerful animals at that time. And he challenges all three of them. With the tiger’s valor and superb martial arts link defeated lions, bears, horses. The other beasts fled and hid in the uninhabited forest wilderness. The world rejoiced and thanked the tiger for his contribution to the world. Back in the sky, the Jade Emperor carved three lines on the tiger’s forehead because the tiger had won three victories. Later, the world and by the east China Sea turtle monster harassment, the earth a vast ocean. Shrimp and crab will do evil, the tiger came to earth, killed turtle monster. When the Jade Emperor was happy, he wrote down a great achievement for the tiger and added a vertical one to the three horizontal lines on his forehead. A bold Chinese character for “King” was written on the tiger’s forehead. Since then, the tiger has been the king of all animals, in charge of all animals. Today, the tiger also can be seen on the forehead of the mighty “King” word.

After the lion’s infamy came to heaven, the Jade Emperor decided to remove the lion’s animal title, supplementingthe beast king tiger. Since then, the tiger became the Chinese zodiac, while the lion was banished to the far south. Of course, the tiger also from the jade Emperor’s palace before the guard under the earth, forever protect the peace of the lower world. Today, there are tiger symbols, tiger rings, tiger carving and other anti-evil things in addition to disaster. In rural areas, many people also like to wear tiger-head hats and tiger-head shoes for their children, in order to ward off evil spirits, good luck and peace. Three to five in the morning (Yin shi). According to ancient books. At this time, the tiger is the most active, the most ferocious, wounding the most, so yinshi with the tiger collocation.

3. Example of one-key couplet generation

Reference: [PaddleHub a key couplet generated (example: Shanghai tap water from the sea, shandong larch leaves fall dongshan)] (aistudio.baidu.com/aistudio/pr…

Couplet input:

'Shanghai tap water from the sea' 'people increase longevity years increase age ',' the wind blowing clouds disorderly day tears ', 'eyes without eyes ',' a city of flowers and rain mountain and River zhuang ', 'Dragon and Phoenix Chengxiang Fire tree silver attracted five countries to talk to her less leisurely full of grievances ',' get up early to eat early ', 'drink to the moonlight ', 'Spring breeze all the way to chase the dream of the country ',' night empty moon full is my lack or I ', 'Kunming Heilongtan two trees plum blossom poolCopy the code

Couplet output:

[' Shandong Larch flower falls in Dongshan ', 'Shandong Airport flies in Dongshan ',' Zhongshan Library hides the Mountain ', 'Shandong Larch leaves fall in Dongshan ',' Changchun flowers bloom in fresh spring long '] 'Spring is full of heaven and earth xi full home '] [' rain dozen flower stump sad ',' rain dozen flower stump frown ', 'rain dozen flower stump moving face ',' rain dozen frost bully moving face ', 'rain dozen flower stump aspersing worry '] [' tongue laborious tongue ',' verbal vow verbal ', 'verbal fight verbal ',' verbal fight verbal stop verbal ', 'The spring breeze is new ',' the spring breeze is new ', 'the spring breeze is new ',' the spring breeze is new ', 'the spring breeze is new ',' the spring breeze is new '] 'Shanchuan Yuxiu cheers and laughter to meet the four seas of one heart,' 'Shanchuan Yuxiu cheers and laughter to recruit guests of all nations,' 'Shanchuan Yuxiu cheers and laughter to welcome into the four seas bridge '] [' life is more bumpy have a cavity blood for me to work,' 'life is more bumpy have a cavity blood open to me,' 'life is more bumpy but a cavity blood open to me,' 'Life is more bumpy have a cavity of blood open to me ',' life is more bumpy have a cavity of worry to me '] [' Sir Sit down to worship Sir ', 'Lantern Festival night eat Lantern Festival ',' Lantern Festival night sit down to Lantern Festival ', 'Lantern Festival night music Lantern Festival ',' Lantern Festival night taste Lantern Festival '] [' wine ask qingtian ', 'pick up the pen to autumn wind ',' pick up the pen to plum blossom ', 'pen fu chou-heung', 'pen fu spring] [' hero draw the chickens kyushu future', 'the chickens nine days light of early dawn yew dies',' hero draw all the chickens kyushu, 'the chickens nine day light of early dawn yew Chinese', 'the chickens nine day light of early dawn haun humanities'] [' feeling comfortable and the wind and cloud volume of judah with the clouds', 'mood shu also earnestly cloud volume of judah with the clouds and the wind', 'love of long cloud volume ShuFu like clouds and wind', 'love to more people to go with the wind to the wind again', 'love of long cloud volume ShuFu with clouds and the wind'] [' scenery hangzhou four wind a half lake lotus', 4 'scenery hangzhou misty rain cloud half lake', 4 'hangzhou scenery scenery lake lotus', 'Hangzhou West Lake around the mountains half lake light ',' Hangzhou West Lake scenery half Lake lotus ']Copy the code

4. PaddleBoBo anchor

PaddleHub: How to build a virtual digital man! – Flying PADDLE AI Studio – Artificial intelligence learning and training community

The age of the meta-universe has come. When you see all kinds of virtual people on the network news, do you feel a little excited? Do you think, like me before, that creating a virtual human is too expensive and too technical for the average developer to do on his own? Now that’s no problem, PaddleHub helps you get there quickly!

Video effect:www.bilibili.com/video/BV1GM…

Second, before

1. Requirements for writing couplets

The length of the couplets varies, with only one or two words being short. It can be hundreds of words long. There are various forms of couplets, such as direct opposition, opposition, running opposition, couplet, and sentence matching. However, no matter what kind of couplets and what form they are used, they must have the following characteristics:

  1. The words should be equal and the sentences should be consistent. The number of words must be the same, no more, no less, except where a word is intentionally left out to achieve a certain effect.
  2. Level and oblique tone should be in harmony. The traditional custom is “oblique ups and downs”, that is, to use the end words of the upper sentences in oblique tones, and the end words of the lower sentences in horizontal tones.
  3. Be opposite and in the same place. Generally called “virtual to virtual, real to real”, it means noun to noun, verb to verb, adjective to adjective, quantifier to quantifier, adverb to adverb, and the opposite words must be in the same position.
  4. Make sure the content is relevant and connected. The meanings of the upstream and downstream must be connected, but not repeated.

In addition, the traditional way of hanging couplets is to write them straight and stick them vertically, from right to left, from top to bottom, not upside down. Hengpi, which is closely related to the couplet, can be said to be the title and center of the couplet. Good horizontal transcriptions can make the finishing touch and complement each other in couplets.

2. Open the introduction of couplet data sets

The open couplet dataset used by the model is the Couplet-clean-dataset. This dataset is based on 70W datasets of The Couplet Dataset. On this basis, sensitive words are used to filter the data, and vulgar or sensitive content is deleted. After deletion, about 74W couplets are left. The original data set of more than 700,000 contains more vulgar or sensitive content, which is not suitable for commercial scenarios. For more specific information about the data set, go to the repO address of the data set to learn more about how to download the data, data filtering rules, and so on.

3. Introduction to the generation model of couplets

  1. Ernie_gen_couplet: ERNIE-GEN is a pre-training-fine-tuning framework for generation tasks. It is the first time that spAN-by-SPAN generation tasks are added in the pre-training stage, so that the model can generate one semantically complete fragment at a time. In pre-training and fine-tuning, the exposure bias problem is alleviated by filling generation mechanism and noise perception mechanism. In addition, ERNIE-GEN sampling multi-fragment – multi-granularity target text sampling strategy enhances the correlation between source text and target text, and enhances the interaction between encoder and decoder. Ernie_gen_couplet uses open source to fine-tune the syndication dataset and can be used to generate syndication. The following is the model structure:

ERNIE-GEN:An Enhanced Multi-flow Pre-training and Fine-Tuning Framework for Natural Language Generation

  1. Ernie_tiny_couplet: Ernie_tiny_couplet is a couplet generation model, which is fine-tuned by ernie_TINY pre-trained model via PaddleHub TextGenerationTask. It supports prediction only, For further fine-tuning, see PaddleHub Text_generation demo. See how fine-tune saved models can be converted to a PaddleHub Module for the conversion of pre-trained models to predictive modules. The following is the model structure:

4. PaddleBoBo is introduced

PaddleBoBo is a fast generation project based on PaddlePaddle deep learning framework and PaddleSpeech, PaddleGAN and other development kits for virtual anchors. PaddleBoBo aims to be simple, efficient and reusable, quickly generating a video of a virtual anchor using only a picture with a portrait and a paragraph of text. And through simple secondary development to change the text input, real-time video generation and real-time broadcast functions.

  • PaddleBoBo virtual host live live demo – Bilibili

  • PaddleBoBo virtual anchor vertical version generation demo – Bilibili

  • PaddleBoBo virtual anchor Horizontal version generation demo – Bilibili

Third, generate couplets

Note: Our model can be executed on CPU and GPU, but since AI Studio Advanced edition (GPU) is very difficult to get, we will show you how to run on CPU edition. To run on a GPU, switch to AI Studio GPU Advanced and set use_CUDa =True

1. Environment dependence

PaddlePaddle >= 1.8.0, PaddleHub >= 1.7.0; PaddleHub >= 1.7.0; PaddlePaddle >= 1.8.0; PaddleHub >= 1.7.0; PaddleHub >= 1.7.0 AI Studio has provided PaddlePaddle framework and PaddleHub pre-training model management tool for all developers, because we only need to meet the version, we can use the couplet generation model to complete one-click couplet generation. PaddleHub has two ways to implement couplet generation for developers, see 3-2 (command line one-click generation) and 3-3 (API call generation) for details.

Note: PaddleHub needs to be updated to meet the environment dependency requirements of the couplet generation model; Below is the default initial version of AI Studio, where the PaddleHub version did not meet our environment requirements and needed to be updated

! pip install paddlehub --upgrade -i https://mirror.baidu.com/pypi/simple# (Upgrade paddleHub)
Copy the code

2.Command-line modeOne key to generate couplets

PaddleHub, at design time, provides command-line tools for model management and use, as well as a way to make predictions by calling the PaddleHub model from the command line. The following is the generation of couplets based on the hub run command. More paddlehub operation instructions

# command line one key couplet generation! hub run ernie_gen_couplet --input_textNew Year of the Tiger --use_gpu False --beam_width 10
Copy the code

3.API methodsOne key to generate couplets

Through the prediction API, the up link is given and the program automatically generates the down link.

import paddlehub as hub

module = hub.Module(name="ernie_gen_couplet")

test_texts = [ "When the dragon rises, it grows purple."]
results = module.generate(texts=test_texts, use_gpu=False, beam_width=50)
for result in results:
    print(result)
Copy the code
/ opt/conda envs/python35 - paddle120 - env/lib/python3.7 / site - packages/matplotlib/set py: 107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, And in 3.8 it will stop working from collections import MutableMapping / opt/conda envs/python35 - paddle120 - env/lib/python3.7 / site - packages/matplotlib/rcsetup. Py: 20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, And in 3.8 it will stop working from collections import Iterable, Mapping/opt/conda envs/python35 - paddle120 - env/lib/python3.7 / site - packages/matplotlib/colors. The py: 53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, And in 3.8 it will stop working from Collections import Sized Download https://bj.bcebos.com/paddlehub/paddlehub_dev/ernie_gen_couplet.tar.gz [# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #] 100.00% Decompress /home/aistudio/.paddlehub/tmp/tmpz3z6aez6/ernie_gen_couplet.tar.gz [##################################################] 100.00% [2022-01-22 22:08:13.694] [INFO] - Successfully installed ernie_gen_couplet-1.1.0 [2022-01-22 22:08:13.974] [INFO] - Successfully installed ernie_gen_couplet-1.1.0 [2022-01-22 22:08:13.974] INFO] - Downloading https://paddlenlp.bj.bcebos.com/models/transformers/ernie/ernie_v1_chn_base.pdparams and saved to / home/aistudio /. Paddlenlp/models/groeb - 1.0 100% | █ █ █ █ █ █ █ █ █ █ | 392507/392507 [00:10 "00:00, 36929.61 IT /s] [2022-01-22 22:08:24,680] [DEBUG] -init ErnieModel with config: {'attention_probs_dropout_prob': 0.1, 'hidden_act': 'relu', 'hidden_dropout_PROb ': 0.1, 'hidden_size': 768,' initializER_range ': 0.02, 'MAX_POSItion_Embeddings ': 513,' NUM_attention_HEADS ': 12, 'NUM_hidden_layers ': 12,' type_VOCab_SIZE ': 2, 'VOCAB_size ': 18000,' PAD_token_id ': 0} W0122 22:08:24.683709 101 Device_context. cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 10.1, Runtime API Version: 10.W0122 22:08:24.688863 101 Device_context. cc:465] Device :0, cuDNN Version: [2022-01-22 22:08:29.431] [INFO] - Loading Pretrained Model From / home/aistudio /. Paddlenlp/models/groeb - 1.0 / ernie_v1_chn_base pdparams [the 22:08:30 2022-01-22, 104] [INFO] - param: mlm_bias Not Set in pretrained Model, skip [2022-01-22 22:08:30,106] [INFO] - Param: Pretrained Model Skip [2022-01-22 22:08:30.00] [INFO] - PARam: Bias not Set in Pretrained Model Skip [2022-01-22 22:08:30,109] [INFO] - PARam: MLM_ln. Weight Not Set in Pretrained Model Skip [2022-01-22 22:08:30,111] [INFO] -BIAS: Bias not Set in Pretrained model The skip [the 22:08:33 2022-01-22, 631] [INFO] - Downloading https://paddlenlp.bj.bcebos.com/models/transformers/ernie/vocab.txt And saved to/home/aistudio /. Paddlenlp/models/groeb - 1.0 [the 22:08:33 2022-01-22, 634] [INFO] - Downloading vocab. TXT the from https://paddlenlp.bj.bcebos.com/models/transformers/ernie/vocab.txt | 100% █ █ █ █ █ █ █ █ █ █ | 90/90 [00:00 "00:00, The Spring Festival is celebrated by the warbler singing and yanwu, and the Spring Festival is celebrated by the warbler singing and yanwu. 'People and horses call zhao Bumper harvest ',' Shan Huan shui mu spring breeze ', 'spring spring ',' spring spring ', 'spring spring ',' spring spring news ', 'spring spring ',' spring spring ', 'shan Huan shui laugh spring tide ',' Shan Huan shui laugh spring tide ', 'Spring spring ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ', 'Spring Festival ',' Spring Festival ' The Spring Festival is celebrated by the Spring Festival, and the Spring Festival is celebrated by the Spring Festival. The Spring Festival is celebrated by the Spring Festival. The Spring Festival is celebrated by the Spring Festival, and the Spring Festival is celebrated by the Spring Festival.Copy the code

parameter

  • Texts (list[STR]): texts in texts;
  • Use_gpu (bool): Indicates whether to use the GPU. If GPU is used, set the CUDA_VISIBLE_DEVICES environment variable first.
  • Beam_width: Beam search width, which determines the number of downlinks for each output.

return

  • Results (list[list][STR]): concatenation text, each concatenation produces beam_width concatenation.
%cd ~
test_texts = "When the dragon rises, it grows purple."
f=open('duilian.txt'.'w')
for result in results[0]:
    f.writelines(test_texts+","+result+ "。")
f.close()    
Copy the code
/home/aistudio
Copy the code
! cat duilian.txtCopy the code
Tigress dragon teng Ziqi, Spring Festival joy. When the dragon rises, the purple gas is born, and good weather brings good harvest. Tiger-leaping Dragon teng Ziqi, spring spring joy. Tigress dragon teng Ziqi, spring breeze singing orioles. Tigress dragon teng Ziqi, Spring Festival joy. Tigress dragon teng Ziqi, joy song Yan Wu Zhao bumper year. Tigress dragon teng Ziqi, warbler Song Yan Wu Song Hua nian. Tiexilongteng Ziqi, celebrate the New Year. Tigress dragon teng Ziqi, sing spring breeze warbler song Yan wu. When the tiger leaps, the horse is called a bumper harvest. Tiger Tielong Teng Ziqi, Mountain huan shui mu spring breeze smile. Tiaoyulongteng ziqi, spring breeze drunk yingyingyanwu. Tigress dragon teng ziqi, joy song yan wu spring breeze. Tigress dragon teng Ziqi, orioles reported good tidings. Tigress dragon teng Ziqi, spring breeze wei Song Yan wu. Tigress dragon teng Ziqi, Spring Festival Spring Festival. Tiger drums ZiQi, joy chung spring tides occur. Tiexilongteng ziqi, Mountain huanshui laugh Spring Festival. Tiexilongteng ziqi, Mountain huanshui smile chung spring tide. Tigress dragon teng Ziqi, spring breeze spring spring. Tigress dragon teng Ziqi, Spring Festival joy. Tiger leaping Dragon teng Ziqi, joy spring breeze song yanwu. Tigress dragon teng Ziqi, spring spring spring spring spring. Tigress dragon teng Ziqi, Spring Festival reported. Tiexilongteng Ziqi, the horse called the Spring Festival. Tiexilongteng ziqi, Mountain huan Shui laugh zhao bumper harvest. Tigress dragon tengsheng Ziqi, yingsong Yanwu ode Yangchun. The spring breeze is called out to the warbler. Tigress dragon teng Ziqi, warbler yanwu xiangyun. Tigress dragon teng Ziqi, spring breeze singing joy. Tiger leaping Dragon teng Ziqi, the horse called the spring breeze. Tigress dragon teng Ziqi, Spring Festival Spring Festival. Tiyuelong teng Ziqi, spring breeze to send spring. Tigress dragon teng Ziqi, warbler yanwu send auspicious. Tigress dragon teng Ziqi, joy joy joy. Tiexilongteng Ziqi, called qingfeng years. Tigress dragon teng Ziqi, spring sowing joy. Tiexiongteng Purple, flowers and birds to celebrate the New Year. Tiexilongteng ziqi, Mountain huanshui smile to congratulate the New Year. Tigress dragon teng Ziqi, Spring Festival, Spring Festival. Tiexilongteng ziqi, Mountain huanshui smile celebrate the New Year. Tigress dragon teng Ziqi, Spring Festival joy song Yan wu. Tigress dragon teng Ziqi, Spring Festival Spring Festival. Tigress dragon teng Ziqi, Spring Festival spring. Tiyuelong Teng Ziqi, yingyingyanwu Wing Spring light. Tigerleaping Dragon teng Ziqi, cock crow dog bark spring. Tiyuelong Teng Ziqi, spring sowing joy. Tiger leaping Dragon teng Ziqi, Spring Festival singing joy. Tiger leaping Dragon teng Ziqi, spring breeze sowing warbler song yan wu. Tiger leaping Dragon teng Ziqi, mountain clear water xiu spring breeze.Copy the code

4. Generate video

1. Rely on the installation

%cd ~ ! pip install --upgrade pip# download nltk_data! wget https://paddlespeech.bj.bcebos.com/Parakeet/tools/nltk_data.tar.gz ! tar zxvf nltk_data.tar.gz ! git clone https://gitee.com/livingbody/PaddleBoBo.git --depth=1! pip install ppgan paddlespeechCopy the code

2. The configuration

GANDRIVING: FOM_INPUT_IMAGE: '.. /bobo.png' FOM_DRIVING_VIDEO: './file/input/zimeng.mp4' FOM_OUTPUT_VIDEO: './file/input/test.mp4' TTS: SPEED: PITCH: 1.0 ENERGY: 1.0 SAVEPATH: VIDEO_SAVE_PATH: './file/output/video/' AUDIO_SAVE_PATH: './file/output/audio/'Copy the code

3. Activate your static face

# override configuration! cp ~/default.yaml ~/PaddleBoBo/default.yamlCopy the code
%cd ~/PaddleBoBo/ ! python create_virtual_human.py --config default.yamlCopy the code

4. General version generation

The numpy version is too high, so you need to uninstall it first and then install the 1.20 version.

! pip uninstall numpy -yCopy the code
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
  Successfully uninstalled numpy-1.19.5
Copy the code
! pip install numpy==1.20
Copy the code
! python general_demo.py \ --human ./file/input/test.mp4 \ --output output. Mp4 \ --text Spring Festival is celebrated. When the dragon rises, the purple gas is born, and good weather brings good harvest. Tiger-leaping Dragon teng Ziqi, spring spring joy. Tigress dragon teng Ziqi, spring breeze singing orioles. Tigress dragon teng Ziqi, Spring Festival joy. Tigress dragon teng Ziqi, joy song Yan Wu Zhao bumper year. Tigress dragon teng Ziqi, warbler Song Yan Wu Song Hua nian. Tiexilongteng Ziqi, celebrate the New Year. Tigress dragon teng Ziqi, sing spring breeze warbler song Yan wu. When the tiger leaps, the horse is called a bumper harvest. Tiger Tielong Teng Ziqi, Mountain huan shui mu spring breeze smile. Tiaoyulongteng ziqi, spring breeze drunk yingyingyanwu. Tigress dragon teng ziqi, joy song yan wu spring breeze. Tigress dragon teng Ziqi, orioles reported good tidings. Tigress dragon teng Ziqi, spring breeze wei Song Yan wu. Tigress dragon teng Ziqi, Spring Festival Spring Festival. Tiger drums ZiQi, joy chung spring tides occur. Tiexilongteng ziqi, Mountain huanshui laugh Spring Festival. Tiexilongteng ziqi, Mountain huanshui smile chung spring tide. Tigress dragon teng Ziqi, spring breeze spring spring. Tigress dragon teng Ziqi, Spring Festival joy. Tiger leaping Dragon teng Ziqi, joy spring breeze song yanwu. Tigress dragon teng Ziqi, spring spring spring spring spring. Tigress dragon teng Ziqi, Spring Festival reported. Tiexilongteng Ziqi, the horse called the Spring Festival. Tiexilongteng ziqi, Mountain huan Shui laugh zhao bumper harvest. Tigress dragon tengsheng Ziqi, yingsong Yanwu ode Yangchun. The spring breeze is called out to the warbler. Tigress dragon teng Ziqi, warbler yanwu xiangyun. Tigress dragon teng Ziqi, spring breeze singing joy. Tiger leaping Dragon teng Ziqi, the horse called the spring breeze. Tigress dragon teng Ziqi, Spring Festival Spring Festival. Tiyuelong teng Ziqi, spring breeze to send spring. Tigress dragon teng Ziqi, warbler yanwu send auspicious. Tigress dragon teng Ziqi, joy joy joy. Tiexilongteng Ziqi, called qingfeng years. Tigress dragon teng Ziqi, spring sowing joy. Tiexiongteng Purple, flowers and birds to celebrate the New Year. Tiexilongteng ziqi, Mountain huanshui smile to congratulate the New Year. Tigress dragon teng Ziqi, Spring Festival, Spring Festival. Tiexilongteng ziqi, Mountain huanshui smile celebrate the New Year. Tigress dragon teng Ziqi, Spring Festival joy song Yan wu. Tigress dragon teng Ziqi, Spring Festival Spring Festival. Tigress dragon teng Ziqi, Spring Festival spring. Tiyuelong Teng Ziqi, yingyingyanwu Wing Spring light. Tigerleaping Dragon teng Ziqi, cock crow dog bark spring. Tiyuelong Teng Ziqi, spring sowing joy. Tiger leaping Dragon teng Ziqi, Spring Festival singing joy. Tiger leaping Dragon teng Ziqi, spring breeze sowing warbler song yan wu. Tiger leaping Dragon teng Ziqi, mountain clear water xiu spring breeze.Copy the code

After the video is generated, the output path is output.mp4. Download it!

  1. Video address: www.bilibili.com/video/BV11F…
  2. Aistudio address: aistudio.baidu.com/aistudio/pr…