> 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/roboflow/roboflow-hi/deploy/sdks/lens-studio.md).

# Lens Studio

Roboflow में एक प्रशिक्षित मॉडल तैयार होने पर, आप अपने मॉडल को SnapML पर डिप्लॉय कर सकते हैं।

## Task Support

Hosted API द्वारा निम्नलिखित task प्रकार समर्थित हैं:

| Task Type             | Lens Studio द्वारा समर्थित |
| --------------------- | -------------------------- |
| Object Detection      | ✅                          |
| Classification        |                            |
| Instance Segmentation |                            |
| Semantic Segmentation |                            |

*ध्यान दें: केवल Roboflow Train 3.0 का उपयोग करके प्रशिक्षित मॉडल ही समर्थित हैं। आप अपने मॉडल से जुड़ी Versions page देखकर जाँच सकते हैं कि मॉडल Roboflow Train 3.0 पर प्रशिक्षित है या नहीं।*

## Lens Studio में एक मॉडल डिप्लॉय करें

Roboflow sidebar में “Deploy” पर क्लिक करें, फिर नीचे स्क्रॉल करें जब तक आपको “Use with Snap Lens Studio” बॉक्स न दिख जाए। “Export to Lens Studio” पर क्लिक करें।

<figure><img src="/files/5a7ee062040abbebfb10088b8a6db6cb24bf6b94" alt=""><figcaption></figcaption></figure>

जब आप इस बटन पर क्लिक करेंगे, तो एक pop up दिखाई देगा जिसमें आपके मॉडल की classes के बारे में जानकारी होगी।

ये classes क्रमबद्ध हैं और Lens Studio में आपके मॉडल को configure करने के अगले चरण में उपयोग की जाएँगी। भविष्य में उपयोग के लिए class list को नोट कर लें।

इसके अलावा, दो files डाउनलोड की जाएँगी:

1. Roboflow Lens Studio template, जिसका उपयोग आप minimal configuration के साथ किसी application में अपने weights को इस्तेमाल करने के लिए कर सकते हैं, और;
2. आपके model weights.

Roboflow Lens Studio template 100 MB का है, इसलिए आपके internet connection के आधार पर template डाउनलोड होने में कुछ क्षण लग सकते हैं।

Template तैयार होने के बाद, हम Lens Studio में अपने model को सेट करना शुरू कर सकते हैं।

### Lens Studio में Model Configure करें

यदि आपने अभी तक Lens Studio install नहीं किया है, तो [Snap AR website](https://ar.snap.com/lens-studio) पर जाएँ और Lens Studio का latest version डाउनलोड करें। Lens Studio install होने के बाद, हम अपने model को configure करना शुरू करने के लिए तैयार हैं।

इस section के लिए, हम Roboflow Lens Studio template का उपयोग करेंगे। लेकिन, आप अपने model weights को किसी भी application में [MLController component](https://docs.snap.com/lens-studio/references/templates/ml/object-detection).

के साथ उपयोग कर सकते हैं। पहले डाउनलोड किए गए Roboflow Lens Studio template को unzip करें, फिर `Roboflow-Lens-Template.Isproj` को unzipped folder में खोलें।

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

जब आप application खोलेंगे, तो आपको कुछ ऐसा दिखाई देगा:

<figure><img src="/files/07c64d215ad4fd4ace55067f664a1768c4c19b4c" alt=""><figcaption></figcaption></figure>

डिफ़ॉल्ट रूप से, template coin counting model का उपयोग करता है। इस example के लिए, हम पहले बनाए गए playing cards model का उपयोग करेंगे। यह application हर prediction के चारों ओर boxes बनाता है, लेकिन आप Lens Studio का उपयोग करके अपने स्वयं के filters और logic जोड़ सकते हैं।

Lens Studio में बाईं sidebar के सबसे ऊपर “ML Controller” बॉक्स पर क्लिक करें:

<figure><img src="/files/6150fff2c6869f05d60eb0ce18fc606aeb515f7f" alt=""><figcaption></figcaption></figure>

इससे एक box खुलेगा जिसमें आप preview window के बगल में application में उपयोग के लिए अपने model को configure कर सकते हैं:

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

हमारा demo application coin counter example के लिए configured है। अपना खुद का model उपयोग करने के लिए, पहले “ML Model” बॉक्स पर क्लिक करें:

<figure><img src="/files/0fe10046653f155c9cc67a9f686a5baa989f9deb" alt=""><figcaption></figcaption></figure>

फिर, Roboflow से डाउनलोड किए गए weights को pop up box में drag करें:

{% embed url="<https://blog.roboflow.com/content/media/2023/06/Screen-Recording-2023-06-21-at-11.02.58.mp4>" %}

जब आप weights को drag करेंगे, तो आपको कुछ configuration options के साथ prompt किया जाएगा। pop up के “Inputs” section में, प्रत्येक “Scale” value को 0.0039 पर set करें। bias values को default के अनुसार वैसे ही रहने दें।

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

फिर, अपना model import करने के लिए “Import” पर क्लिक करें।

### Lens Studio में Classes Configure करें

अब हमारा model Lens Studio में load हो गया है। एक और चरण है: अपने model को बताना कि हम कौन-सी classes उपयोग कर रहे हैं।

“Class Settings” tab में, जो पहले उपयोग किए गए ML Model button के नीचे है, आपको classes की एक list दिखाई देगी। ये हमारे demo project में coin counter example के लिए configured हैं, लेकिन यदि आप अपने खुद के Lens Studio project पर काम कर रहे हैं, तो ये values खाली होंगी।

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

यहाँ, हमें अपने class names और labels set करने होंगे। Labels को Roboflow dashboard में प्रस्तुत order के अनुसार होना चाहिए। यहाँ playing card application के लिए हमारे values में से एक को set करने का एक example है:

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

हमें अपने model की प्रत्येक class के लिए यह configuration करनी होगी। आपको अपने model की सभी classes specify करनी होंगी ताकि Snap model weights में मौजूद जानकारी की व्याख्या कर सके।

अब हमारा application उपयोग के लिए तैयार है! आप अपने computer पर अपना application उपयोग करने के लिए “Preview” box का इस्तेमाल कर सकते हैं, या [Pairing with Snapchat feature](https://docs.snap.com/lens-studio/references/guides/general/pairing-to-snapchat).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-hi/deploy/sdks/lens-studio.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
