# Workflow बनाएँ

एक Workflow blocks से मिलकर बना होता है, जो विशिष्ट कार्य करते हैं, जैसे model inference चलाना, logic perform करना, या external services के साथ interfacing करना।

उपलब्ध block की सूची के बारे में अधिक विस्तार से जानने के लिए, हमारा देखें [block documentation](https://inference.roboflow.com/workflows/blocks/).

### Overview

यह guide एक चार-block workflow बनाने पर जाएगा, जिसमें एक object detection model चलाना, predictions count करना, और model results visualize करना शामिल है। यहाँ है [final workflow template](https://app.roboflow.com/workflows/embed/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3b3JrZmxvd0lkIjoiMmdqakJxMDV3Q01ac1hHM3hkeFAiLCJ3b3Jrc3BhY2VJZCI6ImtyT1RBYm5jRmhvUU1DZExPbGU0IiwidXNlcklkIjoiSW1GTElaU2tHYk55OXpiNFV1cWxNelBScHBRMiIsImlhdCI6MTczODE4ODk5MH0.f72WI5bdjtnwC8iqXF_XiUVarfOktIAH1egpsI0Oh4Q) जिसका पालन आप कर सकते हैं।

{% embed url="<https://app.roboflow.com/workflows/embed/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3b3JrZmxvd0lkIjoiMmdqakJxMDV3Q01ac1hHM3hkeFAiLCJ3b3Jrc3BhY2VJZCI6ImtyT1RBYm5jRmhvUU1DZExPbGU0IiwidXNlcklkIjoiSW1GTElaU2tHYk55OXpiNFV1cWxNelBScHBRMiIsImlhdCI6MTczODE4ODk5MH0.f72WI5bdjtnwC8iqXF_XiUVarfOktIAH1egpsI0Oh4Q>" fullWidth="false" %}

<figure><img src="/files/4b60afbb39a724b20c1bafe9ebea527c26eb4772" alt="" width="563"><figcaption><p>Detect, Count, and Visualize Workflow</p></figcaption></figure>

### Block Connections

शुरू करने से पहले, यह समझना महत्वपूर्ण है कि block connections कैसे काम करते हैं।

किसी location में block जोड़ने के लिए, उसे पिछले block को input के रूप में इस्तेमाल करना होता है। उदाहरण के लिए, ऊपर दिखाए गए workflow में, *Property Definition* block, *Object Detection* block के बाद आता है क्योंकि यह model block को input के रूप में इस्तेमाल करता है। *Bounding Box Visualization* block दाईं ओर है, क्योंकि यह *Property Definition* block के output का उपयोग नहीं करता, लेकिन model output का reference लेता है।

<figure><img src="/files/edcd97a8327277f1c3f4b31d50c8e250e78d03da" alt=""><figcaption><p>Model Comparison Workflow</p></figcaption></figure>

ऊपर दिए गए example workflow में, हमारे पास चार distinct pathways हैं, क्योंकि runtime पर प्रत्येक branch parallel में execute होती है, और input के रूप में दूसरी branch blocks पर निर्भर नहीं करती।

### Builder Assist

Builder Assist नियंत्रित करता है कि workflow editor block connect और insert करते समय आपको कितनी मदद देता है। आप ऊपर-दाईं navbar में toggle का उपयोग करके modes के बीच switch कर सकते हैं।

तीन modes हैं:

* **Auto** (default): जब blocks connect या insert किए जाते हैं, तो compatible input और output fields automatically wire कर देता है। जब आप blocks हटाते या disconnect करते हैं, तब builder downstream references को भी repair करता है।
* **Quick**: सुझाए गए connections और block recommendations दिखाता है, लेकिन उन्हें केवल तब लागू करता है जब आप स्पष्ट रूप से accept करते हैं। यह तब उपयोगी है जब आप guidance चाहते हैं, बिना builder के आपकी ओर से changes किए।
* **Manual**: कोई suggestions नहीं और कोई automatic wiring नहीं। आप हर connection स्वयं नियंत्रित करते हैं।

आपका चुना हुआ mode locally save हो जाता है, इसलिए यह sessions के बीच बना रहता है।

### Building a Workflow

#### Object Detection Model

सबसे पहले, एक *Object Detection Model* block जोड़ें। आप public pre-trained model चुन सकते हैं, जैसे YOLOv8n, जो [COCO](https://universe.roboflow.com/microsoft/coco)पर trained है, या अपने workspace में एक fine-tuned model। मैं आगे *yolov8n* pre-trained model के साथ लोगों और वाहनों का पता लगाने के लिए आगे बढ़ूँगा।

<figure><img src="/files/c5be16d22d3021e1ab21f0ce380cb81c15f2ce60" alt="" width="344"><figcaption></figcaption></figure>

object detection block में एक required image parameter होता है जो तय करता है कि model किस पर infer कर रहा है। कई optional parameters होते हैं, जिनमें मुख्य नीचे विस्तार से दिए गए हैं:

* Class Filter: classes की सूची जिसे model वापस करेगा। नोट: model हमेशा केवल उन्हीं classes को वापस करेगा जिन पर उसे train किया गया है; यह आपको अनावश्यक classes को filter out करने देता है।
* Confidence: इससे कम confidence वाले objects वापस नहीं किए जाएँगे।
* IoU threshold: अधिक threshold अधिक overlapping predictions वापस करेगा। 0.9 का मतलब है कि 90% या उससे कम overlap वाले objects वापस किए जाएँगे, जबकि 0.1 का मतलब है कि 10% से अधिक overlap वाले objects शामिल नहीं किए जाएँगे।
* Max Detections: model द्वारा वापस किए जाने वाले objects की अधिकतम संख्या
* Class Agnostic NMS: क्या overlap filtering को केवल same class वाले objects की तुलना और exclusion करनी चाहिए, या सभी classes की

#### Property Definition

property definition block आपको अपने data से संबंधित जानकारी निकालने देता है, जैसे image size, predicted classes, या detected objects की संख्या। इस example में, हम object detection model द्वारा पाए गए objects की संख्या गिनेंगे।

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc507UbRnkEH6XMdrfmwVZbHcK6x6K5THwnt1RmEk8iXSojwvmiA_q6KwRXV9bJudYnW7NMTQKKb9GqGxm_P0VjbuOoGWcDsM5NoQckl9jV4YcjYQFIvYoCgvd_YnQTNJLlwdbZwA?key=yGJPQzp1abf4J7pT0mnBw8w4" alt="" width="375"><figcaption></figcaption></figure>

के लिए *Data* property, model predictions का reference दें। के लिए *Operations*, Count Items चुनें। यह configuration object detection model द्वारा की गई predictions की संख्या वापस करेगी।

#### Bounding Box Visualization

model results को visualize करने के लिए एक bounding box visualization block जोड़ें। के लिए *image* parameter, input image चुनें। predictions के लिए, model results चुनें। आप optional configuration properties का उपयोग करके bounding boxes का color और size वैकल्पिक रूप से बदल सकते हैं।

<figure><img src="/files/10d7fc9eba4fc897184968bf35bc8e51d1c5ea79" alt="" width="342"><figcaption></figcaption></figure>

#### Label Visualization

bounding boxes draw करने के अलावा, हम predictions के class names भी display करना चाहेंगे। ऐसा करने के लिए, bounding box visualization के बाद एक *Label Visualization* block जोड़ें। एक ही image पर bounding boxes और labels दोनों draw करने के लिए, आप reference input image को *bounding\_box\_visualization* image के रूप में set करना चाहेंगे, न कि input image को reference करके। इससे labels bounding boxes के ऊपर draw होंगे।

<figure><img src="/files/9bcb7bac97513ce722909a458be4f54e731c6460" alt="" width="343"><figcaption></figcaption></figure>

आप optional *Text* parameter बदल सकते हैं ताकि display text class name से confidence, या class name और confidence में बदला जा सके।

### Saving Changes

Workflow editor आपकी changes को draft के रूप में auto-save करता है। editing करते समय आपको manually save करने की आवश्यकता नहीं है।

अपनी changes को live करने के लिए, Workflow publish करें। यदि आपने Workflow deploy किया है, तो आपका published version उन सभी devices पर चलना शुरू हो जाएगा जहाँ Workflow deploy किया गया है।

अब जब आपके पास एक completed workflow है, तो इसे test करने का समय है।


---

# 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/workflows/build-a-workflow.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.
