# Box to Instance

The origins of Box to Instance were a couple of companies coming to us and saying they had large datasets with bounding boxes that they needed to convert to instances. This seemed like a reasonable request to us, so we created a specific tool to help.

The tool can be selected by pressing the icon:

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/box-to-instance/0d4d893a43-1684131918/screen-shot-2021-06-16-at-5.39.06-pm.webp" alt=""><figcaption></figcaption></figure>

...in the toolbar, or by pressing **“O”**.

It works by first taking any bounding boxes on an image, and then using them as anchor boxes in which an AI model looks for instance shapes. The most likely shape is then presented to the user.

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/box-to-instance/8a30db2519-1684131918/screen-shot-2021-06-16-at-5.40.39-pm.webp" alt=""><figcaption><p>In this San Francisco street car project, we use BTI to convert bounding boxes into instances</p></figcaption></figure>

To accept a single prediction, move your mouse over the suggested instance, and left-click on it.

If you have an image with multiple bounding boxes, BTI will give you suggestions for every single one. Here's an example:

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/box-to-instance/35ee0957d8-1684131920/screen-shot-2021-06-16-at-5.53.34-pm.webp" alt=""><figcaption><p>Here we have two bounding boxes that we want to convert. Press "Enter" to convert both.</p></figcaption></figure>

From here, you can either accept suggestions one by one by moving your mouse over the suggested instance and left-clicking - or by pressing "Enter" to accept all suggestions.

**Underneath the hood**

Box to instance is a tool that is directly available when creating a new project or after having imported an existing project. However, it does get smarter over time. For the first ten images, you will have a pre-trained model assisting you when using the tool. After 10 images, we switch to the custom-trained model IS model that you've trained.

**Threshold**

This threshold controls the threshold of how strict the model should be to give you a suggestion. BTI always gives you a maximum of one suggestion per bounding box, but with this, you can control how strict the tool should be with the suggestions it generates. As an example - here we have the same image with two different thresholds:

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/box-to-instance/29f70d6852-1684131920/screen-shot-2021-06-16-at-5.55.51-pm.webp" alt=""><figcaption><p>Here we have a threshold of 18% - note that the kiwi has a slightly irregular shape</p></figcaption></figure>

<figure><img src="https://wiki.cloudfactory.com/media/pages/docs/userdocs/annotation-environment/manual-and-semi-automated-tools/box-to-instance/d52546315e-1684131920/screen-shot-2021-06-16-at-5.57.05-pm.webp" alt=""><figcaption><p>Here we use 96% - the suggestions are now smaller in size</p></figcaption></figure>
