. Intelligent Image Recognition object . This step is the core of the intelligent magic garbage classification. Principles of artificial intelligence will come to recognize the new picture belongs classified according to label tag the massive picture. Curious readers may ask, I never learned the depth of learning ah? I will not train the model, how do? python big laugh, "It's okay, bat and other giants have long these core capabilities of artificial intelligence packaged as an interface easy to use the! for the Double Happiness Bird rapid development, as long as we stand on the shoulders of giants on the line." core technical principles intelligent recognition category picture. This is Baidu smart api used, as long as the picture passed Baidu api, API will identify the picture, and the picture belongs to Category Returns an array list. Intelligent recognition of classification labels effect is shown in the picture on the left is drawing on the right is the identification and classification api Tags: There are such a good stuff, let's look at how to use it immediately. First, the user application and the API key Baidu image recognition. Please venue Baidu smart api Center application. Baidu image recognition mounting the Python :
Initialization AipImageClassify AipImageClassify Python SDK is a client-side image recognition, provides a series of interactive method using image recognition developers. AIP Import AipImageClassify from General object recognition interface call the request for the general object recognition, i.e. for the input hand images shot garbage (normally decoded, and an appropriate aspect ratio), the output picture of an object and the scene tag. "" "Read image", "" After the call to return the results the following example: { The results can be seen that the returned information contains identification information of the object tag. And has a score and other fields, actually represents what the meaning of it? Consider the following results of the detailed definition of it . The results detailed definition 4. Results and text similarity matching entries . Once you have the picture belongs to the category labels need to be matched according to the similarity of natural language similarity and garbage entries. After calculating matching, matching the highest return garbage micro-channel interface prompts the user what the specific classification is garbage, garbage classification since this smart little program development is completed. Python key points involved are: the need to structure the entry of garbage to the python code. Before design, please refer to the official garbage classification guide map. Python code corresponding to: } = {trash_cat The picture identification tags and garbage matching entries, select the entry that best matches the garbage. python the key code, after the tag word is formed: all_doc_list = [] Then get word dictionary method bag (bag-of-words) dictionary = corpora.Dictionary(all_doc_list) Corpus made using doc2bow corpus = [dictionary.doc2bow(doc) for doc in all_doc_list] Similarity analysis using TF-IDF model modeling corpus tfidf = models.TfidfModel(corpus) Obtaining the test document, each word of the TF-IDF value tfidf[doc_test_vec] Then you can according to the similarity matching, and the picture identification tag and the entry that most closely matches the classification associated, the user is returned to. For a development program for small python programmers have to know an hour has been easier to develop an intelligent recognition can be based on Baidu smart api garbage classification program making a map of the. The magic of it! Summary: This article talked about the pain from the point of garbage, by way of illustration applets + micro-channel intelligent recognition api + NLP text similarity such as the development of key points, giving programmers interested in the use of artificial intelligence technology, to develop a short-term high-efficiency smart easy waste separation application pointed out a convenient road. I hope you can python technology, make our lives easier and better. Welcomes the exchange of opinions and suggestions in the comments area. This article represents only personal point of view, does not mean that SEO Research Association Network (www.seoxiehui.cn) official sound of views doubt please contact the author to be modified, if illegal or infringing content, please contact the publisher or author delete, For assistance, please contact platform to platform administrator mailbox [email protected]. Learn Internet marketing techniques go a giant push Institute www.jutuiedu.com. |
Python fight
Guess you like
Origin www.cnblogs.com/blogst/p/11411732.html
Recommended
Ranking