> 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/airelated/ai-camera-koi-2/makecode-programming/image-classifier-running-and-load.md).

# Image Classifier: Running and Load

### MakeCode Programming Tutorial

#### Extension link: [**https://github.com/KittenBot/pxt-koi2**](https://github.com/KittenBot/pxt-koi2)

Search for KOI2 in the search bar, select KOI 2.(KOI 2 has been approved by Microsoft)

<figure><img src="/files/Sw7BOOSrTSX5zHmVemsd" alt=""><figcaption></figcaption></figure>

The extension will be imported into your project.

### Coding Blocks

<figure><img src="/files/AVRYTbQFK5NMPZp69xbk" alt=""><figcaption></figcaption></figure>

### Sample Program

{% hint style="info" %}
Armourbit users need to use the corresponding initialization block
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FPGyECwlPd2M3JqUBLDfO%2Fimage.png?alt=media&#x26;token=662ace3f-a8eb-4fbf-8a10-1d9643c88b1e" alt=""><figcaption></figcaption></figure>

{% embed url="<https://makecode.microbit.org/_8Am6cMfY2YR6>" %}

[Sample Program](https://makecode.microbit.org/_8Am6cMfY2YR6)

#### Sample Program Operations

{% hint style="info" %}
KOI 2 will continously run the image classifier after model has been loaded.

A text message should appear when the model has been successfully loaded.
{% endhint %}

1. Press Button A on the Micro:bit to load the model.
2. Press Button B on the Micro:bit to show the classfied results and its similarity value on the Micro:bit.

### Advanced Usage

{% embed url="<https://makecode.microbit.org/_0VP8RzDaiLXu>" %}

[Sample Program](https://makecode.microbit.org/_0VP8RzDaiLXu)

#### Sample Program Operations

{% hint style="info" %}
KOI 2 will continously run the image classifier after model has been loaded.

A text message should appear when the model has been successfully loaded.
{% endhint %}

1. Press Button A on the Micro:bit to load the model.
2. Press Button B on the Micro:bit to show the classfied results and its similarity value on the Micro:bit.
3. If the classified result is A, a heart icon is displayed on the Micro:bit. If the classified result is B, a smile icon is displayed on the Micro:bit.
