What does it mean for iOS to develop AI? preface
In recent years, the topic of artificial intelligence is hot. A lot of big guys in the country talk about machine learning and big data; the artificial intelligence PHD in the United States is also sought after, with wages pushing the NFL four cents. Artificial intelligence has even become the topic of Internet gossip-as if the artificial intelligence is outdated.
As an IOS developer, I have kept a close track and understanding of AI and machine learning in full swing. This article summarizes what I saw and heard in Silicon Valley and Seattle, and I would like to share with you my thoughts on artificial intelligence.
What is AI?
On artificial intelligence (AI), we often hear about these words: Big data, machine learning (learning), neural networks (neural network). So what's the difference between these words? Let's look at a little story below.
Once there was a programmer called Newton. He defines a method to calculate the velocity of free fall:
Func getvelocity (Time T:second), Float { return9.8 * T}
How did he get this method? Newton himself was hit by an apple, after doing a lot of logic deduction and experimental argument, got this formula. This is the traditional way of writing procedures-the understanding of the internal logic and truth of Things, by people to define the method. until today, most of the programs are written in this way.
The so-called AI, is the machine's own definition of the method. There are many ways to implement artificial intelligence, such as allowing a machine to mimic the brain and then think like a human being to define a method. machine learning is just another way to implement AI, which is defined by big data . If there was machine learning in Newton's time, it was the process of drawing the velocity of freefall:
- Collect as many free-fall experimental data as possible. If the data collected are as follows
| principal |
speed (M/s) |
time (s) |
| Galileo |
9.8 |
1 |
| Newton |
19.6 |
2 |
| Da vinci |
29.4 |
3 |
| Aristotle |
30 |
4 |
-
Analyze the data. Machine learning will analyze that Aristotle's data are not accepted in error. Data for the other three people meet the same rules.
-
Define the method. According to the above data, machine learning concludes that speed = time * 9.8.
As data is collected more, machine learning is more accurate. In fact, the process of human learning is very similar: The book has a lot of knowledge (processing data), we read after the understanding of thinking, and then come to their own conclusions.
Kepler is a famous human-flesh machine-learning practitioner: He weighed to see the stars, record the observed data, analyze the data with his own logic and understanding, and finally draw the Kepler-Newton model of the planetary movement. The model is then used to predict the movement of the other planets, while new data is used to correct the parameters of the model and make them approximate to perfection.
So what are the advantages of data compared to people? I think it's faster and more accurate. When defining a method, one always needs to consider the causal, logical, and various circumstances of the method, which sometimes takes a lot of time to study the argument, and ignores certain extreme situations that often occur, leading to a flawed definition. and data in the Internet age, the cost of access is very low. In such cases, the easy availability of large amounts of data will make the method definition more and more rapid, while the reality of the wide range of data coverage, but also make the method defined in order more accurate.
Dr. Wu the advantages of big data in the era of intelligence: "When causality is uncertain, the data gives us a new way to solve the problem, the information contained in the data can help us to eliminate uncertainty, and the correlation between data can in some way replace the original causal relationship, Help us get the answers we want, which is at the heart of big data. ”
We go back to the experiment of Newton's freefall velocity. In fact, the experimental data obtained by machine learning may be recorded as follows:
September 15 night, light rain breeze. Galileo on the Leaning Tower of Pisa dropped 1 shot put, the mass of 4kg, the initial speed of 0, reached the ground time is more than 6s.
This data sample has many characteristics, such as time, air wetting, wind, height of the Leaning tower, shot quality, initial speed, arrival time and so on. So what are the characteristics associated with free fall velocity? This is called unsupervised learning If the machine is to be analyzed by itself. If we tell the machine not to care about quality and time, focus on observing time, which is called supervised learning . The latter is to draw on the wisdom of mankind, so that machine learning has a general direction.
So far, machine learning is still hard to call "intelligence"-it's nothing more than a quicker and more accurate answer. If this is the case, AlphaGo even the nine-stage chess player to study thoroughly (the winning and losing of these players has been determined, the equivalent of man-made notation to walk the law, it is supervised learning), the level is only 10, in the nine paragraphs, that is, notch above, play a more stable point. But the truth is that AlphaGo's chess power is far superior to the highest level of human beings.
In fact, AlphaGo in chess, every next few steps, the system will tell it whether the winning percentage is improved. This constant feedback mechanism allows AlphaGo to strengthen chess forces in real time, and encourages them to try to transcend human beings by trying to get the most out of humans. This kind of feedback training method is called Enhancement study .
Finally, what is the neural network about? In my superficial understanding, neural networks are made up of neurons , and each neuron has its corresponding function. For example, AI wants to identify the female dog in a bunch of animal photos, and the first neuron does it to determine which animals are dogs, and the second neuron makes a distinction between a dog's male and female.
In the above example, we first make a judgement on the first neuron and then pass the result to the second neuron. That is, the input of the latter is the former output, which is the concept of neural network layering . So AlphaGo this large neural network is based on the principle of neuron layering.
Because the development of machine learning in the field of artificial intelligence is a solo show. So the mention of artificial intelligence is almost equivalent to talking about machine learning.
What are the applications of AI in IOS development?
Before saying so much, certainly a lot of people to ask: these are very tall, but I am an IOS engineer, what is the artificial intelligence? In fact, Ai has a long history on IOS and may be in the depth of our daily development, so we need to be highly sensitive to this. Here I would share some of the applications of AI on IOS.
First, Mr. Jobs laid out the smart Voice assistant Siri on his iPhone a few years ago. Siri is the first successful application of AI and machine learning on the mobile side: It combines speech recognition (Speech recognition) and natural language processing (Natural Language Processing) Two AI operations (of course the former is part of the latter). Siri's data is not up to date because of Apple's closed genes, and we all know that data volumes are the key to improving AI levels, so it's now very chicken-free.
Like Siri, Facebook integrates a chat robot (chatbot) in their Messenger App. At last year's F8 scene, I also remember clearly that they claim to be a new era of app development-apps powered by chat bots and AI will replace traditional mobile apps, and Messenger will become a platform and even an operating system from a chat app. This is similar to the small program strategy, just a lot of artificial intelligence gimmick. Unfortunately, many in the field of artificial intelligence told me that the chat robot is still a great distance from maturity.
Facebook chatbot, an AI-optimised shopper service
Here, Ai has no successful case on the IOS side. Until this app was born: Prisma. After reading two papers--"The neural algorithm of art style" and "the Synthesis of arts and sciences by using the neural convolutional network", the old Mozie Alexey developed a PRISMA-style conversion App. Its basic flow is this:
- Users upload Photos
- Send photos to the cloud, and the neural network analysis in the cloud identifies photos
- Output a re-drawn work
- Download the redrawn artwork to the phone
The hardest part of the APP is the time spent in the second step, which is how the model analyzes and studies the photo's style. Alexey optimizes the details of the neural network, making it take only a few seconds for Prisma to redraw a picture. After the app iteration, the neural network model was deployed directly to the mobile side in order to make it faster and to solve the presentation problem of overseas users connecting to the cloud. Taking advantage of the IPhone's powerful processor for offline picture rendering makes Prisma the first mobile app to be able to run offline style and transform neural networks. Now Prisma's processing of a picture takes less than half a second, and it's the perfect combination of art and technology to get the best IOS app of the year, with hundreds of millions of of users.
Finally, we introduce a app:topology eyewear. This is a custom-made glasses for e-commerce applications. It is characterized by the user face recognition, and then on the mobile phone to render the customer to wear different glasses effect.
The success of third-party apps has stimulated the attention of the manufacturers in related fields. Snapchat,instagram,whatsapp has introduced AI technology to its filter effect. At the same time, Facebook and Google also began to light up the AI framework to facilitate deployment on the mobile side. In the WWDC of the 2017, machine learning became the hottest term for the entire conference, and Apple officially launched the Core ML framework. It covers both visual recognition and natural semantic processing, as well as a very customized model-building tool based on a number of well-trained models. The ease of operation makes Core ML popular with developers.
Overall, mobile application AI is a fundamental trend, as Lee Kai-Fu said in his graduation speech at Columbia University: "In the future, with the decline in hardware, software and network bandwidth costs, the cost of artificial intelligence is almost the electricity bill."
Where do IOS developers go?
First of all, I think thatIOS and AI are not opposites, but complementary relationships. iOS applications require artificial intelligence to improve their efficiency and expand their capabilities, and AI technology needs to be implemented as a product on the iOS platform. The era of intelligence is more of an upgrade and complement to the mobile era than a replacement. So there is still a market for iOS development, and we don't have to worry about artificial intelligence that will make us unemployed.
However,IOS developers need to embrace AI . This session of the try! The Swift conference, which has two speeches specifically referring to machine learning; If you have a habit of blogging, you'll find that Facebook's IOS technology column has almost come up with new features developed by AI technology in recent years. For example, the engineering behind social recommendations, the Facebook team in New York has used big data and artificial intelligence to extract a lot of relevant information to recommend restaurants and places of interest to users on the mobile side. The user's status and location are then recommended. Google has incorporated AI into the vast majority of IOS apps. If the IOS developer rejects AI, we may no longer be able to open an app that makes users happy. Just as the algorithm and the computer system are the basic skills of the programmer, the future of AI will also be one of the essential skill of the programmer.
AI will bring a lot of new opportunities to IOS development. the world's leading AI, Professor Michael Jordan, says AI = IA + II + AA. As an IOS developer I deeply believe that the following is my understanding of this sentence:
Ai (Artificial Intelligence) = Intelligent Amplification (Intelligence Augment) + Smart Infrastructure (Intelligent Infrastructure) + Automatic algorithm (Automatic Algorithm).
- Intelligent Amplification: That is, the expansion of our human intelligence. Google search, for example, expands our access to knowledge, and big data can help Cole improve the Golden State Warriors training program and optimize tactical options.
- Smart infrastructure: The Internet of things. Amazon's smart home and Amazon Go no-market, Uber's driverless cars, IBM's smart city, are personalized to each user's needs.
- Automatic algorithm: That is, a variety of AI tools. Deep learning, enhanced learning, neural network improvements, and the introduction and application of TensorFlow, Caffe, MXNet and other frameworks fall into this category.
Either way, IOS development can do a very promising role. Smart Zoom app can be directly oriented to the user, the smart machine must be built to the iOS developer in the terminal to complete the corresponding connection to the user, the use of automatic algorithm will make iOS app more powerful.
Finally, how do you learn AI as an IOS developer? Core ML is the official launch tool, so let's start here. The Core ML Development steps presented by WWDC are divided into the following 3 stages:
- Get machine learning models from other platforms or frameworks
- Import the model into Xcode, Xcode automatically generates the corresponding Swift interface
- Programming with the Swift interface
The usage scenarios are:
- Sentiment analysis
- Object recognition
- Personalized Customization
- Type conversions
- Music tags
- Gesture recognition
- Natural semantic recognition
WWDC display of object recognition applications
And Google's Tensorflow,facebook-led Caffe, along with Amazon's mxnet, can train a great Core ML model for IOS development. These frameworks can also be understood, here vomiting blood suggestions, research AI framework, not recommended fancy instruments, directly to see the English document effect is better. Because these frameworks change quickly, the content of the book is quickly eliminated, and some of the theoretical knowledge is better to see the information.
Conclusion
There are many people are not optimistic about artificial intelligence, think the hype is too hot, just the concept, too many bubbles, hard to get to the ground. As an IOS developer, from a technical point of view, today's AI technology is enough to drive the progress and expansion of our App. Instead of sidelines, let's come in and practice, and hopefully this article will inspire you to develop or focus on IOS.
What it means to develop AI for iOS