pixlint 1.0__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 (73) hide show
  1. pixlint-1.0/LICENSE +116 -0
  2. pixlint-1.0/MANIFEST.in +26 -0
  3. pixlint-1.0/PKG-INFO +199 -0
  4. pixlint-1.0/README.md +133 -0
  5. pixlint-1.0/pyproject.toml +113 -0
  6. pixlint-1.0/requirements.txt +57 -0
  7. pixlint-1.0/setup.cfg +4 -0
  8. pixlint-1.0/src/pixlint/__init__.py +132 -0
  9. pixlint-1.0/src/pixlint/analysis/__init__.py +0 -0
  10. pixlint-1.0/src/pixlint/analysis/active_learning.py +175 -0
  11. pixlint-1.0/src/pixlint/analysis/autolabel.py +136 -0
  12. pixlint-1.0/src/pixlint/analysis/captioning.py +207 -0
  13. pixlint-1.0/src/pixlint/analysis/diff.py +79 -0
  14. pixlint-1.0/src/pixlint/analysis/distribution.py +198 -0
  15. pixlint-1.0/src/pixlint/analysis/duplicates.py +257 -0
  16. pixlint-1.0/src/pixlint/analysis/embeddings.py +288 -0
  17. pixlint-1.0/src/pixlint/analysis/health.py +144 -0
  18. pixlint-1.0/src/pixlint/analysis/integrity.py +85 -0
  19. pixlint-1.0/src/pixlint/analysis/label_errors.py +135 -0
  20. pixlint-1.0/src/pixlint/analysis/outliers.py +171 -0
  21. pixlint-1.0/src/pixlint/analysis/quality.py +242 -0
  22. pixlint-1.0/src/pixlint/analysis/query.py +185 -0
  23. pixlint-1.0/src/pixlint/analysis/readiness.py +164 -0
  24. pixlint-1.0/src/pixlint/analysis/slices.py +157 -0
  25. pixlint-1.0/src/pixlint/analysis/statistics.py +89 -0
  26. pixlint-1.0/src/pixlint/analysis/video.py +169 -0
  27. pixlint-1.0/src/pixlint/augmentation/__init__.py +0 -0
  28. pixlint-1.0/src/pixlint/augmentation/auto_augment.py +108 -0
  29. pixlint-1.0/src/pixlint/augmentation/pipeline.py +194 -0
  30. pixlint-1.0/src/pixlint/augmentation/transforms.py +196 -0
  31. pixlint-1.0/src/pixlint/core/__init__.py +0 -0
  32. pixlint-1.0/src/pixlint/core/cache.py +67 -0
  33. pixlint-1.0/src/pixlint/core/cloud.py +161 -0
  34. pixlint-1.0/src/pixlint/core/curation.py +321 -0
  35. pixlint-1.0/src/pixlint/core/index.py +177 -0
  36. pixlint-1.0/src/pixlint/core/loader.py +339 -0
  37. pixlint-1.0/src/pixlint/core/merge.py +163 -0
  38. pixlint-1.0/src/pixlint/core/metadata.py +37 -0
  39. pixlint-1.0/src/pixlint/core/pipeline.py +361 -0
  40. pixlint-1.0/src/pixlint/dashboard.py +293 -0
  41. pixlint-1.0/src/pixlint/export/__init__.py +0 -0
  42. pixlint-1.0/src/pixlint/export/extra_formats.py +322 -0
  43. pixlint-1.0/src/pixlint/export/hdf5.py +133 -0
  44. pixlint-1.0/src/pixlint/export/huggingface.py +105 -0
  45. pixlint-1.0/src/pixlint/export/pytorch.py +197 -0
  46. pixlint-1.0/src/pixlint/export/tensorflow.py +190 -0
  47. pixlint-1.0/src/pixlint/export/ultralytics.py +119 -0
  48. pixlint-1.0/src/pixlint/server.py +1883 -0
  49. pixlint-1.0/src/pixlint/splitting/__init__.py +0 -0
  50. pixlint-1.0/src/pixlint/splitting/cross_validation.py +81 -0
  51. pixlint-1.0/src/pixlint/splitting/leakage.py +66 -0
  52. pixlint-1.0/src/pixlint/splitting/splitter.py +157 -0
  53. pixlint-1.0/src/pixlint/transformation/__init__.py +0 -0
  54. pixlint-1.0/src/pixlint/transformation/format_converter.py +354 -0
  55. pixlint-1.0/src/pixlint/transformation/normalize.py +111 -0
  56. pixlint-1.0/src/pixlint/transformation/resize.py +126 -0
  57. pixlint-1.0/src/pixlint/utils/__init__.py +0 -0
  58. pixlint-1.0/src/pixlint/utils/hashing.py +74 -0
  59. pixlint-1.0/src/pixlint/utils/image_io.py +53 -0
  60. pixlint-1.0/src/pixlint/utils/parallel.py +24 -0
  61. pixlint-1.0/src/pixlint/utils/progress.py +74 -0
  62. pixlint-1.0/src/pixlint/utils/schemas.py +446 -0
  63. pixlint-1.0/src/pixlint/utils/security.py +871 -0
  64. pixlint-1.0/src/pixlint/visualization/__init__.py +0 -0
  65. pixlint-1.0/src/pixlint/visualization/charts.py +284 -0
  66. pixlint-1.0/src/pixlint/visualization/embeddings_viz.py +166 -0
  67. pixlint-1.0/src/pixlint/visualization/previews.py +164 -0
  68. pixlint-1.0/src/pixlint.egg-info/PKG-INFO +199 -0
  69. pixlint-1.0/src/pixlint.egg-info/SOURCES.txt +71 -0
  70. pixlint-1.0/src/pixlint.egg-info/dependency_links.txt +1 -0
  71. pixlint-1.0/src/pixlint.egg-info/entry_points.txt +2 -0
  72. pixlint-1.0/src/pixlint.egg-info/requires.txt +49 -0
  73. pixlint-1.0/src/pixlint.egg-info/top_level.txt +1 -0
pixlint-1.0/LICENSE ADDED
@@ -0,0 +1,116 @@
1
+ Copyright © 2026 AMIT SINGH RAJAWAT
2
+
3
+ PixLint is licensed under the PolyForm Strict License 1.0.0.
4
+
5
+ Plain-language summary (not a substitute for the license below): you may use
6
+ this software for permitted (noncommercial) purposes only. You may NOT
7
+ distribute the software, and you may NOT make changes or new works based on it.
8
+ For any other use — including commercial use, redistribution, or modification —
9
+ you must obtain a separate written license from the copyright holder.
10
+
11
+ --------------------------------------------------------------------------------
12
+
13
+ # PolyForm Strict License 1.0.0
14
+
15
+ <https://polyformproject.org/licenses/strict/1.0.0>
16
+
17
+ ## Acceptance
18
+
19
+ In order to get any license under these terms, you must agree
20
+ to them as both strict obligations and conditions to all
21
+ your licenses.
22
+
23
+ ## Copyright License
24
+
25
+ The licensor grants you a copyright license for the software
26
+ to do everything you might do with the software that would
27
+ otherwise infringe the licensor's copyright in it for any
28
+ permitted purpose, other than distributing the software or
29
+ making changes or new works based on the software.
30
+
31
+ ## Patent License
32
+
33
+ The licensor grants you a patent license for the software that
34
+ covers patent claims the licensor can license, or becomes able
35
+ to license, that you would infringe by using the software.
36
+
37
+ ## Noncommercial Purposes
38
+
39
+ Any noncommercial purpose is a permitted purpose.
40
+
41
+ ## Personal Uses
42
+
43
+ Personal use for research, experiment, and testing for
44
+ the benefit of public knowledge, personal study, private
45
+ entertainment, hobby projects, amateur pursuits, or religious
46
+ observance, without any anticipated commercial application,
47
+ is use for a permitted purpose.
48
+
49
+ ## Noncommercial Organizations
50
+
51
+ Use by any charitable organization, educational institution,
52
+ public research organization, public safety or health
53
+ organization, environmental protection organization,
54
+ or government institution is use for a permitted purpose
55
+ regardless of the source of funding or obligations resulting
56
+ from the funding.
57
+
58
+ ## Fair Use
59
+
60
+ You may have "fair use" rights for the software under the
61
+ law. These terms do not limit them.
62
+
63
+ ## No Other Rights
64
+
65
+ These terms do not allow you to sublicense or transfer any of
66
+ your licenses to anyone else, or prevent the licensor from
67
+ granting licenses to anyone else. These terms do not imply
68
+ any other licenses.
69
+
70
+ ## Patent Defense
71
+
72
+ If you make any written claim that the software infringes or
73
+ contributes to infringement of any patent, your patent license
74
+ for the software granted under these terms ends immediately. If
75
+ your company makes such a claim, your patent license ends
76
+ immediately for work on behalf of your company.
77
+
78
+ ## Violations
79
+
80
+ The first time you are notified in writing that you have
81
+ violated any of these terms, or done anything with the software
82
+ not covered by your licenses, your licenses can nonetheless
83
+ continue if you come into full compliance with these terms,
84
+ and take practical steps to correct past violations, within
85
+ 32 days of receiving notice. Otherwise, all your licenses
86
+ end immediately.
87
+
88
+ ## No Liability
89
+
90
+ ***As far as the law allows, the software comes as is, without
91
+ any warranty or condition, and the licensor will not be liable
92
+ to you for any damages arising out of these terms or the use
93
+ or nature of the software, under any kind of legal claim.***
94
+
95
+ ## Definitions
96
+
97
+ The **licensor** is the individual or entity offering these
98
+ terms, and the **software** is the software the licensor makes
99
+ available under these terms.
100
+
101
+ **You** refers to the individual or entity agreeing to these
102
+ terms.
103
+
104
+ **Your company** is any legal entity, sole proprietorship,
105
+ or other kind of organization that you work for, plus all
106
+ organizations that have control over, are under the control of,
107
+ or are under common control with that organization. **Control**
108
+ means ownership of substantially all the assets of an entity,
109
+ or the power to direct its management and policies by vote,
110
+ contract, or otherwise. Control can be direct or indirect.
111
+
112
+ **Your licenses** are all the licenses granted to you for the
113
+ software under these terms.
114
+
115
+ **Use** means anything you do with the software requiring one
116
+ of your licenses.
@@ -0,0 +1,26 @@
1
+ # Files to INCLUDE in the source distribution (sdist)
2
+ include README.md
3
+ include LICENSE
4
+ include requirements.txt
5
+ include pyproject.toml
6
+ recursive-include src/pixlint *.py
7
+
8
+ # Files/dirs to EXCLUDE from the source distribution
9
+ exclude plan.md
10
+ exclude test_client.py
11
+ exclude uv.lock
12
+ exclude bandit*.json
13
+ exclude .coverage
14
+ exclude Dockerfile
15
+ exclude .dockerignore
16
+ prune tests
17
+ prune test_runner
18
+ prune docs
19
+ prune examples
20
+ prune build
21
+ prune dist
22
+ prune .github
23
+ global-exclude *.pyc
24
+ global-exclude __pycache__
25
+ global-exclude *.so
26
+ global-exclude .DS_Store
pixlint-1.0/PKG-INFO ADDED
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: pixlint
3
+ Version: 1.0
4
+ Summary: MCP server for managing, analyzing, and optimizing computer vision datasets
5
+ Author: PixLint Contributors
6
+ License: PolyForm Strict License 1.0.0
7
+ Project-URL: Homepage, https://github.com/amitsingh-24/PixLint
8
+ Project-URL: Repository, https://github.com/amitsingh-24/PixLint
9
+ Project-URL: Issues, https://github.com/amitsingh-24/PixLint/issues
10
+ Keywords: computer-vision,datasets,mcp,model-context-protocol,augmentation
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: Other/Proprietary License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: mcp>=1.0.0
26
+ Requires-Dist: pydantic>=2.0
27
+ Requires-Dist: Pillow>=10.0
28
+ Requires-Dist: opencv-python-headless>=4.8
29
+ Requires-Dist: numpy>=1.24
30
+ Requires-Dist: scipy>=1.11
31
+ Requires-Dist: defusedxml>=0.7
32
+ Requires-Dist: PyYAML>=6.0
33
+ Requires-Dist: imagehash>=4.3
34
+ Requires-Dist: scikit-image>=0.21
35
+ Requires-Dist: scikit-learn>=1.3
36
+ Requires-Dist: pandas>=2.0
37
+ Requires-Dist: albumentations>=1.3
38
+ Requires-Dist: matplotlib>=3.7
39
+ Requires-Dist: rich>=13.0
40
+ Requires-Dist: tqdm>=4.65
41
+ Provides-Extra: dev
42
+ Requires-Dist: pytest>=7.4; extra == "dev"
43
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
44
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
45
+ Requires-Dist: ruff>=0.1; extra == "dev"
46
+ Requires-Dist: mypy>=1.6; extra == "dev"
47
+ Provides-Extra: torch
48
+ Requires-Dist: torch>=2.0; extra == "torch"
49
+ Requires-Dist: torchvision>=0.15; extra == "torch"
50
+ Provides-Extra: tensorflow
51
+ Requires-Dist: tensorflow>=2.12; extra == "tensorflow"
52
+ Provides-Extra: clip
53
+ Requires-Dist: clip-anytorch>=2.5; extra == "clip"
54
+ Provides-Extra: umap
55
+ Requires-Dist: umap-learn>=0.5; extra == "umap"
56
+ Provides-Extra: hdf5
57
+ Requires-Dist: h5py>=3.8; extra == "hdf5"
58
+ Provides-Extra: huggingface
59
+ Requires-Dist: datasets>=2.14; extra == "huggingface"
60
+ Requires-Dist: huggingface-hub>=0.19; extra == "huggingface"
61
+ Provides-Extra: dashboard
62
+ Requires-Dist: streamlit>=1.28; extra == "dashboard"
63
+ Provides-Extra: all
64
+ Requires-Dist: pixlint[clip,dashboard,dev,hdf5,huggingface,tensorflow,torch,umap]; extra == "all"
65
+ Dynamic: license-file
66
+
67
+ # PixLint
68
+
69
+ **Lint, curate, and prepare computer-vision datasets — right from your AI assistant.**
70
+
71
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
72
+ [![License](https://img.shields.io/badge/license-PolyForm%20Strict%201.0.0-orange.svg)](LICENSE)
73
+ [![MCP](https://img.shields.io/badge/MCP-server-purple.svg)](https://modelcontextprotocol.io)
74
+
75
+ PixLint is an [MCP](https://modelcontextprotocol.io) server that gives AI assistants — Claude, Cursor, VS Code, and any MCP client — direct, conversational access to a complete computer-vision dataset toolkit: analyze quality, find duplicates and label errors, clean and curate, split, augment, convert formats, and export to every major training framework.
76
+
77
+ It runs locally over stdio, or self-hosted on the internet over authenticated HTTP.
78
+
79
+ ---
80
+
81
+ ## Why PixLint
82
+
83
+ Most dataset tooling is either a paid SaaS or a heavy GUI app. PixLint is a single, open-source, self-hostable server an AI agent can drive end to end — and it does things others keep behind paid tiers:
84
+
85
+ - **🩺 Dataset Doctor** — one call runs a full diagnostic and returns a prioritized, *executable* fix plan.
86
+ - **Label-error detection** — automatically surface images that are probably mislabeled.
87
+ - **Natural-language query** — *"find blurry images with a person on the left"*, answered over your data.
88
+ - **Weak-slice discovery** — find under-represented or low-quality slices to collect or augment next.
89
+ - **Curation that writes a new dataset** — clean / filter / remap, not just report.
90
+ - **Auto-labeling** with a pretrained detector, and **one-command Hugging Face publishing**.
91
+
92
+ ---
93
+
94
+ ## Features
95
+
96
+ **103 operations** — 67 tools, 23 resources, 13 prompts.
97
+
98
+ | Category | What you get |
99
+ |----------|--------------|
100
+ | **Load** | COCO · VOC · YOLO · KITTI · folder, plus cloud (S3 / GCS / Azure) |
101
+ | **Analyze** | Duplicates · quality (blur/exposure/noise/contrast) · integrity · class distribution · embeddings · semantic search · outliers · health score |
102
+ | **Data intelligence** | Dataset Doctor readiness report · label-error detection · natural-language query · weak-slice / bias discovery |
103
+ | **Curate** | Filter to a subset · clean (corrupt / out-of-bounds / degenerate / duplicates) · remap classes — each produces a new dataset |
104
+ | **Augment & transform** | YOLO/classification/segmentation pipelines · resize · normalize · format conversion |
105
+ | **Split** | Stratified / random / temporal / grouped · k-fold · data-leakage detection |
106
+ | **Auto-label** | Pretrained COCO-80 detector → pre-annotated dataset |
107
+ | **Export & publish** | PyTorch · TensorFlow · Ultralytics · HDF5 · WebDataset · FiftyOne · CVAT · LabelMe · Hugging Face Hub |
108
+ | **Pipelines** | Compose multi-step workflows and reuse pre-built templates |
109
+
110
+ ---
111
+
112
+ ## Quick Start
113
+
114
+ ### 1. Install
115
+
116
+ ```bash
117
+ pip install pixlint
118
+ ```
119
+
120
+ Optional extras add heavier capabilities:
121
+
122
+ ```bash
123
+ pip install "pixlint[torch]" # embeddings, auto-labeling, label-error detection
124
+ pip install "pixlint[huggingface]" # Hugging Face export + publishing
125
+ pip install "pixlint[all]" # everything
126
+ ```
127
+
128
+ ### 2. Connect your AI assistant
129
+
130
+ **Claude Desktop** — `claude_desktop_config.json`:
131
+
132
+ ```json
133
+ {
134
+ "mcpServers": {
135
+ "pixlint": {
136
+ "command": "pixlint",
137
+ "env": { "CV_DATA_DIR": "/path/to/your/datasets" }
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ **Cursor / VS Code** — `.cursor/mcp.json` or `.vscode/mcp.json`:
144
+
145
+ ```json
146
+ {
147
+ "mcpServers": {
148
+ "pixlint": {
149
+ "command": "pixlint",
150
+ "env": { "CV_DATA_DIR": "/path/to/your/datasets" }
151
+ }
152
+ }
153
+ }
154
+ ```
155
+
156
+ `CV_DATA_DIR` is the directory PixLint is allowed to read datasets from.
157
+
158
+ ### 3. Just ask
159
+
160
+ > *"Load my dataset at `/data/coco_person`, give it a readiness report, then clean it and export for YOLO."*
161
+
162
+ Your assistant calls the right PixLint tools in sequence — diagnose, clean, split, export — and hands back a training-ready dataset.
163
+
164
+ ---
165
+
166
+ ## Security
167
+
168
+ PixLint touches the filesystem and can be exposed to a network, so protections run on **every** tool call:
169
+
170
+ - Paths are confined to your configured data directory (reads **and** writes).
171
+ - Credentials come only from environment variables, never tool inputs.
172
+ - Per-call rate limiting, concurrency limits, and audit logging.
173
+ - Decompression-bomb protection on image decode.
174
+ - Optional bearer-token authentication for the HTTP transport.
175
+
176
+ See the [Security Guide](docs/security.md) for the full threat model and the recommended production checklist.
177
+
178
+ ---
179
+
180
+ ## Documentation
181
+
182
+ | Guide | Description |
183
+ |-------|-------------|
184
+ | [Getting Started](docs/getting_started.md) | Installation, configuration, first steps |
185
+ | [MCP Client Setup](docs/mcp_client_setup.md) | Claude, Cursor, VS Code, and remote/HTTP hosting |
186
+ | [API Reference](docs/api_reference.md) | All 67 tools with parameters |
187
+ | [Security Guide](docs/security.md) | Threat model, configuration, hosting |
188
+ | [Pipeline Templates](docs/pipeline_templates.md) | Pre-built and custom pipelines |
189
+
190
+ Runnable scripts live in [`examples/`](examples/).
191
+
192
+ ---
193
+
194
+ ## License
195
+
196
+ PixLint is source-available under the **PolyForm Strict License 1.0.0** — see [LICENSE](LICENSE).
197
+ You may use it for permitted (noncommercial) purposes; commercial use, redistribution, or
198
+ modification requires a separate license from the copyright holder. Contributions are welcome
199
+ via pull request.
pixlint-1.0/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # PixLint
2
+
3
+ **Lint, curate, and prepare computer-vision datasets — right from your AI assistant.**
4
+
5
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
6
+ [![License](https://img.shields.io/badge/license-PolyForm%20Strict%201.0.0-orange.svg)](LICENSE)
7
+ [![MCP](https://img.shields.io/badge/MCP-server-purple.svg)](https://modelcontextprotocol.io)
8
+
9
+ PixLint is an [MCP](https://modelcontextprotocol.io) server that gives AI assistants — Claude, Cursor, VS Code, and any MCP client — direct, conversational access to a complete computer-vision dataset toolkit: analyze quality, find duplicates and label errors, clean and curate, split, augment, convert formats, and export to every major training framework.
10
+
11
+ It runs locally over stdio, or self-hosted on the internet over authenticated HTTP.
12
+
13
+ ---
14
+
15
+ ## Why PixLint
16
+
17
+ Most dataset tooling is either a paid SaaS or a heavy GUI app. PixLint is a single, open-source, self-hostable server an AI agent can drive end to end — and it does things others keep behind paid tiers:
18
+
19
+ - **🩺 Dataset Doctor** — one call runs a full diagnostic and returns a prioritized, *executable* fix plan.
20
+ - **Label-error detection** — automatically surface images that are probably mislabeled.
21
+ - **Natural-language query** — *"find blurry images with a person on the left"*, answered over your data.
22
+ - **Weak-slice discovery** — find under-represented or low-quality slices to collect or augment next.
23
+ - **Curation that writes a new dataset** — clean / filter / remap, not just report.
24
+ - **Auto-labeling** with a pretrained detector, and **one-command Hugging Face publishing**.
25
+
26
+ ---
27
+
28
+ ## Features
29
+
30
+ **103 operations** — 67 tools, 23 resources, 13 prompts.
31
+
32
+ | Category | What you get |
33
+ |----------|--------------|
34
+ | **Load** | COCO · VOC · YOLO · KITTI · folder, plus cloud (S3 / GCS / Azure) |
35
+ | **Analyze** | Duplicates · quality (blur/exposure/noise/contrast) · integrity · class distribution · embeddings · semantic search · outliers · health score |
36
+ | **Data intelligence** | Dataset Doctor readiness report · label-error detection · natural-language query · weak-slice / bias discovery |
37
+ | **Curate** | Filter to a subset · clean (corrupt / out-of-bounds / degenerate / duplicates) · remap classes — each produces a new dataset |
38
+ | **Augment & transform** | YOLO/classification/segmentation pipelines · resize · normalize · format conversion |
39
+ | **Split** | Stratified / random / temporal / grouped · k-fold · data-leakage detection |
40
+ | **Auto-label** | Pretrained COCO-80 detector → pre-annotated dataset |
41
+ | **Export & publish** | PyTorch · TensorFlow · Ultralytics · HDF5 · WebDataset · FiftyOne · CVAT · LabelMe · Hugging Face Hub |
42
+ | **Pipelines** | Compose multi-step workflows and reuse pre-built templates |
43
+
44
+ ---
45
+
46
+ ## Quick Start
47
+
48
+ ### 1. Install
49
+
50
+ ```bash
51
+ pip install pixlint
52
+ ```
53
+
54
+ Optional extras add heavier capabilities:
55
+
56
+ ```bash
57
+ pip install "pixlint[torch]" # embeddings, auto-labeling, label-error detection
58
+ pip install "pixlint[huggingface]" # Hugging Face export + publishing
59
+ pip install "pixlint[all]" # everything
60
+ ```
61
+
62
+ ### 2. Connect your AI assistant
63
+
64
+ **Claude Desktop** — `claude_desktop_config.json`:
65
+
66
+ ```json
67
+ {
68
+ "mcpServers": {
69
+ "pixlint": {
70
+ "command": "pixlint",
71
+ "env": { "CV_DATA_DIR": "/path/to/your/datasets" }
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ **Cursor / VS Code** — `.cursor/mcp.json` or `.vscode/mcp.json`:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "pixlint": {
83
+ "command": "pixlint",
84
+ "env": { "CV_DATA_DIR": "/path/to/your/datasets" }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ `CV_DATA_DIR` is the directory PixLint is allowed to read datasets from.
91
+
92
+ ### 3. Just ask
93
+
94
+ > *"Load my dataset at `/data/coco_person`, give it a readiness report, then clean it and export for YOLO."*
95
+
96
+ Your assistant calls the right PixLint tools in sequence — diagnose, clean, split, export — and hands back a training-ready dataset.
97
+
98
+ ---
99
+
100
+ ## Security
101
+
102
+ PixLint touches the filesystem and can be exposed to a network, so protections run on **every** tool call:
103
+
104
+ - Paths are confined to your configured data directory (reads **and** writes).
105
+ - Credentials come only from environment variables, never tool inputs.
106
+ - Per-call rate limiting, concurrency limits, and audit logging.
107
+ - Decompression-bomb protection on image decode.
108
+ - Optional bearer-token authentication for the HTTP transport.
109
+
110
+ See the [Security Guide](docs/security.md) for the full threat model and the recommended production checklist.
111
+
112
+ ---
113
+
114
+ ## Documentation
115
+
116
+ | Guide | Description |
117
+ |-------|-------------|
118
+ | [Getting Started](docs/getting_started.md) | Installation, configuration, first steps |
119
+ | [MCP Client Setup](docs/mcp_client_setup.md) | Claude, Cursor, VS Code, and remote/HTTP hosting |
120
+ | [API Reference](docs/api_reference.md) | All 67 tools with parameters |
121
+ | [Security Guide](docs/security.md) | Threat model, configuration, hosting |
122
+ | [Pipeline Templates](docs/pipeline_templates.md) | Pre-built and custom pipelines |
123
+
124
+ Runnable scripts live in [`examples/`](examples/).
125
+
126
+ ---
127
+
128
+ ## License
129
+
130
+ PixLint is source-available under the **PolyForm Strict License 1.0.0** — see [LICENSE](LICENSE).
131
+ You may use it for permitted (noncommercial) purposes; commercial use, redistribution, or
132
+ modification requires a separate license from the copyright holder. Contributions are welcome
133
+ via pull request.
@@ -0,0 +1,113 @@
1
+ [project]
2
+ name = "pixlint"
3
+ version = "1.0"
4
+ description = "MCP server for managing, analyzing, and optimizing computer vision datasets"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = {text = "PolyForm Strict License 1.0.0"}
8
+ authors = [
9
+ {name = "PixLint Contributors"},
10
+ ]
11
+ keywords = ["computer-vision", "datasets", "mcp", "model-context-protocol", "augmentation"]
12
+ classifiers = [
13
+ "Development Status :: 4 - Beta",
14
+ "Intended Audience :: Developers",
15
+ "Intended Audience :: Science/Research",
16
+ "License :: Other/Proprietary License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
22
+ "Topic :: Scientific/Engineering :: Image Processing",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ ]
25
+ dependencies = [
26
+ "mcp>=1.0.0",
27
+ "pydantic>=2.0",
28
+ "Pillow>=10.0",
29
+ "opencv-python-headless>=4.8",
30
+ "numpy>=1.24",
31
+ "scipy>=1.11",
32
+ "defusedxml>=0.7",
33
+ "PyYAML>=6.0",
34
+ "imagehash>=4.3",
35
+ "scikit-image>=0.21",
36
+ "scikit-learn>=1.3",
37
+ "pandas>=2.0",
38
+ "albumentations>=1.3",
39
+ "matplotlib>=3.7",
40
+ "rich>=13.0",
41
+ "tqdm>=4.65",
42
+ ]
43
+
44
+ [project.optional-dependencies]
45
+ dev = [
46
+ "pytest>=7.4",
47
+ "pytest-cov>=4.1",
48
+ "pytest-asyncio>=0.21",
49
+ "ruff>=0.1",
50
+ "mypy>=1.6",
51
+ ]
52
+ torch = [
53
+ "torch>=2.0",
54
+ "torchvision>=0.15",
55
+ ]
56
+ tensorflow = [
57
+ "tensorflow>=2.12",
58
+ ]
59
+ clip = [
60
+ # PyPI-published repackaging of OpenAI CLIP (installs as `import clip`).
61
+ # A direct git URL is not allowed by PyPI, so we use this instead.
62
+ "clip-anytorch>=2.5",
63
+ ]
64
+ umap = [
65
+ "umap-learn>=0.5",
66
+ ]
67
+ hdf5 = [
68
+ "h5py>=3.8",
69
+ ]
70
+ huggingface = [
71
+ "datasets>=2.14",
72
+ "huggingface-hub>=0.19",
73
+ ]
74
+ dashboard = [
75
+ "streamlit>=1.28",
76
+ ]
77
+ all = [
78
+ "pixlint[dev,torch,tensorflow,clip,umap,hdf5,huggingface,dashboard]",
79
+ ]
80
+
81
+ [project.urls]
82
+ Homepage = "https://github.com/amitsingh-24/PixLint"
83
+ Repository = "https://github.com/amitsingh-24/PixLint"
84
+ Issues = "https://github.com/amitsingh-24/PixLint/issues"
85
+
86
+ [project.scripts]
87
+ pixlint = "pixlint.server:main"
88
+
89
+ [build-system]
90
+ requires = ["setuptools>=68.0"]
91
+ build-backend = "setuptools.build_meta"
92
+
93
+ [tool.setuptools.packages.find]
94
+ where = ["src"]
95
+
96
+ [tool.ruff]
97
+ line-length = 100
98
+ target-version = "py310"
99
+
100
+ [tool.pytest.ini_options]
101
+ testpaths = ["tests"]
102
+ python_files = ["test_*.py"]
103
+
104
+ [tool.coverage.run]
105
+ source = ["pixlint"]
106
+ omit = ["*/tests/*"]
107
+
108
+ [tool.coverage.report]
109
+ exclude_lines = [
110
+ "pragma: no cover",
111
+ "def __repr__",
112
+ "if __name__ == .__main__.:",
113
+ ]
@@ -0,0 +1,57 @@
1
+ # Core
2
+ mcp>=1.0.0
3
+ pydantic>=2.0
4
+ Pillow>=10.0
5
+ opencv-python-headless>=4.8
6
+ numpy>=1.24
7
+ scipy>=1.11
8
+ defusedxml>=0.7
9
+ PyYAML>=6.0
10
+ imagehash>=4.3
11
+ scikit-image>=0.21
12
+ scikit-learn>=1.3
13
+ pandas>=2.0
14
+ albumentations>=1.3
15
+ matplotlib>=3.7
16
+ rich>=13.0
17
+ tqdm>=4.65
18
+
19
+ # Development
20
+ pytest>=7.4
21
+ pytest-cov>=4.1
22
+ pytest-asyncio>=0.21
23
+ ruff>=0.1
24
+ mypy>=1.6
25
+
26
+ # Optional: Torch-based features
27
+ torch>=2.0
28
+ torchvision>=0.15
29
+
30
+ # Optional: CLIP for semantic search
31
+ # clip @ git+https://github.com/openai/CLIP.git
32
+
33
+ # Optional: TensorFlow export
34
+ # tensorflow>=2.12
35
+
36
+ # Optional: UMAP visualization
37
+ # umap-learn>=0.5
38
+
39
+ # Optional: HDF5 export
40
+ # h5py>=3.8
41
+
42
+ # Optional: Cloud storage
43
+ # boto3>=1.28 # S3
44
+ # google-cloud-storage>=2.10 # GCS
45
+ # azure-storage-blob>=12.19 # Azure
46
+
47
+ # Optional: BLIP captioning
48
+ # transformers>=4.35
49
+
50
+ # Optional: Dashboard
51
+ # streamlit>=1.28
52
+
53
+ # Optional: WebDataset export
54
+ # webdataset>=0.2
55
+
56
+ # Optional: FiftyOne export
57
+ # fiftyone>=0.20
pixlint-1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+