This is such a huge area to cover and can be quite bewildering and mysterious. I have attempted to keep it as simple as possible so that you can get a grasp of the key elements without getting too complicated. This builds on the skills I hope you have covered in other sections with p5.js. If you have come straight here I would recommend that you go through as much as possible in the previous sections especially if you haven’t coded before. But you can just start here if you wish, although I will assume certain things.

This is an area that has been around for decades and has winters and summers, there is an extraordinary amount of hype around AI and most of it is superficial at best. However there have recently been some major advances in techniques which are having an impact on our culture and this will only increase. You could chose either ignore it or be afraid of it or dismiss it as a fad but I can assure you it is a tool (or a weapon) that simply will become a bigger part of our lives whether medicine or driverless cars etc.

Artificial Intelligence – an introduction

This part gives you a general introduction to Artificial Intelligence in respect to a neural networks. Some may call it Machine Learning or Deep Learning but I will just reference it all as AI and that will include reinforcement learning etc.

Artificial Intelligence Part 1 Classification

This is your first introduction classifying inputs and predicting outputs. In this simple example you will be using ML5.js with p5.js to collect data, train the model, and predict. Then you will save the data, upload it, train it automatically before testing it.

Artificial Intelligence Part 2 Regression

Whereas classification would give a single outcome e.g. the picture is a dog, for regression it will give you a value, e.g. temperature prediction when given a certain set of environmental circumstances.

Artificial Intelligence Part 3 Pixels

Using the video camera (see additional part 1 video) of your computer/laptop we can train a neural network to recognise when you are in shot or out of shot. This builds on the two previous parts especially classification.

Artificial Intelligence Part 4 Unit 1 Convolutions

This covers a topic that is at the heart of much that AI is used for. There are so many elements to this that it is difficult to know where to start. Unit 1 doesn’t use any AI and introduces the basic concept of convolutions. What I would suggest is watching a 3blue1brown video on the topic and I warn you don’t try to understand it straight away. If you are interested in using convolutional neural networks in image or video processing I suggest doing some more research as there are literally many layers to this.

Artificial Intelligence Part 4 Unit 2 Convolutional Neural Network

This is a relatively short section where you use neural network to do the job of a convolution. It explores layers that you can use and play with to refine the process.

Artificial Intelligence Part 5 Unit 1 poseNet classification

Using poseNet which is a model that can identify the human body and more importantly work out where parts of the body are e.g. left eye or right wrist etc. You can use this model to play games, create art or for simple posture identification e.g. lifting weights, kicking a ball or falling over.

Please note there is currently no unit 2 as it was a bit buggy. It should be an example of poseNet regression, might appear later

Artificial Intelligence Part 6 feature extraction

This is a way of harnessing prebuilt models which you can use to train your own data on. This may sound like cheating but it saves a lot of time and effort. This looks at two models MobileNet and CoCo. In the middle of everything I have also thrown in a KNN example.

Click on the images opposite to access the photos used in the sketches.