In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use Python to predict the future child's appearance". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use Python to predict the future child's appearance".
Preliminary preparation
Baidu AI open platform
Account registration
Use your Baidu account to log in to ai.baidu.com, Baidu AI open platform.
Then create a face recognition application.
You'll get API Key and Secret Key, which we'll use in the code later.
Because the number of calls to each account is limited, only 500 times for free, and play and cherish. So you'd better apply by yourselves.
Read the interface development documentation.
Document address: ai.baidu.com/docs#/Face- …
The above is a note, that is, post should take header, if the picture is base64, as well as the request address and other instructions, the document should be read carefully, there will be fewer errors later.
The above picture shows the past data you want to post, such as template template image and target object file. You can also set the picture type, picture quality and so on.
The picture above is a description of what will be returned after you post.
OK, after reading the document, let's get this straight.
Train of thought
Start Coding...
Develop it little by little, don't rush it:
Import module
Get Token
Get picture Base64
Save base to this machine
Because the document tells us that the returned image is base64, so here we also need to convert the base64 into a picture that you can see. So:
Note: the code files are also placed in this folder.
Image fusion
Function test
In the beginning of debugging, to a little bit to test, otherwise your 500 calls are not enough for you to use, and so your code is written, sorry, your number of times used up, such as the following picture, you also play balls ah!
Here is my computer folder. Pay attention to the format of the pictures.
Then write a few lines of code and run it.
Done appears! It means the code is successful! Let's open the folder to see if there is a picture of "done.jpg".
Thank you for your reading, the above is the content of "how to use Python to predict the future child's appearance". After the study of this article, I believe you have a deeper understanding of how to use Python to predict the future child's appearance, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.