In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Python how to make certificate photos, in view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
Abstract: after flirting with Taobao store, I used Python to do this.
Batch replacement of document background color tool
Before I introduced an AI matting artifact: Remove.bg, use Python to call API to quickly complete photo matting and document photo matting and change the background color, 5 seconds to get a picture, the effect is quite good.
AI artifact with 3 lines of code and 5 seconds matting, no need for PS at all
The API interface here comes from the Remove.bg website. An email account can apply for a free interface that can handle 50 photos. If you want to process more or generate high-definition photos, you need to buy a package, which costs about 1 yuan each.
On Taobao search for "certificate change background color" shops, found that most stores charge 5 yuan, feel that to make good use of the price difference space, there should be business opportunities.
Then I was interested in how Taobao shopkeepers were matting and how the quality of matting was, so I chose the top two stores to do the test and started a "routine" chat with the shopkeeper.
First found the first shopkeeper, the shopkeeper came up and said to send photos first, matting satisfied before paying, so he sent the more difficult one at the beginning of the article to see how good they are:
I didn't expect that the shopkeeper's stinginess lasted 20 minutes.
Looking forward to opening the picture, the hair is not scratched well, and the color of the photo has changed:
After talking to the shopkeeper of the second store, it also took 16 minutes to get it done, which is a little better than the first one:
Comparing the three pictures, from the effect of hair matting and the color restoration of the photo, we can see that AI is the best, and it only takes 5 seconds.
Therefore, it can be roughly summarized that this AI tool basically crushes the Taobao store of manual PS in terms of effect and efficiency.
I feel sorry for the shopkeeper. It took me 20 minutes to win this order.
Such a difficult map AI tool effect is good, that simple certificate photo should be more no problem, basically determine that there are business opportunities.
Next, use Python to improve the above code and package it into an exe file for execution.
It is easy to achieve this function: with just a few keystrokes, you can change the background color of the photo in batches (the common white, blue and red colors), and then change the background in seconds.
The effect is as follows:
The specific implementation is very simple, the first step is to enter API, the second step is to enter the folder where the picture is located, and then the program will first cutout to generate PNG format graphics with transparent background.
Next, the third step is to use the PIL library to set the background color of the picture, and type a letter to generate the corresponding background color ID photo in a second.
B:blue blue
R:red red
W:white White
This makes a simple document photo replacement tool, and it should not be a big problem to open a Taobao shop. the whole process of changing the document photo background can be completed in one minute, focusing on dealing with the document photo, pricing 2 yuan, and fighting a price war, ha.
This is the answer to the question about how to make certificate photos in Python. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.