> ## Documentation Index
> Fetch the complete documentation index at: https://landinglens.docs.landing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mobile Inference

export const vp = 'Visual Prompting';

export const smartLabel = 'Smart Labeling';

export const productLL = 'LandingLens';

export const mi = 'Mobile Inference';

export const llsf = 'LandingLens on Snowflake';

export const companyName = 'LandingAI';

*This article applies to these versions of LandingLens:*

<table>
  <thead>
    <tr>
      <th>LandingLens</th>
      <th>LandingLens on Snowflake</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><span class="check-icon">✓</span></td>
      <td><span class="cross-icon">✖</span></td>
    </tr>
  </tbody>
</table>

{companyName} is excited to share that we’ve developed a new feature—{mi}! This feature empowers you with an additional way to use LandingLens models in the real-world.

After you develop a model and deploy it to an endpoint, you can then generate a QR code. Scanning the QR code with your phone opens the LandingLens app in your browser.

From there, you can take a photo or select a photo from your phone. The app sends the photo to the cloud-hosted model to run inference on it, and then the results display immediately on your phone! If you're using {mi} for an Object Detection project, you'll also see the number of objects detected.

The images and predictions are saved back to LandingLens, so that you can review all results in a centralized location. You can also share the QR code with your colleagues, so that you can all collaborate on running inference.

<iframe width="560" height="315" src="https://www.youtube.com/embed/l1_AXErebo4?&wmode=opaque&rel=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen />

<Info>You can run inference up to 40 times per minute per endpoint. If you exceed that limit, the API returns a `429 Too Many Requests` response status code. We recommend implementing an error handling or retry function in your application. If you have questions about inference limits, please contact your LandingAI representative or [sales@landing.ai](mailto:sales@landing.ai).</Info>

## Use Mobile Inference

{mi} is a part of Cloud Deployment. To use {mi}, you first deploy to an endpoint, which is the virtual device that will host the model.

To use {mi}:

1. Set up an [endpoint](./cloud-deployment#set-up-endpoints), as you would for Cloud Deployment.
2. After creating an endpoint, the **{mi}** tile appears on the right side of your screen (you might have to scroll over to see it). In this tile, click **Get QR Code**.
   <img src="https://mintcdn.com/landinglens/e3dn6upV4NR85srT/images/mobile_app_getQRcode.png?fit=max&auto=format&n=e3dn6upV4NR85srT&q=85&s=4ec24a4541296cd59091db6645167797" alt="mobile_app_getQRcode" width="417" height="421" data-path="images/mobile_app_getQRcode.png" />
   <Info>If you've already run inference, the tile no longer displays. Instead, click the QR Code icon next to the endpoint name to open the QR Code pop-up window.<br /><img src="https://mintcdn.com/landinglens/i_hGHOXkVC0R_OQG/images/qr_code_icon.png?fit=max&auto=format&n=i_hGHOXkVC0R_OQG&q=85&s=718ed8dc4955a3d9ec0a16abf5b1642b" alt="mobile_app_scan_QRcode" width="653" height="302" data-path="images/qr_code_icon.png" /></Info>
3. A pop-up window opens with a QR code that is unique to this deployment.
4. Turn on your phone’s camera app, and hold up your phone to the QR code.
5. Click the pop-up that appears at the top of your phone.
   <img src="https://mintcdn.com/landinglens/e3dn6upV4NR85srT/images/mobile_app_scan_QRcode.png?fit=max&auto=format&n=e3dn6upV4NR85srT&q=85&s=0336054460437e2120c15ae3ab8b7f4d" alt="mobile_app_scan_QRcode" width="750" height="1334" data-path="images/mobile_app_scan_QRcode.png" />
6. The LandingLens app opens in your browser. Click **Select a Photo** and select one of these options to get an image:
   * **Photo Library**: Select an image saved to your phone.
   * **Take Photo**: Use the Camera app on your phone to take a photo.
   * **Choose File**: Select a file saved to your phone.
     <img src="https://mintcdn.com/landinglens/K_4nD7peL3kar2nE/images/select_photo.PNG?fit=max&auto=format&n=K_4nD7peL3kar2nE&q=85&s=d0368688575354461b88a6bd81fed375" alt="select_photo" width="750" height="1334" data-path="images/select_photo.PNG" />
7. After you select or take a photo, the app sends the photo to the deployed model, and the model runs inference on it. The model’s predictions show up almost instantaneously as overlays on your phone. If you're using {mi} for an Object Detection Project, you'll also see the number of objects detected.
   <img src="https://mintcdn.com/landinglens/e3dn6upV4NR85srT/images/mobile_app_predictions.PNG?fit=max&auto=format&n=e3dn6upV4NR85srT&q=85&s=5f043a2835b340b4fda65795f76cdffc" alt="mobile_app_predictions" width="750" height="1334" data-path="images/mobile_app_predictions.PNG" />
8. If you have more samples lined up, you can keep taking photos and running predictions–just click **Select a Photo** to continue.
9. When you're done running inference, you can close the tab on your browser.
10. All the photos you’ve taken and their predictions display on the **Deploy** page back in LandingLens. This set includes results from all the ways you ran inference for this deployment, including via APIs *and* {mi}.
    <img src="https://mintcdn.com/landinglens/e3dn6upV4NR85srT/images/mobile_app_historic_data.png?fit=max&auto=format&n=e3dn6upV4NR85srT&q=85&s=d86217c26e9a1afe84afc2f24f0b7945" alt="mobile_app_historic_data" width="2340" height="1420" data-path="images/mobile_app_historic_data.png" />

## Deactivate a QR Code

You can deactivate the QR code for {mi} at any time by clicking **Turn It Off** on the QR code pop-up window. When the QR code is deactivated, no one with the QR code can use it to run inference.

<img src="https://mintcdn.com/landinglens/nULG3l07sGmu7vxy/images/turnitoff.png?fit=max&auto=format&n=nULG3l07sGmu7vxy&q=85&s=916aa97f58d15b692f0e39b6fb9360ac" alt="turnitoff" width="933" height="886" data-path="images/turnitoff.png" />

Deactivating the QR code can be useful in multiple situations. For example, you can deactivate it if you have a time-bound project, and don't want to add more data after the end of the project.

To reactivate a QR code, simply follow the procedure in [Use {mi}](./mobile-inference#use-variablemi).
