Skip to content

Commit 1afdb6d

Browse files
Create README.md
1 parent e1806ba commit 1afdb6d

1 file changed

Lines changed: 198 additions & 0 deletions

File tree

README.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
<h1 align="center">
2+
<br>
3+
<a href="https://sinapsis.tech/">
4+
<img
5+
src="https://github.com/Sinapsis-AI/brand-resources/blob/main/sinapsis_logo/4x/logo.png?raw=true"
6+
alt="" width="300">
7+
</a>
8+
9+
<br>
10+
Sinapsis Data Tools
11+
<br>
12+
</h1>
13+
14+
<h4 align="center"> Mono repo with packages to read, write, process data, including images, audios, videos, bytes objects. The packages
15+
can be easily extensible to handle other types of data.</h4>
16+
17+
<p align="center">
18+
<a href="#installation">🐍 Installation</a> •
19+
<a href="#packages">📦 Packages</a> •
20+
<a href="#usage">📚 Usage example</a> •
21+
<a href="#documentation">📙 Documentation</a> •
22+
<a href="#license">🔍 License</a>
23+
</p>
24+
25+
<h2 id="installation">🐍 Installation</h2>
26+
27+
This mono repo consists of different packages to handle data:
28+
29+
* <code>sinapsis-data-readers</code>
30+
* <code>sinapsis-data-visualization</code>
31+
* <code>sinapsis-data-writers</code>
32+
* <code>sinapsis-generic-data-tools</code>
33+
34+
Install using your package manager of choice. We encourage the use of <code>uv</code>
35+
36+
Example with <code>uv</code>:
37+
38+
```bash
39+
uv pip install sinapsis-data-readers --extra-index-url https://pypi.sinapsis.tech
40+
```
41+
or with raw <code>pip</code>:
42+
```bash
43+
pip install sinapsis-data-readers --extra-index-url https://pypi.sinapsis.tech
44+
```
45+
46+
47+
**Change the name of the package for the one you want to install**.
48+
49+
> [!IMPORTANT]
50+
> Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:
51+
>
52+
53+
with <code>uv</code>:
54+
55+
```bash
56+
uv pip install sinapsis-data-readers[all] --extra-index-url https://pypi.sinapsis.tech
57+
```
58+
or with raw <code>pip</code>:
59+
```bash
60+
pip install sinapsis-data-readers[all] --extra-index-url https://pypi.sinapsis.tech
61+
```
62+
63+
64+
**Change the name of the package accordingly**.
65+
66+
> [!TIP]
67+
> You can also install all the packages within this project:
68+
>
69+
```bash
70+
uv pip install sinapsis-data-tools[all] --extra-index-url https://pypi.sinapsis.tech
71+
```
72+
> [!NOTE]
73+
> Some templates also need system dependencies (e.g., ffmpeg). The installation
74+
> depends on your OS. For Linux:
75+
>
76+
```bash
77+
apt-get install -y ffmpeg
78+
```
79+
80+
<h2 id="packages">📦 Packages</h2>
81+
<details id='packages'><summary><strong><span style="font-size: 1.0em;"> Packages summary</span></strong></summary>
82+
83+
84+
- **Sinapsis Data Readers**
85+
- **Audio Readers**\
86+
_Read audio files from several formats using Pydub, Soundfile, among others._
87+
- **Dataset Readers**\
88+
_Read and manipulate tabular datasets from the scikit libraries, among others._
89+
- **Image Readers**\
90+
_Read and manipulate images from COCO, paths in CSVs, whole folders, etc._
91+
- **Text Readers**\
92+
_Read text data from a simple string and other sources._
93+
- **Video Readers**\
94+
_Read videoframes using CV2, Dali, FFMPEG, Torch, among others._
95+
96+
- **Sinapsis Data Visualization**\
97+
_Visualize data distributions and manifolds, as well as draw all kinds of annotations on images, such as bounding boxes, keypoints, labels, oriented bounding boxes, segmentation masks, etc._
98+
- **Sinapsis Data Writers**\
99+
_Write data to many kinds of files._
100+
- **Annotation Writers**\
101+
_Save text annotations to JSON, geometries to polygons, etc._
102+
- **Audio Writers**\
103+
_Save to audio files using Soundfile, among others._
104+
- **Image Writers**
105+
_Save to image files using CV2, among others._
106+
- **Video Writers**\
107+
_Save to video files using CV2 or FFMPEG, among others._
108+
- **Sinapsis Generic Data Tools**\
109+
_Wide range of miscellaneous tools to manipulate your data._
110+
</details>
111+
112+
> [!TIP]
113+
> Use CLI command ``` sinapsis info --all-template-names``` to show a list with all the available Template names installed with Sinapsis Data Tools.
114+
115+
> [!TIP]
116+
> Use CLI command ```sinapsis info --example-template-config TEMPLATE_NAME``` to produce an example Agent config for the Template specified in ***TEMPLATE_NAME***.
117+
118+
For example, for ***ImageSaver*** use ```sinapsis info --example-template-config ImageSaver``` to produce the following example config:
119+
120+
121+
```yaml
122+
agent:
123+
name: my_test_agent
124+
description: agent to save image locally
125+
templates:
126+
- template_name: InputTemplate
127+
class_name: InputTemplate
128+
attributes: {}
129+
- template_name: ImageSaver
130+
class_name: ImageSaver
131+
template_input: InputTemplate
132+
attributes:
133+
save_dir: /path/to/save/dir
134+
extension: jpg
135+
root_dir: '/path/to/sinapsis/cache'
136+
save_full_image: true
137+
save_bbox_crops: false
138+
save_mask_crops: false
139+
min_bbox_dim: 5
140+
```
141+
142+
143+
<h2 id="usage">📚 Usage example</h2>
144+
<details id='usage'><summary><strong><span style="font-size: 1.0em;"> Example agent config</span></strong></summary>
145+
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
146+
147+
```yaml
148+
agent:
149+
name: my_test_agent
150+
description: agent to save image locally
151+
templates:
152+
- template_name: InputTemplate
153+
class_name: InputTemplate
154+
attributes: {}
155+
- template_name: FolderImageDatasetCV2
156+
class_name: FolderImageDatasetCV2
157+
attributes:
158+
data_dir: /path/to/image
159+
pattern: '**/*'
160+
batch_size: 1
161+
load_on_init: true
162+
label_path_index: 0
163+
is_ground_truth: false
164+
165+
- template_name: ImageSaver
166+
class_name: ImageSaver
167+
template_input: FolderImageDatasetCV2
168+
attributes:
169+
save_dir: /path/to/save/dir
170+
extension: jpg
171+
root_dir: '/path/to/sinapsis/cache'
172+
save_full_image: true
173+
save_bbox_crops: false
174+
save_mask_crops: false
175+
min_bbox_dim: 5
176+
```
177+
178+
To run, simply use:
179+
180+
```bash
181+
sinapsis run name_of_the_config.yml
182+
```
183+
</details>
184+
185+
<h2 id="documentation">📙 Documentation</h2>
186+
187+
Documentation for this and other sinapsis packages is available on the [sinapsis website](https://docs.sinapsis.tech/docs)
188+
189+
Tutorials for different projects within sinapsis are available at [sinapsis tutorials page](https://docs.sinapsis.tech/tutorials)
190+
191+
<h2 id="license">🔍 License</h2>
192+
193+
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the [LICENSE](LICENSE) file.
194+
195+
For commercial use, please refer to our [official Sinapsis website](https://sinapsis.tech) for information on obtaining a commercial license.
196+
197+
198+

0 commit comments

Comments
 (0)