Build your own Neural Network for CIFAR-10 using PyTorch

In 6 simple steps

Neural network seems like a black box to many of us. What happens inside it, how does it happen, how to build your own neural network to classify the images in datasets like MNIST, CIFAR-10 etc. are the questions that keep popping up. Let’s try to understand a Neural Network in brief and jump towards building it for CIFAR-10 dataset. By the end of this article you will have answers to :

  1. What are neural networks?
  2. How to build a neural network model for cifar-10 dataset by using PyTorch?
Firing of neurons in brain [4]

What are neural networks?

Neural networks(NN) are inspired by the human brain. A neuron in a human brain, individually is at rest until it collects signals from others through a structure called dendrites, when the excitation that it receives is sufficiently high, the neuron is fired up(gets activated) and it passes on the information. Artificial neural networks(ANN) are made up of interconnected model/artificial neurons(known as perceptron) that take many weighted inputs , add them up and pass it through a non-linearity to produce an output. Sounds simple!

Obviously, the perceptron isn’t a complete model of human decision making! But perceptrons can weigh up different kinds of evidence in order to make decisions. A neural network is made up of a input layer, a hidden layer and outputs layer which are made up of many perceptrons interconnected. Such network of perceptrons can engage in sophisticated decision making. It turns out that we can devise learning algorithms which can automatically tune the weights and biases of an ANN. We can add many hidden layers. A NN with multiple hidden layers is called a multi layer perceptron network aka. MLP. The terms NN, ANN and MLP can be used interchangeably.

Jobs in ML

What exactly is a NN trying to do? Just like any other machine learning model, it is trying to make good predictions. Now, instead of considering it as a black box, we can see it as an interconnection of neurons carrying bits of information and firing up of neurons relevant to the output(prediction). I encourage you to dig deeper about NNs as they never go out of fashion! Check out this video to understand more about neural networks.

Getting started !

Let’s get started with building our Neural Network (MLP) on the very famous problem of object classification using CIFAR-10 dataset. Here is a complete guide with code with various steps involved from downloading the dataset to building a base model to training and testing your model. Buckle up guys!

Building the neural network :

Follow the procedure given which I have broken down into 6 simple steps :

  1. Preparing and exploring the dataset

We need the following libraries and dependencies to start coding. Numpy deals with arrays, pandas with data-frames and torch with tensors.

If any of the above import fails, you can run the following command to install the modules.

!conda install numpy pandas pytorch torchvision cpuonly -c pytorch -y

Exploring the dataset

Before staring to work on any dataset, we must look at what is the size of dataset, how many classes are there and what the images look like. Here, in the CIFAR-10 dataset,

  • Images are of size 32X32X3 (32X32 pixels and 3 colour channels namely RGB)
  • There are 10 classes.
  • The dataset consists of 60000 with 6000 images per class .
  • There are 50000 training images(this means we get 5000 images per class for training our NN) and 10000 test images.

We can download the dataset train and test datasets as follows:

As we will be working with tensors in PyTorch, we have transformed the dataset into tensors using transform=ToTensor() parameter.

The size of training and test datasets can be checked as shown below:

We can enlist the 10 classes in the dataset as:

The next step in exploring the dataset would be :

  • Check the size of the tensors formed from the images.
  • Display the images, and see for yourself how difficult it is even for a human to recognize the object in the image with the resolution of 32X32X3.

Notice that the PyTorch tensor’s first dimension is 3 i.e. the colour channels, but to display an image for which we are using matplotlib take this channel dimension as its last dimension, so we will be using the permute function to shift the dimension.

Data preparation for training

There is one more set we need other than training and testing sets to check the validity(accuracy) of network before using it for inference, called the validation set. The validation set is required for parameter selection and to avoid over-fitting.

Trending AI Articles:

1. Machine Learning Concepts Every Data Scientist Should Know

2. AI for CFD: byteLAKE’s approach (part3)

3. AI Fail: To Popularize and Scale Chatbots, We Need Better Data

4. Top 5 Jupyter Widgets to boost your productivity!

It may happen sometimes, that if you train your model on a training set only, you get very good accuracy and over-fit leading to very poor performance on test set. Thus, we use a validation set of 5000 images(this may vary). Here 10% of the training dataset has been used as the validation set. We have used a torch.manual_seed(seed), it will set the seed of the random number generator to a fixed value, so that when you call for example torch.rand(5) (a random fucntion), the results will be reproducible.

We use the random_split() function to split our dataset into the training and validation sets as follows :

For training our model we need to form batches of images from our dataset, so we will be using the DataLoader() function provided by PyTorch. Read the documentation for the detailed explanation of parameters. DataLoader gives us a dynamic environment to create the batches and makes our data easily iterable.

2. Base model structure

Now, we will create a generic basic model for solving our classification problem. This model can be extended to solve any classification problem not just CIFAR-10. We will be building on top of the nn. Module class already provided by PyTorch, it contains the initialization and forward methods.

Here, we have defined the evaluate function that is used for the validation step. We have already seen why we need the validation accuracy.

We also define the fit function in which we define our training loop(forward pass and backward pass, calculating loss and optimizing the loss function), and different hyper-parameter are given to this fit function like the epoch, learning rate and optimization function(which by default we have set to SGD(Stochastic gradient descent)).

The loss function used is the cross-entropy loss which has in-built negative log likelihood loss and softmax also, which can be easily used for the classification task.

3. Use of GPU(Graphics processing unit) in processing data

As training a neural network will be time and resource consuming, we may use GPUs instead of CPUs for training our network, as it will be faster and the CPU will be free to perform other processes. Modern GPUs provide superior processing power, memory bandwidth and efficiency over their CPU and are faster in tasks that require multiple parallel processes, as required in machine learning. Here is the process you might follow if you have GPU :

As you can see, I have nvidia GPU available so the device shows type = ‘cuda’. You can use Google Colab if you do have a graphics card in your machine.

The data can be transferred to the GPU as shown. We will be doing it in batches(we won’t transfer the whole dataset at a time), as it will save the memory, or it might happen that your whole training set doesn’t fit into the GPU.

4. Defining the architecture of the model

We are defining one more class here, to define our architecture(layers in the model).

I have used a five layer model and ReLU(Rectified Linear Unit) function, a non-linear activation function that has gained popularity in the deep learning domain. The main advantage of using the ReLU function over other activation functions is that it does not activate all the neurons at the same time. This means that the neurons will only be deactivated if the output of the linear transformation is less than 0. I have used a deep model, you can experiment with the architecture and chose the one that works best for you.

Now, we will calculate the accuracy of our model, so that we can see what happens when the weights are random.

We observe that the accuracy is approx. 10%, as there are 10 classes the accuracy with random initializations cannot be expected more than this.

5. Training the network and hyper-parameter tuning

Let’s train our model for 10 epochs and with a learning rate of 0.01 and with Adam optimizer.

Some of the observations that can be made are :

  • When I trained the model using SGD, it was slow as it oscillates when there are deep sides. But using Adam(Adaptive Moment Estimation) the learning was better and fast, it took less number of epochs to train the network, its adaptive learning rate, bias-correction and momentum make it a good choice.
  • Initially I have used a high learning rate as the learning in the beginning is coarse, and it might help find the optimal learning rate. As we can see the accuracy is increasing, the learning rate worked for some epochs. We have moved closer to the minima.
  • Now, we lower the learning rate, do fine tuning for some epochs and stop our training when we see that there is no further change in the accuracy. I have done manual tuning of learning rate. But, there are learning rate schedulers which can do this job for you.
  • You can change the number of epochs, more epochs means more training.
  • Plot the loss and accuracy graphs using matplotlib.
Loss decreases and accuracy increases with number of epochs : left) loss vs. no. of epochs graph right) accuracy vs. no. of epochs

6. Testing the model

This is the last step. We check the accuracy of our model on test images.

Yay! Accuracy of 53% ?. This means our model predicts the object more than 50% of the time correctly. This can be further improved by using a different architecture of more hyper-parameter tuning. I have provided a link to my complete notebook in the references. Give it a try!

We get a low accuracy because our NN is not looking at the image as a whole, but individual pixels. It doesn’t capture the spatial invariance. This can be done using Convolutional Neural Networks(CNN).

References

  1. Read about how neural networks can learn any function.
  2. CIFAR-10 dataset
  3. My notebook
  4. Link to the image (firing neurons)

Don’t forget to give us your ? !


Build your own Neural Network for CIFAR-10 using PyTorch was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/build-your-own-neural-network-for-cifar-10-using-pytorch-9bdffb389b7a?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/build-your-own-neural-network-for-cifar-10-using-pytorch

Microsoft Azure Machine Learning x UdacityLesson 5 Notes

Microsoft Azure Machine Learning x Udacity — Lesson 5 Notes

Detailed Notes for Machine Learning Foundation Course by Microsoft Azure & Udacity, 2020 on Lesson 5 — Applications of Machine Learning

In this lesson, you will learn about the most important applications of ML, including deep learning, similarity learning, text classification, feature learning, and anomaly detection.

Similarity Learning

  • Closely related to classification and regression
  • Uses a different type of objective function
  • Often used in recommendation systems
  • Often used in solving verification problems (speech, face, etc)

Similarity Learning as a Classification Problem:

  • Maps pairs of entities to a finite number of similarity levels (ranging from 0/1 or any number of levels)

Similarity Learning as a Regression Problem:

  • Maps pairs of entities to numerical values

Ranking Similarity Learning:

  • A variation from the regression approach where the supervision is weakened from an exact measure to ordering measure. This is a better approach to real-life large-scale problems.
Jobs in ML

Recommender Systems

A typical application of Similarity Learning. The aim of a recommender system is to recommend one or more items to users of the system, e.g. movies, restaurants, books, songs. A user might be a person, a group of persons, or another entity with item preferences.

Content-base Recommender: makes use of features for both users and items. Users can be described by properties such as age or gender. Items can be described by properties such as the author or the manufacturer. Typical examples of content-based recommendation systems can be found on social matchmaking sites.

  • Makes use of features for both users and items
  • User properties: age, gender, region, etc
  • Item properties: author, manufacturer, etc

Collaborative Filtering Recommender: uses only identifiers of the users and the items. It is based on a matrix of ratings given by the users to the items. The main source of information about a user is the list of the items they’ve rated and the similarity with other users who have rated the same items.

  • Uses only identifiers for users and items (not properties)
  • Calculates recommender properties, or ratings, from a matrix, Creates a very large matrix of preferences between users and items, and based on those we get information from that particular matrix of ratings.
  • Ratings can be either explicit or implicit

Text Classification

The process of translating the text into some kind of numerical representation is commonly referred to as Text Embedding. Text embeddings come into two major forms:

  1. Word Embedding: transform every single word in our text into a numerical vector that has a number of features or a certain dimension, for example, 100 features, and then use that representation down the line in the model training process. Embedding enables us to gain a deeper understanding of the structure of the text and hence, unlock some of the more complex scenarios. There is also a twist to word embedding, which is called Sentence Embedding, where word embeddings are combined for all the words in the sentence to create a single embedding at the sentence level. Once we have this resulting numerical representation, usually in the form of vectors, then we can basically feed that data into a wide range of classification algorithms.
  2. Scoring: calculate some kind of score that is related to the importance of that particular word in the text. The scoring approach is a simpler one and enables us to understand the global properties of the text like for example, sentiment. However, it does not allow us to perform the more complex tasks on texts like, for example, machine learning translation.

Training a Classification Model with Text:

We start off with a set of documents, their associated labels, and train a model that would classify every single component with respect to a certain rule based on a description.

The first step is to normalize those documents. For example, identify parts of speech, remove some components, do the lemmatization, etc. There are several tasks of text normalization that you can apply.

The next part is to apply feature extraction. Feature extraction is a two-step process. We define a vocabulary of the texts which is identifying individual words based on their frequencies and recording them as a vocabulary.

Once you have that vocabulary, you can vectorize your documents using various approaches like word embedding or scoring, e.g. TF-IDF.

Finally, a Machine Learning model will be obtained capable of classifying documents.

Predicting a Classification from Text:

Take in the test set and apply the same processes that were previously applied to the training set i.e, text normalization, feature extraction, and embeddings. It is important to use the same vocabulary used for the test set because otherwise, the predictions will be inaccurate.

The test set is then fed into the classification model which produces labels for the new text.

Feature Learning

Feature Engineering is one of the core techniques that can be used to increase the chances of success in solving Machine Learning problems. As a part of feature engineering, Feature Learning (also called Representation Learning) is a technique that can be used to derive new features in your dataset.

Existing features are sometimes not good enough and having the right input features is an important prerequisite for training high-quality ml models. Hence, feature engineering is used to transform sets of inputs into new, more useful inputs to solve a particular problem.

Supervised Approach:

New features are learned using data that has already been labeled.

Examples:

  • Datasets that have multiple categorical features with high cardinality
  • Image classification

Unsupervised Approach:

Based on learning the new features without having labeled input data. With this approach, labels are actually not needed in the existing data because new features can be learned using the following algorithms and used as inputs for model training.

The typical form of feature leaning is Clustering. A cluster identifier can act as a new feature when assigned to a bunch of rows when splitting the data into different clusters.

Other algorithms:

  • Principle Component Analysis
  • Independent component Analysis
  • Autoencoder
  • Matrix Factorization

Applications of Feature Learning

Image Classification with Convolutional Neural Networks (CNNs):

One of the applications of feature learning is Image Classification where Deep Learning models with their hidden layers are capable of automatically learning features from images.

A convolutional neural network is a special case of a deep learning neural network that has a combination of hidden layers that have some very specific abilities in learning hidden features. A typical convolutional neural network will consist of a stack of two types of hidden layers. One is the convolution layer, the other one is the max-pooling layer. Finally, the output uses a densely connected layer to produce the final classification.

You can use the convolutional layers to:

  1. Learn local patterns: they are translation invariant i.e, once the model learns to recognize a certain type of local pattern somewhere in the image, it can also recognize it somewhere else in the image. That makes the approach so powerful.
  2. Down-sample and make Translation-Invariant: the Max-Pooling layer is applied to down-sample the data using a special kernel and results in a representation that is translation invariant. The max-pooling layer is the one that enables such a classification approach to recognize a human face, even if the picture is taken from different angles.
  3. Densely connect all outputs to learn classification: multiple stacks of convolutional and max-pooling layers applied with a very large number of nodes in those hidden layers are all connected together to form a classification model.

Trending AI Articles:

1. Machine Learning Concepts Every Data Scientist Should Know

2. AI for CFD: byteLAKE’s approach (part3)

3. AI Fail: To Popularize and Scale Chatbots, We Need Better Data

4. Top 5 Jupyter Widgets to boost your productivity!

Image Search with Autoencoders:

Another application of feature learning is an Image Search where the same approach is used as CNNs but to search for images.

An autoencoder is a very special type of neural network that is used for unsupervised learning. The most important feature of the autoencoder is that it is trained to reproduce its own inputs as accurately as possible.

It typically starts with a very large number of inputs. Each layer becomes progressively narrower than the previous one until the minimum layer width is reached. Afterward, layers start to have increasingly larger widths until the last one, which must have the same number of outputs as there are inputs in the first layer.

The middle layer has the smallest width and is of particular importance for two reasons:

  1. It marks the border between the two internal components of the autoencoder — the Encoder: left of that particular layer, and the Decoder: the right of that particular layer.
  2. This layer produces a Feature Vector i.e, a compressed representation of the input (compression as in dimensionally reduced as opposed to reduced in size).

Autoencoders translate those images into n-dimensional vectors, where n is the width of the middle layer. Then, these vectors can be compared with each other using some distance metric like the well-known Euclidean distance.

Once the autoencoder is trained, the encoder can be used to embed inputs into feature vectors. Finally, apply a distance measure to identify similar input images. If that distance is below a certain threshold, there is a high probability that the new image contains the encoded image(s).

Anomaly Detection

Anomaly detection is a machine learning technique concerned with finding data points that deviate significantly from the norm. These anomalies can be of interest, since they may be the result of bad data, unusual behavior, or important exceptions to the typical trends. Usually, the number of abnormalities is much smaller than normal entities.

Supervised Approach:

Binary classification problem where entities must be classified as either normal or anomaly. These classes are highly imbalanced and are based on using a training dataset that has already been labeled as normal/anomaly.

Unsupervised Approach:

A problem of identifying two major groups (clusters) of entities — the normal ones and the abnormal ones (anomalies).

Based on using a training dataset which has no normal/anomaly labels available. The task of the algorithm is to create a model which would be able to define anomalies and then classify the data between anomalies and normal entities.

Applications of Anomaly Detection:

  • Condition monitoring (industrial maintenance) and failure prevention
  • Fraud detection (banking, telecommunications, etc)
  • Intrusion detection (networking)
  • Anti-virus and anti-malware protection
  • Data preparation (outlier identification)

Forecasting

Forecasting is a special case of Machine Learning problems in which given a set of ordered data points predict the next data points in the series.

Forecasting is a class of problems that deals with predictions in the context of orderable datasets. These orderable datasets can be time-series datasets, but they don’t have to be — forecasting can be applied to other types of orderable sets as well.

Types of Forecasting Algorithms:

  • ARIMA — AutoRegressive Integrated Moving Average: initially designed provide some description for a random time-based processing i.e. time-series.
  • Multivariate Regression: the problem of forecasting can also be modeled as a regression problem, where the task is to predict a numerical value for the very next iteration of your time series. With the multivariate regression approach, the algorithm can also take into account other properties of the entities that occur in the time series to improve the predictive accuracy of your model.
  • Prophet: a time series based algorithm that was specifically designed to be capable of taking into account the strong seasonal effects.
  • ForecastTCN — Temporal Convolutional Network: a very special, one-dimensional convolutional network. It is one-dimensional because this approach is based on time-series. According to the latest scientific research, ForecastTCN is capable of exhibiting a longer memory than other similar approaches.
  • Recurrent Neural Network: The recurrent architecture is basically referring to a class of networks that have additional connections between the nodes. The spectacular property of RNNs is that they can effectively learn time-based patterns and have revolutionized areas like speech recognition, text-to-speech synthesis, and machine translation. Types of RNNs are Long-Short Term Memory (LSTMs), Gated Recurrent Unit (GRUs), etc.

Lesson Summary

In this lesson, you’ve learned the fundamentals of deep learning, including:

  • The differences between classical machine learning and deep learning
  • The benefits and applications of Deep Learning
  • How to train your first neural network model

Next, you learned about some of the most important specialized cases of model training, including:

  • Similarity learning and the basic features of a recommendation engine
  • Text classification and the fundamentals of processing text in machine learning
  • Feature learning, an essential task in feature engineering
  • Anomaly detection
  • Time-series forecasting

Don’t forget to give us your ? !


Microsoft Azure Machine Learning x Udacity — Lesson 5 Notes was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/microsoft-azure-machine-learning-x-udacity-lesson-5-notes-442255585061?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/microsoft-azure-machine-learning-x-udacitylesson-5-notes

The 70% Rule of Thumb for AI Projects

How to Create Business Value Using AI

When planning an AI project, a good rule of thumb to use is the 70% rule. The 70% rule says a successful AI project will consist of: 10% AI algorithms, 20% technology, and 70% business process transformation.

The 70% rule of thumb is a good reminder that both the business and technical sides of your company need to work together to successfully transform your processes.

Let’s look at each driver and then see how that applies to a specific client example.

AI > Technology > Transformation

Driver 1. AI

AI algorithms are catching everybody’s eye these days. And for good reason — tasks that once required human intelligence can be executed by a machine using AI algorithms. These algorithms can dramatically alter and improve how work gets done, and that opens up new possibilities. But AI’s sizzle is only 10% of a successful project.

Jobs in ML

Driver 2. Technology

The technology stack makes up another 20% of what is required to make the AI algorithms work. AI is always integrated into the pipeline of data processing, and into a technology stack needed for the work to get done.

Driving powerful results requires MLOps, which is the integration of AI into the enterprise IT architecture, power functioning in that solution ecosystem, and operations. For algorithms to create value, they require a technology bridge into the enterprise.

Trending AI Articles:

1. Machine Learning Concepts Every Data Scientist Should Know

2. AI for CFD: byteLAKE’s approach (part3)

3. AI Fail: To Popularize and Scale Chatbots, We Need Better Data

4. Top 5 Jupyter Widgets to boost your productivity!

Driver 3. Business Process Transformation

AI and technology can power big change, but not in a vacuum. Gartner describes AI as a business problem, not a technology problem, for this reason.

Getting an AI-based solution into production and then transforming the process is 70% of the work. That’s because it requires changing familiar processes and systems, and re-evaluating both how work gets done and people’s roles in all of the steps along the way.

Get the Ebook: 6 AI Pitfalls to Avoid

Want to Use AI to Transform? Know This

To create business impact from AI requires AI algorithms plus technology plus process transformation. After years of helping our clients create business value using AI, we know the 70% rule of thumb to be a valid principle with broad application.

Don’t forget to give us your ? !


The 70% Rule of Thumb for AI Projects was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/the-70-rule-of-thumb-for-ai-projects-92740de3cc9c?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/the-70-rule-of-thumb-for-ai-projects

Introduction to Statistics for Data Science

Statistics is foundational for Data Science and a crucial skill to master for any practitioner. This advanced introduction reviews with examples the fundamental concepts of inferential statistics by illustrating the differences between Point Estimators and Confidence Intervals Estimates.

Originally from KDnuggets https://ift.tt/2DKaH7O

source https://365datascience.weebly.com/the-best-data-science-blog-2020/introduction-to-statistics-for-data-science

How Natural Language Processing Is Changing Data Analytics

As it becomes more prevalent, NLP will enable humans to interact with computers in ways not possible before. This new type of collaboration will allow improvements in a wide variety of human endeavors, including business, philanthropy, health, and communication.

Originally from KDnuggets https://ift.tt/2DCZkyF

source https://365datascience.weebly.com/the-best-data-science-blog-2020/how-natural-language-processing-is-changing-data-analytics

KDnuggets News 20:n31 Aug 12: Data Science Skills: Have vs Want: Vote in the New Poll; Netflix Polynote is a New Open Source Framework to Build Better Data Science Notebooks

Vote in the new KDnuggets poll: which data science skills you have and which ones you want? Netflix is not only for movies – its Polynote is a new open source framework to build better data science notebooks; Learn about containerization of PySpark using Kubernetes; Read the findings from Data Scientist Job Market 2020 analysis; and Explore GPT-3 latest.

Originally from KDnuggets https://ift.tt/2PNw76i

source https://365datascience.weebly.com/the-best-data-science-blog-2020/kdnuggets-news-20n31-aug-12-data-science-skills-have-vs-want-vote-in-the-new-poll-netflix-polynote-is-a-new-open-source-framework-to-build-better-data-science-notebooks

Top July Stories: Data Science MOOCs are too Superficial

Also: A Layman’s Guide to Data Science. Part 3: Data Science Workflow; The Bitter Lesson of Machine Learning; Free MIT Courses on Calculus: The Key to Understanding Deep Learning.

Originally from KDnuggets https://ift.tt/2F8QFnK

source https://365datascience.weebly.com/the-best-data-science-blog-2020/top-july-stories-data-science-moocs-are-too-superficial

Will Reinforcement Learning Pave the Way for Accessible True Artificial Intelligence?

Python Machine Learning, Third Edition covers the essential concepts of reinforcement learning, starting from its foundations, and how RL can support decision making in complex environments. Read more on the topic from the book’s author Sebastian Raschka.

Originally from KDnuggets https://ift.tt/2DJiB15

source https://365datascience.weebly.com/the-best-data-science-blog-2020/will-reinforcement-learning-pave-the-way-for-accessible-true-artificial-intelligence

Unit Test Your Data Pipeline You Will Thank Yourself Later

While you cannot test model output, at least you should test that inputs are correct. Compared to the time you invest in writing unit tests, good pieces of simple tests will save you much more time later, especially when working on large projects or big data.

Originally from KDnuggets https://ift.tt/2F7Trtq

source https://365datascience.weebly.com/the-best-data-science-blog-2020/unit-test-your-data-pipeline-you-will-thank-yourself-later

AI can serve you Veg. meat which tastes better than meat what?

“Tasting is believing” — NotCo cofounder Matías Muchnick

We eat amazing things and every time someone asks how it was? We would generally reply with how it tasted, this isn’t surprising, also our eating habits are majorly dependent on how visually appealing it looks and how good something tastes but think about it again, do visual appearances matter so much? We all have drunk dairy milk once in our lifetime and still many of us don’t like it(including me). I mean just look at it, how boring it is and it tastes kind of meh to me, on the other hand, look at this picture of a burger, you can feel the deliciousness just by gazing at it. Definitely visual aspects do have some weightage when it comes to food likings and it is as straightforward as you won’t accept to eat mayonnaise which looks like mayo but doesn’t taste like one and this is because of our tastebuds which have a very bad habit of remembering how something tastes.

It’s been more than 18 years of efforts of making meat and other non-vegetarian food items by using plant-based replacement and there are few successful products out there in the market. But all this just to make all the vegans and vegetarians have a luxury of knowing how non-vegetarians foods taste like? Seriously? Why don’t we make them eat meat? Believe me, that would be the worst solution to the problem. It is not that simple equation, we will come back to it later. First, allow me to explain to you how they are making veg meat.

Jobs in AI

Remember I told you, scientists are working on this since the last 18 years, it is not just a random number what I choose to put to make it sound cool. The process of understanding each food item takes time and mimicking the same with plant-based ingredients takes more time, it is not only about getting the properties right at its molecular level. Texture, appearance, flavour and functionality should match too. To put it simply, plants are crunchy, and meat is chewy. Companies like Impossible Food and Beyond Meat are the one’s who started early in this game and have already launched their products in the market and achieved one of the top positions on the demand chart but it took a while, and by this I mean the Impossible Food was founded in 2011 and launched their only product, meat, in the year 2016. It is practically not possible for a bunch of people to experiment with all possible ingredients to come close to the original product by trying out hundreds of recipes in a short span of time.

In the year 2015, a company was founded named ‘NotCo’, which claimed to make plant-based mayonnaise and milk and surprisingly it was registered as a tech company, not a food company. The hidden gem of NotCo was not their product rather the Machine Learning Algorithms, the so-called AI they use to make it. They named it Giuseppe after the Renaissance painter Giuseppe Arcimboldo, famous for his portraits of human faces constructed with fruits and vegetables.

The Giuseppe reportedly uses many more than 1,000 plant-based proteins in its data set to find meat and dairy replacement ingredients. It does the genome mapping to figure out which combinations would give much similar product.

Trending AI Articles:

1. Machine Learning Concepts Every Data Scientist Should Know

2. AI for CFD: byteLAKE’s approach (part3)

3. AI Fail: To Popularize and Scale Chatbots, We Need Better Data

4. Top 5 Jupyter Widgets to boost your productivity!

source: https://www.youtube.com/watch?v=BK3wYZkQs1c

The above image shows the basic idea behind the process of making plant-based milk using NotCo’s AI which is proven to be tastier and creamy than the ideal milk sold in the market. Each time the NotCo team inputs the food item they hope to replace, the algorithm delivers an output of 50 to 60 recipes. The team then tests each version of the recipe, giving the flavour, texture, colour, and other properties numerical rankings, which are incorporated back into the algorithm. This makes the process of experimenting and prototyping much faster than the conventional laboratory method. All the successful product they launch has a ‘Not’ as a prefix to the original product name, The milk they made is called Not Milk, clearly, I am ‘Not surprised’ by the naming convention. And here is the amazing part, In the year 2019 NotCo Raises $30M in Funding.

Replacing animal-based foods can’t be the only reason why this startup is successful and has a good future. When we talk about plant-based foods it delivers a long list of benefits. It’s been long known, and long ignored by meat-eaters, that plant-based diets are good for people’s health and the environment.

  • Meat Production Produces Greenhouse Gases: Experts predict a vegan world could reduce greenhouse gas emissions by 70%.
  • Meat Production May Be Contributing To Antibiotic Resistance: Many animals in close quarters are constantly fed a low dose of antibiotics to reduce illness across the livestock.
  • Factory Farm Conditions Make Many People Sad: Often, animals in factory farms are subjected to what many consider cruel.
  • Vegetarian Diets May Reduce The Risk Of Cardiovascular Disease: Limiting the amount of meat consumed can reduce cholesterol levels, decreasing the risk of heart disease.

Seeing all these benefits pushes us to think about environmental harm meat causes. Hats off to all the amazing startups which took the initiative and advantage of the growing technology to bring a new revolution in the food industry. Talking about NotCo, now selling us Not Mayo, Not Milk, Not Ice-cream and soon in 2021 they are launching ‘Not meat’ in the market which reportedly tastes better than meat and has the same nutritional properties. The above burger image is one of the promised product by NotCo (sounds like a treat to me!!).

Now, we all can contribute to the world just by eating our favourite foods without compromising its nutritional value and taste, just like how we contributed to the world during a pandemic by lying on the couch. What an amazing time to be alive.

Don’t forget to give us your ? !


“AI can serve you Veg. meat which tastes better than meat”, what? was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/ai-can-serve-you-veg-meat-which-tastes-better-than-meat-what-f3cb3312898e?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/ai-can-serve-you-veg-meat-which-tastes-better-than-meat-what

Design a site like this with WordPress.com
Get started