# Crop Model

## Use Cases

Process different documents sent on the same page (usually a photo). The result has both the location (page and coordinates) and the class for each document identified, allowing for complex workflows.

A file sent to the Crop Model may have any number of pages, [within limits](https://docs.mindee.com/integrations/technical-limitations#file-limits). Use the page index in the results to identify on which page the document was found.

Some common examples:

* Single photo of a bunch of receipts on the table
* Front and back of an ID card, each on the same PDF page
* Remove the background from all documents in a multi-page PDF

## Create a Crop Model

1. To create a Crop utility, click on **Models**, and then click on **Create your document AI model**.
2. Scroll to the **Document Utilities** section, click on **Crop.**
3. A pop-up will appear, allowing you to enter the classes you want. Each class corresponds to a document type possibly present in the pages you want to process.\
   \
   For example, if the files you are processing contain ID cards and passports, set the classes as: `ID Card Front`, `ID Card Back`, `Passport`.

{% hint style="info" icon="lightbulb" %}
Add the class `Other` if you need the model to identify documents that are not one of the explicitly defined classes.
{% endhint %}

<figure><img src="https://4029869281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu5bStlX8nv4b9z4GXB2S%2Fuploads%2FznBhWYmnpEDPpVGOOrfp%2Fimage.png?alt=media&#x26;token=277a60db-ae0a-498f-ad2d-3b0a475ea0d5" alt="" width="375"><figcaption></figcaption></figure>

4. Once ready, click on **Create Utility** to create your custom Crop Utility.
5. You can now use the **Live Test** tab to process documents, and the **Utility Configuration** to update your classes.<br>

Your utility is now available in your **Models** tab:

<figure><img src="https://4029869281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu5bStlX8nv4b9z4GXB2S%2Fuploads%2FL1BHuRm8kxppnPVxb8JH%2Fimage.png?alt=media&#x26;token=525885b0-2c93-4de7-86b3-ffc9388b08a0" alt=""><figcaption></figcaption></figure>

Here is a step-by-step tutorial that shows you how to properly create a Crop Utility :

{% @supademo/embed url="<https://app.supademo.com/demo/cmlrtp7mk0u531189vkn2azqr>" demoId="cmlrtp7mk0u531189vkn2azqr" %}

## Integration

{% hint style="info" %}
Class names will be returned exactly as defined on the platform in the return, spaces and capitalization included.

If the class names are changed on the platform, the change in the API return will be immediate for all new files sent.
{% endhint %}

Once your Crop model is created and tested, integration documentation is provided in the "Documentation" page.
