> For the complete documentation index, see [llms.txt](https://sharinghub-eng.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub-eng.kittenbot.hk/programming-platforms/kittenblock/kittenblock-functions-and-features/kittenbot-extensions/machine-learning/machine-learning-5-feature-extraction.md).

# Machine Learning 5 Feature Extraction

### Loading the extension for Machine Learning 5

```
The Video Sensing extension is also used in this tutorial.
```

Open up the extension page.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/add.png)

Select Video Sensing, Machine Learning 5 and the Pen extension.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/add2.png)

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml28.png)

New programming blocks will be added.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml6.png)

If your computer has a low specification(e.g. lacks a discrete GPU), its performance maybe enhanced by using CPU mode.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml14.png)

### Feature Extraction

#### Example 1: Rock Paper Scissors

Turn on the camera and initialize the feature extractor

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml15.png)

Teach the program to recognize the background.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml16.png)

Teach the program to recognize rock.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml17.png)

Then teach the program to recognize paper and scissors.

The program is now able to recognize these gestures.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml18.png)

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml19.png)

The trained model can be saved as a json file for use in other programs.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml20.png)

We can load a model from before.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/ml21.png)
