> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/deployment/self-hosted/sdks/lens-studio.md).

# Lens Studio

Export a Roboflow object detection model to Snap AR's Lens Studio for use in a Snapchat Lens.

Export an object detection model from Roboflow to Snap AR's Lens Studio, then use it in a Snapchat Lens. Roboflow gives you the model weights and a Lens Studio template project that draws a box around each object the model finds.

{% hint style="warning" %}
Lens Studio export is no longer available for new models. You can export only Roboflow 3.0 object detection models trained before February 25, 2026. Models trained on or after that date, and other model types, cannot be exported to Lens Studio: use another [deployment option](https://docs.roboflow.com/deployment/readme.md) for them.
{% endhint %}

## Task Support

<table data-search="false"><thead><tr><th>Task Type</th><th>Supported by Lens Studio</th></tr></thead><tbody><tr><td>Object Detection</td><td>Yes</td></tr><tr><td>Classification</td><td>No</td></tr><tr><td>Instance Segmentation</td><td>No</td></tr><tr><td>Semantic Segmentation</td><td>No</td></tr></tbody></table>

Exported models work with Lens Studio 4.42 and later.

## Deploy a Model to Lens Studio

1. Open your project's "Deploy" page and select "Third-Party Platforms".
2. Under "Select Version", pick a model version. If the version has no Lens Studio weights, a notice lists the versions that do. Click one to select it.
3. In the "Snap AR" panel, copy the "Class Order" list. You need it to set up classes in Lens Studio, in this exact order.
4. Click "Download Files". Two downloads start: your model weights and the Roboflow Lens Studio template (about 100 MB). If they do not start, allow pop-ups for Roboflow in your browser.

On the older Deploy page, click "Use with Snap AR's Lens Studio" under "More Deployment Resources", then click "Download Files" in the dialog that shows the class order.

<figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-f9c4614b39814c6c8dc8ddf3a40a33ad0a597a56%2Fimg-1-deploy.png?alt=media" alt="Lens Studio export option on the Roboflow Deploy page"><figcaption></figcaption></figure>

### Configure Model in Lens Studio

If you do not have Lens Studio, download it from the [Snap AR website](https://ar.snap.com/lens-studio).

These steps use the Roboflow Lens Studio template. You can also use the weights in any Lens with the [MLController component](https://docs.snap.com/lens-studio/references/templates/ml/object-detection).

1. Unzip the template, then open `Roboflow-Lens-Template.lsproj` from the unzipped folder.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-597eace699d594109cce768295f8972ea5576e33%2Fconfigure-model-1.png?alt=media" alt="Unzipped Roboflow Lens Studio template folder"><figcaption></figcaption></figure>

   The template opens with a coin counting model. It draws a box around each prediction, and you can add your own logic in Lens Studio.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-db3f4d31bcfd8929b64c9a538dc218fb0348750c%2Fconfigure-model-2.png?alt=media" alt="Roboflow template project open in Lens Studio"><figcaption></figcaption></figure>
2. Click "ML Controller" at the top of the left sidebar. Its settings open next to the preview.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-f4f596fc12ab2133674adb97f22c19542b91b6e9%2Fconfigure-model-3.png?alt=media" alt="ML Controller in the Lens Studio sidebar"><figcaption></figcaption></figure>

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-8dd7df74fc99215f7a8f137adc2c259947c04079%2Fconfigure-model-4.webp?alt=media" alt="ML Controller settings next to the Lens Studio preview"><figcaption></figcaption></figure>
3. Click the "ML Model" field, then drag the weights you downloaded from Roboflow into the window that opens.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-da04a177ca1fb96ca0e2232c14db454654c99aec%2Fconfigure-model-5.png?alt=media" alt="ML Model field in the ML Controller settings"><figcaption></figcaption></figure>
4. In the "Inputs" section of the import window, set each "Scale" value to 0.0039. Leave the bias values at their defaults.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-5452da89857a3ef82ee5ec87d631028634725723%2Fconfigure-model-6.png?alt=media" alt="Inputs section with Scale set to 0.0039"><figcaption></figcaption></figure>
5. Click "Import".

### Configure Classes in Lens Studio

Tell Lens Studio which class each model output is.

1. Open the "Class Settings" tab below "ML Model". The template lists the coin counting classes. In your own Lens Studio project, the list is empty.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-d9e08c050ee1a4f1895fe2a8f621a7f9455c064f%2Fconfigure-lens-1.png?alt=media" alt="Class Settings tab in Lens Studio"><figcaption></figcaption></figure>
2. Enter a name and label for each class, in the order from the "Class Order" list in Roboflow. Add every class in your model. A missing or reordered class gives wrong labels.

   <figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-f1ae3bbb3c97543ff57742576b5f17f1472618c9%2Fconfigure-lens-2.png?alt=media" alt="One class name and label set in Class Settings"><figcaption></figcaption></figure>

Click "Preview" to try the Lens on your computer, or [pair Lens Studio with Snapchat](https://docs.snap.com/lens-studio/references/guides/general/pairing-to-snapchat) to try it on your phone.
