# Lens Studio

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

## Task Support

निम्नलिखित task types hosted API द्वारा समर्थित हैं:

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

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

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

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

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

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

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

इसके अलावा, दो files डाउनलोड होंगी:

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

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

template तैयार होने के साथ, हम Lens Studio में अपने model को set up करना शुरू कर सकते हैं।

### 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` file को 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 में left sidebar के शीर्ष पर स्थित “ML Controller” box पर क्लिक करें:

<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 के लिए configure किया गया है। अपना खुद का model उपयोग करने के लिए, पहले “ML Model” box पर क्लिक करें:

<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 में loaded है। एक और step है: अपने model को बताना कि हम कौन-सी classes उपयोग कर रहे हैं।

पहले इस्तेमाल किए गए ML Model button के नीचे “Class Settings” tab में, आपको 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 में प्रस्तुत क्रम के अनुसार होने चाहिए। यहाँ playing card application के लिए अपने values में से एक को set करने का एक example दिया गया है:

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

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

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
