当前位置:网站首页>[Tanabata] Tanabata lonely little frog research edition? The final chapter of Tanabata Festival!
[Tanabata] Tanabata lonely little frog research edition? The final chapter of Tanabata Festival!
2022-07-28 14:33:00 【Learning programming at the age of three】
The strongest solution to Tanabata loneliness !!!
Remember the hot Tanabata lonely little frog in recent years ?

“ A good friend ” They rushed to order you a lonely frog
True friends are beyond doubt !
What is the strongest solution ?
You are still bombing lonely and don't feel funny ?
You're still not happy about the other party blocking you or deleting content ?
That's all right. ! Today I'll take you through the customized lonely video , Absolutely innovative !!!
You're still worried that your friend sent you a video and couldn't fight back ?
You are still unhappy about the large number of lonely bombing every year ?
That's all right. ! Today I will show you a video counterattack , Let everyone see your decision and perseverance to fight back !
I'm still helpless for the love of my friends ?
That's all right. ! Today, I have prepared rotten tools for you ! Arrange the troubles clearly !

Error scheme display
Lao Xu, you want a wife, not
https://www.bilibili.com/video/BV1HG4y1i7KV/
Pink memories
https://www.bilibili.com/video/BV14B4y1h7uS
What's wrong with me being single
https://www.bilibili.com/video/bv1jU4y1q7fp
Lonely frog
https://www.bilibili.com/video/bv1uN4y177Rr
Qingming crying version
https://www.bilibili.com/video/bv1HT411E7aH
Solution comparison table
| Serial number | Content | Category |
|---|---|---|
| 1 | What a lonely frog | Friend authentication |
| 2 | Live frog | Friend authentication |
| 3 | Honey snow ice city version lonely | Friend authentication |
| 4 | Lao Xu, you want a wife, not | Friend authentication |
| 5 | What's wrong with me being single | Counterattack is necessary |
| 6 | I'm single, I'm proud | Counterattack is necessary |
| 7 | Pink memories | Counterattack is necessary |
| 8 | Bao Qingtian version ( Qingming crying ) | Counterattack is necessary |
Usage method
↓
https://aistudio.baidu.com/aistudio/projectdetail/4341437
Just upload a photo on the left first ( Straight face )
Choose the serial number you want
All the code running below can be input according to the prompt
reminder : If the serial number entered is incorrect, it will default to the first !
To upload pictures
Click the button in the file, then select the file and upload

Click the button below to run the code

Write the uploaded image and the required version in the first code content

Information confirmation
import file
imgname = input(' Please enter the name of the photo you uploaded ( Take the suffix ) for example : handsome guy .jpg/ beauty .jpg')
imgpath = file.findfile(imgname)
if imgpath == None:
print(" The picture cannot be queried , Please check whether it has been imported !!!")
try:
genre = eval(input(" Please enter the serial number you are trying to use . for example :1"))
except:
print(' Input error, please enter an integer !')
print(f' The location of your picture is :{
imgpath}, The sequence number of trying to use the solution is {
genre}')
Please enter the name of the photo you uploaded ( Take the suffix ) for example : handsome guy .jpg/ beauty .jpg 1.jpg
The file has been found
Please enter the serial number you are trying to use . for example :1 1
The location of your picture is :./1.jpg, The sequence number of trying to use the solution is 1
Information processing
!unzip -oq ./data/data158349/QIXI.zip
form = {
1 : './ Alone and widowed / Lonely frog frog version .mp3',
2 : './ Alone and widowed / Lonely live version .mp3',
3 : './ Alone and widowed / Honey snow ice city version lonely .mp3',
4 : './ Alone and widowed / Lao Xu wants a wife, not .mp3',
5 : './ Alone and widowed / What's wrong with me being single .mp3',
6 : './ Alone and widowed / I am single and proud .mp3',
7 : './ Alone and widowed / Pink memories .mp3',
8 : './ Alone and widowed / Bao Qingtian version .mp3',
}
import file
%cd /home/aistudio/
if int(genre)<1 and int(genre)>8:
genre = 1
musicpath = './music.mp3'
photopatch = './photo.jpg'
file.copyfile(form[genre], musicpath)
file.copyfile(imgpath, photopatch)
/home/aistudio
Environmental installation
# Current directory in : /home/aistudio/, This directory is also the directory where the files and folders on the left are located
# Clone the latest PaddleGAN Warehouse to current directory
# !git clone https://github.com/PaddlePaddle/PaddleGAN.git
# If from github Download slow, you can download from gitee clone:
!git clone https://gitee.com/paddlepaddle/PaddleGAN.git
%cd /home/aistudio/PaddleGAN/
!pip install -v -e .
# install PaddleGAN Of pip package , You can use api How to predict
!pip install --upgrade ppgan
!pip install dlib==19.22.0 -i https://pypi.douban.com/simple
The entrance of the second dimension
# Generate animated avatars
from ppgan.apps import Photo2CartoonPredictor
%cd /home/aistudio
p2c = Photo2CartoonPredictor(output_path='/home/aistudio/result/')
p2c.run('./photo.jpg')
Let the picture move ~
%cd /home/aistudio/PaddleGAN/applications/
!export PYTHONPATH=$PYTHONPATH:/home/aistudio/PaddleGAN && python -u tools/first-order-demo.py --driving_video ~/2.MOV --source_image /home/aistudio/result/p2c_cartoon.png --relative --adapt_scale --output ~/work
Make the video clearer
%cd /home/aistudio/PaddleGAN/applications/
!python tools/video-enhance.py --input /home/aistudio/work/result.mp4 \
--process_order EDVR \
--output output_dir
Let the video sing ~
%cd /home/aistudio/PaddleGAN/applications
!export PYTHONPATH=$PYTHONPATH:/home/aistudio/work/PaddleGAN && python tools/wav2lip.py --face /home/aistudio/PaddleGAN/applications/output_dir/EDVR/target_edvr_out.mp4 --audio /home/aistudio/music.mp3 --outfile /home/aistudio/target.mp4
%cd /home/aistudio/
file.copyfile('./target.mp4', ' The strongest solution .mp4')
!rm -f photo.jpg
!rm -f music.mp3
.mp3
!rm -f target.mp4
/home/aistudio
Operation guide and troubleshooting
Use guide :
Input the data of the corresponding user-defined module
The final result will appear in the home directory , The file named The strongest solution .mp4
Troubleshooting :
1、 Want videos of multiple schemes
You can run all of them again or just run Information confirmation 、 Information processing 、 Let the video sing The module can
2、 The image processing part reports an error , No avatar is recognized
Change your avatar , It may be that the code has no eyes , I can't find your beautiful face in the golden age ~ Come back and tell me I will beat it !
3、dlib The library cannot be loaded
Use the advanced version V100 32GB Read in the above environment
4、 Other unknown errors and problems
You can leave a message behind the project to ask , Will take time to answer !
In particular
This project should be the last episode of this series , There are no new plans and plans at present , I hope everyone can do it and cherish it ~~~~
Author's brief introduction
author : Three years old
experience : self-taught python, Now it's in paddle Community , I hope to start from the foundation with you , Learning together Paddle
csdn Address :https://blog.csdn.net/weixin_45623093/article/list/3
I am here AI Studio Gain the supreme level on , Lighten up 9 A badge , Let's talk to each other ~ https://aistudio.baidu.com/aistudio/personalcenter/thirdview/284366
The legendary flying oar community is the most famous person , Let's work together !
remember : Three year old products must be high-quality products ( Shameless series )
Bless the single friends in " Don't eat too much when you are full ", As soon as possible to take off the list !!!!
I wish other friends
while(True):
print(9, end='')
边栏推荐
猜你喜欢

C语言实现简单学生成绩管理系统的方法

Thrift 序列化协议浅析

开源项目丨Taier1.2版本发布,新增工作流、租户绑定简化等多项功能

Forage QR code -- online QR code generator

Thoughts on the construction of some enterprise data platforms

Minitest -- applet automation testing framework

2022 high altitude installation, maintenance, removal of examination question bank and online simulated examination

BGP experiment

Floating point data type in C language (did you learn to waste it)

Open source project - taier1.2 release, new workflow, tenant binding simplification and other functions
随机推荐
How to effectively conduct the review meeting (Part 1)?
[translation] salt companies come to linkerd for load balancing, and stay for efficiency, reliability and performance
Mobile phone scrolling screenshot software recommendation
How did Dongguan Huawei cloud data center become a new model of green data center?
[线程安全问题] 多线程到底可能会带来哪些风险?
unittest执行runTestCase提示<_io.TextIOWrapper name=‘<stderr>‘ mode=‘w‘ encoding=‘utf-8‘>解决方案
Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
2022 safety officer-a certificate operation certificate examination question bank simulated examination platform operation
C语言实现简单学生成绩管理系统的方法
Hcip day 10
String转为long 类型报错原因:要转为long必须是int、double、float型[通俗易懂]
PowerDesigner creates a database model (conceptual model example)
【LeetCode】1331. 数组序号转换
@Solution to DS ('slave') multi data source compatible transaction problem
Nport serial server configuration website (whether the serial server is from network port to serial port)
Database optimization understanding these is enough
Another way of understanding the essence of Hamming code
聊天室功能的实现
Floating point data type in C language (did you learn to waste it)
Literature reading (245) roller