sinapsis-data-visualization 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. sinapsis_data_visualization-0.1.4/PKG-INFO +194 -0
  2. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/pyproject.toml +2 -4
  3. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/annotation_drawer_tools.py +1 -2
  4. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/color_utils.py +0 -1
  5. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/base_annotation_drawer.py +5 -2
  6. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/bbox_drawer.py +0 -1
  7. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/data_distribution_visualization_template.py +6 -3
  8. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/key_points_drawer.py +0 -1
  9. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/label_drawer.py +1 -2
  10. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/oriented_bbox_drawer.py +1 -2
  11. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/segmentation_mask_drawer.py +0 -1
  12. sinapsis_data_visualization-0.1.4/src/sinapsis_data_visualization.egg-info/PKG-INFO +194 -0
  13. sinapsis_data_visualization-0.1.2/PKG-INFO +0 -854
  14. sinapsis_data_visualization-0.1.2/src/sinapsis_data_visualization.egg-info/PKG-INFO +0 -854
  15. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/LICENSE +0 -0
  16. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/README.md +0 -0
  17. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/setup.cfg +0 -0
  18. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/__init__.py +0 -0
  19. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/__init__.py +0 -0
  20. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/__init__.py +0 -0
  21. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/annotation_drawer_types.py +0 -0
  22. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/detection_utils.py +0 -0
  23. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/plot_distributions.py +0 -0
  24. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/helpers/scikit_pca_analysis.py +0 -0
  25. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization/templates/__init__.py +0 -0
  26. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization.egg-info/SOURCES.txt +0 -0
  27. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization.egg-info/dependency_links.txt +0 -0
  28. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization.egg-info/requires.txt +0 -0
  29. {sinapsis_data_visualization-0.1.2 → sinapsis_data_visualization-0.1.4}/src/sinapsis_data_visualization.egg-info/top_level.txt +0 -0
@@ -0,0 +1,194 @@
1
+ Metadata-Version: 2.4
2
+ Name: sinapsis-data-visualization
3
+ Version: 0.1.4
4
+ Summary: Templates to perform visualization of data distributions and image annotations.
5
+ Author-email: SinapsisAI <dev@sinapsis.tech>
6
+ Project-URL: Homepage, https://sinapsis.tech
7
+ Project-URL: Documentation, https://docs.sinapsis.tech/docs
8
+ Project-URL: Tutorials, https://docs.sinapsis.tech/tutorials
9
+ Project-URL: Repository, https://github.com/Sinapsis-AI/sinapsis-data-tools.git
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: sinapsis>=0.1.1
14
+ Provides-Extra: visualization-matplotlib
15
+ Requires-Dist: matplotlib>=3.9.2; extra == "visualization-matplotlib"
16
+ Provides-Extra: all
17
+ Requires-Dist: sinapsis-data-visualization[visualization-matplotlib]; extra == "all"
18
+ Dynamic: license-file
19
+
20
+ <h1 align="center">
21
+ <br>
22
+ <a href="https://sinapsis.tech/">
23
+ <img
24
+ src="https://github.com/Sinapsis-AI/brand-resources/blob/main/sinapsis_logo/4x/logo.png?raw=true"
25
+ alt="" width="300">
26
+ </a>
27
+
28
+ <br>
29
+ Sinapsis Data Visualization
30
+ <br>
31
+ </h1>
32
+
33
+ <h4 align="center"> Package with templates to visualize images and data distribution using different libraries and techniques</h4>
34
+
35
+ <p align="center">
36
+ <a href="#installation">🐍 Installation</a> •
37
+ <a href="#features">🚀 Features</a> •
38
+ <a href="#usage">📚 Usage example</a> •
39
+ <a href="#documentation">📙 Documentation</a> •
40
+ <a href="#license">🔍 License</a>
41
+ </p>
42
+
43
+ <h2 id="installation">🐍 Installation</h2>
44
+
45
+ Install using your package manager of choice. We encourage the use of <code>uv</code>
46
+
47
+ Example with <code>uv</code>:
48
+
49
+ ```bash
50
+ uv pip install sinapsis-data-visualization --extra-index-url https://pypi.sinapsis.tech
51
+ ```
52
+ or with raw <code>pip</code>:
53
+ ```bash
54
+ pip install sinapsis-data-visualization --extra-index-url https://pypi.sinapsis.tech
55
+ ```
56
+
57
+ > [!IMPORTANT]
58
+ > Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:
59
+ >
60
+
61
+ with <code>uv</code>:
62
+
63
+ ```bash
64
+ uv pip install sinapsis-data-visualization[all] --extra-index-url https://pypi.sinapsis.tech
65
+ ```
66
+ or with raw <code>pip</code>:
67
+ ```bash
68
+ pip install sinapsis-data-visualization[all] --extra-index-url https://pypi.sinapsis.tech
69
+ ```
70
+
71
+
72
+ <h2 id="features">🚀 Features</h2>
73
+
74
+
75
+
76
+ > [!TIP]
77
+ > Use CLI command ``` sinapsis info --all-template-names``` to show a list with all the available Template names installed with Sinapsis Data Tools.
78
+
79
+ > [!TIP]
80
+ > Use CLI command ```sinapsis info --example-template-config TEMPLATE_NAME``` to produce an example Agent config for the Template specified in ***TEMPLATE_NAME***.
81
+
82
+ For example, for ***ImageSaver*** use ```sinapsis info --example-template-config ImageSaver``` to produce the following example config:
83
+ <details id='packages'><summary><strong><span style="font-size: 1.0em;"> Config</span></strong></summary>
84
+
85
+ ```yaml
86
+ agent:
87
+ name: my_test_agent
88
+ description: agent to read images from a local folder and draw annotations if available
89
+ templates:
90
+ - template_name: InputTemplate
91
+ class_name: InputTemplate
92
+ attributes: {}
93
+ - template_name: FolderImageDatasetCV2
94
+ class_name: FolderImageDatasetCV2
95
+ template_input: InputTemplate
96
+ attributes:
97
+ data_dir: '/path/to/sinapsis/cache/dir'
98
+ pattern: '**/*'
99
+ batch_size: 1
100
+ shuffle_data: false
101
+ samples_to_load: -1
102
+ load_on_init: false
103
+ label_path_index: -2
104
+ is_ground_truth: false
105
+ - template_name: BBoxDrawer
106
+ class_name: BBoxDrawer
107
+ template_input: FolderImageDatasetCV2
108
+ attributes:
109
+ overwrite: false
110
+ randomized_color: true
111
+ draw_confidence: true
112
+ draw_extra_labels: true
113
+ text_style:
114
+ font: 0
115
+ font_scale: 0.5
116
+ thickness: 2
117
+ draw_classification_label: false
118
+ classification_label_position: top_right
119
+ text_box_to_border_offset: 0.01
120
+
121
+ ```
122
+
123
+
124
+ <h2 id="usage">📚 Usage example</h2>
125
+ You can copy and paste the following config and run it using the sinapsis cli, changing the <code>data_dir</code> attribute in the <code>FolderImageDatasetCV2</code> and the <code>root_dir</code> attribute in the <code>ImageSaver</code> template
126
+
127
+ <details id='usage'><summary><strong><span style="font-size: 1.0em;"> Example agent config</span></strong></summary>
128
+
129
+ ```yaml
130
+ agent:
131
+ name: my_test_agent
132
+ description: agent to save image locally
133
+ templates:
134
+ - template_name: InputTemplate
135
+ class_name: InputTemplate
136
+ attributes: {}
137
+ - template_name: FolderImageDatasetCV2
138
+ class_name: FolderImageDatasetCV2
139
+ attributes:
140
+ data_dir: /path/to/image
141
+ pattern: '**/*'
142
+ batch_size: 1
143
+ load_on_init: true
144
+ label_path_index: 0
145
+ is_ground_truth: false
146
+ - template_name: BBoxDrawer
147
+ class_name: BBoxDrawer
148
+ template_input: FolderImageDatasetCV2
149
+ attributes:
150
+ overwrite: false
151
+ randomized_color: true
152
+ draw_confidence: true
153
+ draw_extra_labels: true
154
+ text_style:
155
+ font: 0
156
+ font_scale: 0.5
157
+ thickness: 2
158
+ draw_classification_label: false
159
+ classification_label_position: top_right
160
+ text_box_to_border_offset: 0.01
161
+ - template_name: ImageSaver
162
+ class_name: ImageSaver
163
+ template_input: BBoxDrawer
164
+ attributes:
165
+ save_dir: /path/to/save/dir
166
+ extension: jpg
167
+ root_dir: '/path/to/sinapsis/cache'
168
+ save_full_image: true
169
+ save_bbox_crops: false
170
+ save_mask_crops: false
171
+ min_bbox_dim: 5
172
+ ```
173
+ </details>
174
+
175
+ To run, simply use:
176
+
177
+ ```bash
178
+ sinapsis run name_of_the_config.yml
179
+ ```
180
+ </details>
181
+ <h2 id="documentation">📙 Documentation</h2>
182
+
183
+ Documentation for this and other sinapsis packages is available on the [sinapsis website](https://docs.sinapsis.tech/docs)
184
+
185
+ Tutorials for different projects within sinapsis are available at [sinapsis tutorials page](https://docs.sinapsis.tech/tutorials)
186
+
187
+ <h2 id="license">🔍 License</h2>
188
+
189
+ This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the [LICENSE](LICENSE) file.
190
+
191
+ For commercial use, please refer to our [official Sinapsis website](https://sinapsis.tech) for information on obtaining a commercial license.
192
+
193
+
194
+
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "sinapsis-data-visualization"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = "Templates to perform visualization of data distributions and image annotations."
5
5
  authors = [{ name = "SinapsisAI", email = "dev@sinapsis.tech" }]
6
6
 
7
7
  readme = "README.md"
8
- license = { file = "LICENSE" }
8
+ license-files = ["LICENSE"]
9
9
  requires-python = ">=3.10"
10
10
  dependencies = [
11
11
  "sinapsis>=0.1.1",
@@ -20,8 +20,6 @@ sinapsis-data-visualization = { workspace = true }
20
20
  [build-system]
21
21
  requires = ["setuptools"]
22
22
  build-backend = "setuptools.build_meta"
23
- [tool.setuptools]
24
- license-files = []
25
23
 
26
24
 
27
25
  [[tool.uv.index]]
@@ -4,7 +4,6 @@ from typing import cast
4
4
  import cv2
5
5
  import numpy as np
6
6
  from sinapsis_core.data_containers.annotations import BoundingBox, ImageAnnotations
7
-
8
7
  from sinapsis_data_visualization.helpers.annotation_drawer_types import (
9
8
  TextInstanceProperties,
10
9
  TextStyle,
@@ -70,7 +69,7 @@ def get_dynamic_text_properties(image: np.ndarray) -> tuple[float, float]:
70
69
 
71
70
  def get_numeric_str(label: str, numeric_val: float | int) -> str:
72
71
  """Writes numeric value of label as string
73
-
72
+
74
73
  Args:
75
74
  label (str): label of the annotation
76
75
  numeric_val (float|int): numeric_val to convert to string
@@ -4,7 +4,6 @@ import math
4
4
  import random
5
5
 
6
6
  from matplotlib import colors
7
-
8
7
  from sinapsis_data_visualization.helpers.annotation_drawer_types import RGB_TYPE
9
8
 
10
9
 
@@ -6,10 +6,12 @@ from pathlib import Path
6
6
  import numpy as np
7
7
  from sinapsis_core.data_containers.annotations import ImageAnnotations
8
8
  from sinapsis_core.data_containers.data_packet import DataContainer, ImagePacket
9
- from sinapsis_core.template_base import (
10
- Template,
9
+ from sinapsis_core.template_base import Template
10
+ from sinapsis_core.template_base.base_models import (
11
+ OutputTypes,
11
12
  TemplateAttributes,
12
13
  TemplateAttributeType,
14
+ UIPropertiesMetadata,
13
15
  )
14
16
  from sinapsis_data_visualization.helpers.color_utils import (
15
17
  RGB_TYPE,
@@ -31,6 +33,7 @@ class BaseAnnotationDrawer(Template, abc.ABC):
31
33
  """
32
34
 
33
35
  COLOR_MAP = build_color_map()
36
+ UIProperties = UIPropertiesMetadata(output_type=OutputTypes.IMAGE)
34
37
 
35
38
  class AttributesBaseModel(TemplateAttributes):
36
39
  """
@@ -3,7 +3,6 @@
3
3
  import cv2
4
4
  import numpy as np
5
5
  from sinapsis_core.data_containers.annotations import BoundingBox, ImageAnnotations
6
-
7
6
  from sinapsis_data_visualization.helpers.color_utils import RGB_TYPE
8
7
  from sinapsis_data_visualization.templates.label_drawer import LabelDrawer
9
8
 
@@ -10,13 +10,14 @@ import numpy as np
10
10
  from pydantic import Field
11
11
  from pydantic.dataclasses import dataclass
12
12
  from sinapsis_core.data_containers.data_packet import DataContainer
13
- from sinapsis_core.template_base import (
14
- Template,
13
+ from sinapsis_core.template_base import Template
14
+ from sinapsis_core.template_base.base_models import (
15
+ OutputTypes,
15
16
  TemplateAttributes,
16
17
  TemplateAttributeType,
18
+ UIPropertiesMetadata,
17
19
  )
18
20
  from sinapsis_core.utils.env_var_keys import SINAPSIS_CACHE_DIR
19
-
20
21
  from sinapsis_data_visualization.helpers.plot_distributions import (
21
22
  plot_distribution,
22
23
  plot_map,
@@ -110,6 +111,8 @@ class DataDistributionVisualization(Template):
110
111
 
111
112
  """
112
113
 
114
+ UIProperties = UIPropertiesMetadata(output_type=OutputTypes.IMAGE)
115
+
113
116
  class AttributesBaseModel(PlotAttributes):
114
117
  """
115
118
  Attributes for data analysis using matplotlib.
@@ -3,7 +3,6 @@
3
3
  import cv2
4
4
  import numpy as np
5
5
  from sinapsis_core.data_containers.annotations import ImageAnnotations, KeyPoint
6
-
7
6
  from sinapsis_data_visualization.helpers.annotation_drawer_types import (
8
7
  KeyPointAppearance,
9
8
  )
@@ -4,7 +4,6 @@ from typing import Literal
4
4
 
5
5
  import numpy as np
6
6
  from sinapsis_core.data_containers.annotations import BoundingBox, ImageAnnotations
7
-
8
7
  from sinapsis_data_visualization.helpers.annotation_drawer_tools import (
9
8
  draw_annotation_rectangle,
10
9
  draw_extra_labels,
@@ -128,7 +127,7 @@ class LabelDrawer(BaseAnnotationDrawer):
128
127
  def get_label_ann_str(self, annotation: ImageAnnotations) -> str:
129
128
  """
130
129
  Returns the annotation as string, appending confidence score if needed.
131
-
130
+
132
131
  Args:
133
132
  annotation (ImageAnnotations): Annotation object in the ImagePacket to
134
133
  extract the label from
@@ -7,7 +7,6 @@ from sinapsis_core.data_containers.annotations import (
7
7
  ImageAnnotations,
8
8
  OrientedBoundingBox,
9
9
  )
10
-
11
10
  from sinapsis_data_visualization.helpers.color_utils import RGB_TYPE
12
11
  from sinapsis_data_visualization.templates.bbox_drawer import BBoxDrawer
13
12
 
@@ -52,7 +51,7 @@ class OrientedBBoxDrawer(BBoxDrawer):
52
51
  Appends the method to draw the oriented bbox on the image, to
53
52
  the drawing_strategies list.
54
53
  """
55
- self.drawing_strategies.append(self.draw_bbox_strategy)
54
+ self.drawing_strategies.append(self.draw_oriented_bbox_strategy)
56
55
 
57
56
  @staticmethod
58
57
  def draw_oriented_bbox(
@@ -2,7 +2,6 @@
2
2
 
3
3
  import numpy as np
4
4
  from sinapsis_core.data_containers.annotations import ImageAnnotations, Segmentation
5
-
6
5
  from sinapsis_data_visualization.helpers.color_utils import RGB_TYPE
7
6
  from sinapsis_data_visualization.templates.bbox_drawer import BBoxDrawer
8
7
 
@@ -0,0 +1,194 @@
1
+ Metadata-Version: 2.4
2
+ Name: sinapsis-data-visualization
3
+ Version: 0.1.4
4
+ Summary: Templates to perform visualization of data distributions and image annotations.
5
+ Author-email: SinapsisAI <dev@sinapsis.tech>
6
+ Project-URL: Homepage, https://sinapsis.tech
7
+ Project-URL: Documentation, https://docs.sinapsis.tech/docs
8
+ Project-URL: Tutorials, https://docs.sinapsis.tech/tutorials
9
+ Project-URL: Repository, https://github.com/Sinapsis-AI/sinapsis-data-tools.git
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: sinapsis>=0.1.1
14
+ Provides-Extra: visualization-matplotlib
15
+ Requires-Dist: matplotlib>=3.9.2; extra == "visualization-matplotlib"
16
+ Provides-Extra: all
17
+ Requires-Dist: sinapsis-data-visualization[visualization-matplotlib]; extra == "all"
18
+ Dynamic: license-file
19
+
20
+ <h1 align="center">
21
+ <br>
22
+ <a href="https://sinapsis.tech/">
23
+ <img
24
+ src="https://github.com/Sinapsis-AI/brand-resources/blob/main/sinapsis_logo/4x/logo.png?raw=true"
25
+ alt="" width="300">
26
+ </a>
27
+
28
+ <br>
29
+ Sinapsis Data Visualization
30
+ <br>
31
+ </h1>
32
+
33
+ <h4 align="center"> Package with templates to visualize images and data distribution using different libraries and techniques</h4>
34
+
35
+ <p align="center">
36
+ <a href="#installation">🐍 Installation</a> •
37
+ <a href="#features">🚀 Features</a> •
38
+ <a href="#usage">📚 Usage example</a> •
39
+ <a href="#documentation">📙 Documentation</a> •
40
+ <a href="#license">🔍 License</a>
41
+ </p>
42
+
43
+ <h2 id="installation">🐍 Installation</h2>
44
+
45
+ Install using your package manager of choice. We encourage the use of <code>uv</code>
46
+
47
+ Example with <code>uv</code>:
48
+
49
+ ```bash
50
+ uv pip install sinapsis-data-visualization --extra-index-url https://pypi.sinapsis.tech
51
+ ```
52
+ or with raw <code>pip</code>:
53
+ ```bash
54
+ pip install sinapsis-data-visualization --extra-index-url https://pypi.sinapsis.tech
55
+ ```
56
+
57
+ > [!IMPORTANT]
58
+ > Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:
59
+ >
60
+
61
+ with <code>uv</code>:
62
+
63
+ ```bash
64
+ uv pip install sinapsis-data-visualization[all] --extra-index-url https://pypi.sinapsis.tech
65
+ ```
66
+ or with raw <code>pip</code>:
67
+ ```bash
68
+ pip install sinapsis-data-visualization[all] --extra-index-url https://pypi.sinapsis.tech
69
+ ```
70
+
71
+
72
+ <h2 id="features">🚀 Features</h2>
73
+
74
+
75
+
76
+ > [!TIP]
77
+ > Use CLI command ``` sinapsis info --all-template-names``` to show a list with all the available Template names installed with Sinapsis Data Tools.
78
+
79
+ > [!TIP]
80
+ > Use CLI command ```sinapsis info --example-template-config TEMPLATE_NAME``` to produce an example Agent config for the Template specified in ***TEMPLATE_NAME***.
81
+
82
+ For example, for ***ImageSaver*** use ```sinapsis info --example-template-config ImageSaver``` to produce the following example config:
83
+ <details id='packages'><summary><strong><span style="font-size: 1.0em;"> Config</span></strong></summary>
84
+
85
+ ```yaml
86
+ agent:
87
+ name: my_test_agent
88
+ description: agent to read images from a local folder and draw annotations if available
89
+ templates:
90
+ - template_name: InputTemplate
91
+ class_name: InputTemplate
92
+ attributes: {}
93
+ - template_name: FolderImageDatasetCV2
94
+ class_name: FolderImageDatasetCV2
95
+ template_input: InputTemplate
96
+ attributes:
97
+ data_dir: '/path/to/sinapsis/cache/dir'
98
+ pattern: '**/*'
99
+ batch_size: 1
100
+ shuffle_data: false
101
+ samples_to_load: -1
102
+ load_on_init: false
103
+ label_path_index: -2
104
+ is_ground_truth: false
105
+ - template_name: BBoxDrawer
106
+ class_name: BBoxDrawer
107
+ template_input: FolderImageDatasetCV2
108
+ attributes:
109
+ overwrite: false
110
+ randomized_color: true
111
+ draw_confidence: true
112
+ draw_extra_labels: true
113
+ text_style:
114
+ font: 0
115
+ font_scale: 0.5
116
+ thickness: 2
117
+ draw_classification_label: false
118
+ classification_label_position: top_right
119
+ text_box_to_border_offset: 0.01
120
+
121
+ ```
122
+
123
+
124
+ <h2 id="usage">📚 Usage example</h2>
125
+ You can copy and paste the following config and run it using the sinapsis cli, changing the <code>data_dir</code> attribute in the <code>FolderImageDatasetCV2</code> and the <code>root_dir</code> attribute in the <code>ImageSaver</code> template
126
+
127
+ <details id='usage'><summary><strong><span style="font-size: 1.0em;"> Example agent config</span></strong></summary>
128
+
129
+ ```yaml
130
+ agent:
131
+ name: my_test_agent
132
+ description: agent to save image locally
133
+ templates:
134
+ - template_name: InputTemplate
135
+ class_name: InputTemplate
136
+ attributes: {}
137
+ - template_name: FolderImageDatasetCV2
138
+ class_name: FolderImageDatasetCV2
139
+ attributes:
140
+ data_dir: /path/to/image
141
+ pattern: '**/*'
142
+ batch_size: 1
143
+ load_on_init: true
144
+ label_path_index: 0
145
+ is_ground_truth: false
146
+ - template_name: BBoxDrawer
147
+ class_name: BBoxDrawer
148
+ template_input: FolderImageDatasetCV2
149
+ attributes:
150
+ overwrite: false
151
+ randomized_color: true
152
+ draw_confidence: true
153
+ draw_extra_labels: true
154
+ text_style:
155
+ font: 0
156
+ font_scale: 0.5
157
+ thickness: 2
158
+ draw_classification_label: false
159
+ classification_label_position: top_right
160
+ text_box_to_border_offset: 0.01
161
+ - template_name: ImageSaver
162
+ class_name: ImageSaver
163
+ template_input: BBoxDrawer
164
+ attributes:
165
+ save_dir: /path/to/save/dir
166
+ extension: jpg
167
+ root_dir: '/path/to/sinapsis/cache'
168
+ save_full_image: true
169
+ save_bbox_crops: false
170
+ save_mask_crops: false
171
+ min_bbox_dim: 5
172
+ ```
173
+ </details>
174
+
175
+ To run, simply use:
176
+
177
+ ```bash
178
+ sinapsis run name_of_the_config.yml
179
+ ```
180
+ </details>
181
+ <h2 id="documentation">📙 Documentation</h2>
182
+
183
+ Documentation for this and other sinapsis packages is available on the [sinapsis website](https://docs.sinapsis.tech/docs)
184
+
185
+ Tutorials for different projects within sinapsis are available at [sinapsis tutorials page](https://docs.sinapsis.tech/tutorials)
186
+
187
+ <h2 id="license">🔍 License</h2>
188
+
189
+ This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the [LICENSE](LICENSE) file.
190
+
191
+ For commercial use, please refer to our [official Sinapsis website](https://sinapsis.tech) for information on obtaining a commercial license.
192
+
193
+
194
+