visionservex 0.3.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.
- visionservex-0.3.0/.gitignore +118 -0
- visionservex-0.3.0/CHANGELOG.md +85 -0
- visionservex-0.3.0/CITATION.cff +38 -0
- visionservex-0.3.0/LICENSE +29 -0
- visionservex-0.3.0/NOTICE +19 -0
- visionservex-0.3.0/PKG-INFO +435 -0
- visionservex-0.3.0/README.md +309 -0
- visionservex-0.3.0/SECURITY.md +94 -0
- visionservex-0.3.0/pyproject.toml +172 -0
- visionservex-0.3.0/src/visionservex/__init__.py +29 -0
- visionservex-0.3.0/src/visionservex/__main__.py +11 -0
- visionservex-0.3.0/src/visionservex/api/__init__.py +24 -0
- visionservex-0.3.0/src/visionservex/api/errors.py +87 -0
- visionservex-0.3.0/src/visionservex/api/schemas.py +136 -0
- visionservex-0.3.0/src/visionservex/cli/__init__.py +5 -0
- visionservex-0.3.0/src/visionservex/cli/main.py +957 -0
- visionservex-0.3.0/src/visionservex/cli/tunnel.py +119 -0
- visionservex-0.3.0/src/visionservex/config/__init__.py +31 -0
- visionservex-0.3.0/src/visionservex/config/settings.py +236 -0
- visionservex-0.3.0/src/visionservex/core/__init__.py +37 -0
- visionservex-0.3.0/src/visionservex/core/model.py +245 -0
- visionservex-0.3.0/src/visionservex/core/results.py +380 -0
- visionservex-0.3.0/src/visionservex/engines/__init__.py +30 -0
- visionservex-0.3.0/src/visionservex/engines/_stub.py +118 -0
- visionservex-0.3.0/src/visionservex/engines/base.py +89 -0
- visionservex-0.3.0/src/visionservex/engines/dfine.py +21 -0
- visionservex-0.3.0/src/visionservex/engines/grounded_sam.py +181 -0
- visionservex-0.3.0/src/visionservex/engines/grounding_dino.py +207 -0
- visionservex-0.3.0/src/visionservex/engines/huggingface.py +21 -0
- visionservex-0.3.0/src/visionservex/engines/mock.py +220 -0
- visionservex-0.3.0/src/visionservex/engines/onnx.py +21 -0
- visionservex-0.3.0/src/visionservex/engines/openmmlab.py +26 -0
- visionservex-0.3.0/src/visionservex/engines/pytorch.py +27 -0
- visionservex-0.3.0/src/visionservex/engines/registry.py +36 -0
- visionservex-0.3.0/src/visionservex/engines/rfdetr.py +280 -0
- visionservex-0.3.0/src/visionservex/engines/sam2.py +25 -0
- visionservex-0.3.0/src/visionservex/engines/sam_hf.py +205 -0
- visionservex-0.3.0/src/visionservex/engines/swinv2.py +160 -0
- visionservex-0.3.0/src/visionservex/models/__init__.py +6 -0
- visionservex-0.3.0/src/visionservex/registry/__init__.py +25 -0
- visionservex-0.3.0/src/visionservex/registry/models.yaml +1545 -0
- visionservex-0.3.0/src/visionservex/registry/registry.py +289 -0
- visionservex-0.3.0/src/visionservex/runtime/__init__.py +30 -0
- visionservex-0.3.0/src/visionservex/runtime/cache.py +129 -0
- visionservex-0.3.0/src/visionservex/runtime/device.py +203 -0
- visionservex-0.3.0/src/visionservex/runtime/downloads.py +634 -0
- visionservex-0.3.0/src/visionservex/runtime/jobs.py +173 -0
- visionservex-0.3.0/src/visionservex/runtime/monitor.py +73 -0
- visionservex-0.3.0/src/visionservex/runtime/recommendations.py +172 -0
- visionservex-0.3.0/src/visionservex/runtime/scheduler.py +169 -0
- visionservex-0.3.0/src/visionservex/security/__init__.py +20 -0
- visionservex-0.3.0/src/visionservex/security/auth.py +74 -0
- visionservex-0.3.0/src/visionservex/security/middleware.py +128 -0
- visionservex-0.3.0/src/visionservex/security/ssrf.py +84 -0
- visionservex-0.3.0/src/visionservex/security/validators.py +54 -0
- visionservex-0.3.0/src/visionservex/server/__init__.py +5 -0
- visionservex-0.3.0/src/visionservex/server/app.py +730 -0
- visionservex-0.3.0/src/visionservex/tunnel/__init__.py +15 -0
- visionservex-0.3.0/src/visionservex/tunnel/cloudflare.py +151 -0
- visionservex-0.3.0/src/visionservex/utils/__init__.py +1 -0
- visionservex-0.3.0/src/visionservex/utils/hashing.py +37 -0
- visionservex-0.3.0/src/visionservex/utils/ids.py +13 -0
- visionservex-0.3.0/src/visionservex/utils/images.py +99 -0
- visionservex-0.3.0/src/visionservex/utils/logging.py +77 -0
- visionservex-0.3.0/src/visionservex/utils/paths.py +60 -0
- visionservex-0.3.0/src/visionservex/utils/system.py +222 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# =============================================================
|
|
2
|
+
# Python
|
|
3
|
+
# =============================================================
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*.pyo
|
|
7
|
+
*.pyd
|
|
8
|
+
*$py.class
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Packaging / build
|
|
12
|
+
*.egg
|
|
13
|
+
*.egg-info/
|
|
14
|
+
.eggs/
|
|
15
|
+
build/
|
|
16
|
+
dist/
|
|
17
|
+
wheels/
|
|
18
|
+
MANIFEST
|
|
19
|
+
pip-wheel-metadata/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
|
|
22
|
+
# =============================================================
|
|
23
|
+
# Virtual environments
|
|
24
|
+
# =============================================================
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
|
27
|
+
env/
|
|
28
|
+
ENV/
|
|
29
|
+
.virtualenv/
|
|
30
|
+
|
|
31
|
+
# =============================================================
|
|
32
|
+
# Test & coverage
|
|
33
|
+
# =============================================================
|
|
34
|
+
.pytest_cache/
|
|
35
|
+
.coverage
|
|
36
|
+
.coverage.*
|
|
37
|
+
htmlcov/
|
|
38
|
+
.tox/
|
|
39
|
+
coverage.xml
|
|
40
|
+
*.cover
|
|
41
|
+
junit*.xml
|
|
42
|
+
|
|
43
|
+
# =============================================================
|
|
44
|
+
# Type checking & linting caches
|
|
45
|
+
# =============================================================
|
|
46
|
+
.mypy_cache/
|
|
47
|
+
.ruff_cache/
|
|
48
|
+
.dmypy.json
|
|
49
|
+
|
|
50
|
+
# =============================================================
|
|
51
|
+
# IDE
|
|
52
|
+
# =============================================================
|
|
53
|
+
.idea/
|
|
54
|
+
.vscode/
|
|
55
|
+
*.swp
|
|
56
|
+
*.swo
|
|
57
|
+
*~
|
|
58
|
+
|
|
59
|
+
# =============================================================
|
|
60
|
+
# Logs
|
|
61
|
+
# =============================================================
|
|
62
|
+
*.log
|
|
63
|
+
logs/
|
|
64
|
+
|
|
65
|
+
# =============================================================
|
|
66
|
+
# Model weight files — never commit model weights to git.
|
|
67
|
+
# Download via `visionservex pull <model_id>` instead.
|
|
68
|
+
# =============================================================
|
|
69
|
+
*.pth
|
|
70
|
+
*.pt
|
|
71
|
+
*.bin
|
|
72
|
+
*.ckpt
|
|
73
|
+
*.safetensors
|
|
74
|
+
*.onnx
|
|
75
|
+
*.trt
|
|
76
|
+
*.engine
|
|
77
|
+
*.pkl
|
|
78
|
+
|
|
79
|
+
# =============================================================
|
|
80
|
+
# Model cache directories
|
|
81
|
+
# =============================================================
|
|
82
|
+
.cache/
|
|
83
|
+
models_cache/
|
|
84
|
+
.visionservex/
|
|
85
|
+
model_weights/
|
|
86
|
+
weights/
|
|
87
|
+
checkpoints/
|
|
88
|
+
|
|
89
|
+
# =============================================================
|
|
90
|
+
# Inference outputs — generated at runtime
|
|
91
|
+
# =============================================================
|
|
92
|
+
outputs/
|
|
93
|
+
|
|
94
|
+
# =============================================================
|
|
95
|
+
# Secrets — never commit
|
|
96
|
+
# =============================================================
|
|
97
|
+
.env
|
|
98
|
+
.env.local
|
|
99
|
+
.env.*.local
|
|
100
|
+
|
|
101
|
+
# =============================================================
|
|
102
|
+
# OS
|
|
103
|
+
# =============================================================
|
|
104
|
+
.DS_Store
|
|
105
|
+
.DS_Store?
|
|
106
|
+
._*
|
|
107
|
+
Thumbs.db
|
|
108
|
+
ehthumbs.db
|
|
109
|
+
desktop.ini
|
|
110
|
+
|
|
111
|
+
# =============================================================
|
|
112
|
+
# Cloudflare Tunnel credentials & generated configs
|
|
113
|
+
# =============================================================
|
|
114
|
+
cert.pem
|
|
115
|
+
*.pem
|
|
116
|
+
# cloudflared credential files (UUID-named)
|
|
117
|
+
[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]-*.json
|
|
118
|
+
tunnel*.yaml
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.3.0] - 2026-05-15
|
|
11
|
+
|
|
12
|
+
### Added (Pass 3 through Pass 7)
|
|
13
|
+
- **RF-DETR real backend** (detection + segmentation) via the `rfdetr` PyPI
|
|
14
|
+
package. Model IDs: `rfdetr-nano`, `rfdetr-small`, `rfdetr-base`,
|
|
15
|
+
`rfdetr-medium`, `rfdetr-large`, `rfdetr-seg-nano`, `rfdetr-seg-small`,
|
|
16
|
+
`rfdetr-seg-medium`. Status: beta/wired.
|
|
17
|
+
- **SwinV2 real classification backend** via HF Transformers
|
|
18
|
+
(`AutoModelForImageClassification`). Model IDs: `swinv2-tiny` through
|
|
19
|
+
`swinv2-large`. Status: beta/wired.
|
|
20
|
+
- **SAM v1 real backend** via HF Transformers (`SamModel`, `SamProcessor`).
|
|
21
|
+
Model IDs: `sam-vit-base`, `sam-vit-large`, `sam-vit-huge`. Supports point
|
|
22
|
+
and box prompts. Status: beta/wired.
|
|
23
|
+
- **Grounded SAM composed pipeline** (`grounded-sam`) combining Grounding
|
|
24
|
+
DINO Tiny + SAM v1 Base for text-prompted segmentation. Status: beta/wired.
|
|
25
|
+
- **Grounding DINO fp16 fix**: cast float tensors to model dtype before
|
|
26
|
+
forward pass; integer token tensors are not cast. Fallback-to-fp32 on
|
|
27
|
+
dtype errors.
|
|
28
|
+
- `package_managed` download type for models that manage their own cache
|
|
29
|
+
(RF-DETR). `is_downloadable()` includes this type.
|
|
30
|
+
- New engine files: `engines/rfdetr.py`, `engines/swinv2.py`,
|
|
31
|
+
`engines/sam_hf.py`, `engines/grounded_sam.py`.
|
|
32
|
+
- New registry entries: SAM v1 variants, Grounded SAM pipeline.
|
|
33
|
+
- Tests: `test_rfdetr_engine.py`, `test_new_backends.py` with `@real_model`
|
|
34
|
+
and `@gpu` marks registered in `pyproject.toml`.
|
|
35
|
+
- Version bumped to 0.3.0.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- RF-DETR and RF-DETR-Seg registry entries updated to `download_type:
|
|
39
|
+
package_managed`, `implementation_status: wired`, `status: beta`.
|
|
40
|
+
- SwinV2 registry entries updated to `engine: swinv2`, `implementation_status:
|
|
41
|
+
wired`, `status: beta`.
|
|
42
|
+
- SAM 2 entries (`sam2-hiera-*`) remain `stub` / `experimental` with improved
|
|
43
|
+
warning: "Use `sam-vit-base` instead."
|
|
44
|
+
- `grounded-sam` added as wired alternative to `grounded-sam2` (which needs
|
|
45
|
+
the sam2 package not on PyPI).
|
|
46
|
+
|
|
47
|
+
## [0.2.0] - 2026-05-15
|
|
48
|
+
|
|
49
|
+
### Added (Pass 2)
|
|
50
|
+
- Grounding DINO real backend (wired via HF Transformers).
|
|
51
|
+
- First-class downloader (HF, GitHub, direct URL, resume, SHA-256).
|
|
52
|
+
- Job system for async model downloads.
|
|
53
|
+
- Recommendation engine and `recommend` CLI command.
|
|
54
|
+
- Beginner-friendly `doctor` command (system, devices, deps, recommendations).
|
|
55
|
+
- `devices`, `pull-easy`, `pull-recommended`, `pull-all`, `cache verify/repair`
|
|
56
|
+
commands.
|
|
57
|
+
- Auto-pull config, job-mode server prediction.
|
|
58
|
+
- Expanded registry (63 models with difficulty/vram/download metadata).
|
|
59
|
+
- Beginner examples (10 scripts), synthetic sample images.
|
|
60
|
+
- Author attribution (Arash Sajjadi, University of Saskatchewan).
|
|
61
|
+
- CITATION.cff, NOTICE.
|
|
62
|
+
|
|
63
|
+
## [0.1.0] - 2026-05-15
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
- Initial public scaffold.
|
|
67
|
+
- Model registry with permissive-license-first defaults.
|
|
68
|
+
- `VisionModel` high-level Python API with stable result schemas.
|
|
69
|
+
- FastAPI server with `/health`, `/ready`, `/version`, `/models`,
|
|
70
|
+
`/predict`, `/detect`, `/segment`, `/pose`, `/classify`,
|
|
71
|
+
`/open-vocab/detect`, `/grounded-segment`, and `/metrics`.
|
|
72
|
+
- Typer CLI: `doctor`, `list-models`, `info`, `pull`, `cache`, `predict`,
|
|
73
|
+
`serve`, `tunnel`, `benchmark`, `export`, `config`.
|
|
74
|
+
- Security middleware: API key auth, rate limit, body-size limit,
|
|
75
|
+
image validators, SSRF guard, log redaction.
|
|
76
|
+
- Cloudflare Tunnel integration via external `cloudflared` binary, with a
|
|
77
|
+
safe ingress config generator that includes a catch-all 404.
|
|
78
|
+
- `MockEngine` for tests and engine stubs for D-FINE, RF-DETR, SAM 2,
|
|
79
|
+
Grounding DINO with actionable install hints.
|
|
80
|
+
- LRU model cache with VRAM-aware lazy loading.
|
|
81
|
+
- Docker (CPU) image and `docker-compose.yml` with optional cloudflared
|
|
82
|
+
sidecar.
|
|
83
|
+
- Documentation covering installation, quickstart, model zoo, tasks,
|
|
84
|
+
Cloudflare Tunnel, security, deployment, performance, troubleshooting,
|
|
85
|
+
model licenses, and an LLM-agent guide.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# Copyright (c) 2026 Arash Sajjadi
|
|
3
|
+
cff-version: 1.2.0
|
|
4
|
+
message: "If you use VisionServeX in academic work, please cite the project as follows."
|
|
5
|
+
title: "VisionServeX: A permissive-license-aware framework for local computer vision model serving"
|
|
6
|
+
authors:
|
|
7
|
+
- family-names: "Sajjadi"
|
|
8
|
+
given-names: "Arash"
|
|
9
|
+
affiliation: "University of Saskatchewan, Department of Computer Science"
|
|
10
|
+
email: "arash.sajjadi@usask.ca"
|
|
11
|
+
date-released: "2026-05-15"
|
|
12
|
+
version: "0.2.0"
|
|
13
|
+
license: "Apache-2.0"
|
|
14
|
+
repository-code: "https://github.com/example/visionservex"
|
|
15
|
+
url: "https://github.com/example/visionservex"
|
|
16
|
+
keywords:
|
|
17
|
+
- "computer vision"
|
|
18
|
+
- "object detection"
|
|
19
|
+
- "segmentation"
|
|
20
|
+
- "inference"
|
|
21
|
+
- "fastapi"
|
|
22
|
+
- "cloudflare tunnel"
|
|
23
|
+
abstract: >-
|
|
24
|
+
VisionServeX is a Python framework for serving modern, permissively-licensed
|
|
25
|
+
computer vision models on local machines, workstations, and small servers.
|
|
26
|
+
It targets a beginner-friendly developer experience, predictable JSON
|
|
27
|
+
contracts for LLM agents, and secure-by-default operation, with first-class
|
|
28
|
+
support for Cloudflare Tunnel-based public exposure.
|
|
29
|
+
preferred-citation:
|
|
30
|
+
type: software
|
|
31
|
+
title: "VisionServeX"
|
|
32
|
+
authors:
|
|
33
|
+
- family-names: "Sajjadi"
|
|
34
|
+
given-names: "Arash"
|
|
35
|
+
year: 2026
|
|
36
|
+
notes: >-
|
|
37
|
+
Developed under the supervision of Prof. Mark Eramian, Department of
|
|
38
|
+
Computer Science, University of Saskatchewan, Computer Vision Lab.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 Arash Sajjadi
|
|
6
|
+
Developed under the supervision of Prof. Mark Eramian, Department of
|
|
7
|
+
Computer Science, University of Saskatchewan, Computer Vision Lab.
|
|
8
|
+
|
|
9
|
+
SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
|
|
11
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
you may not use this file except in compliance with the License.
|
|
13
|
+
You may obtain a copy of the License at
|
|
14
|
+
|
|
15
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
|
|
17
|
+
Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
See the License for the specific language governing permissions and
|
|
21
|
+
limitations under the License.
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
Full Apache 2.0 license text is available at:
|
|
26
|
+
https://www.apache.org/licenses/LICENSE-2.0.txt
|
|
27
|
+
|
|
28
|
+
Each integrated upstream model retains its own license. Refer to
|
|
29
|
+
docs/model_licenses.md for per-model upstream license information.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
VisionServeX
|
|
2
|
+
Copyright (c) 2026 Arash Sajjadi
|
|
3
|
+
|
|
4
|
+
This product includes software developed by Arash Sajjadi
|
|
5
|
+
(arash.sajjadi@usask.ca, PhD Candidate, Department of Computer Science,
|
|
6
|
+
University of Saskatchewan).
|
|
7
|
+
|
|
8
|
+
Developed under the supervision of Prof. Mark Eramian, Department of
|
|
9
|
+
Computer Science, University of Saskatchewan, Computer Vision Lab.
|
|
10
|
+
This work is not an official product of the University of Saskatchewan
|
|
11
|
+
and is not endorsed by the University unless stated otherwise in writing.
|
|
12
|
+
|
|
13
|
+
----
|
|
14
|
+
|
|
15
|
+
This project integrates and references third-party computer vision models.
|
|
16
|
+
Each integrated upstream project retains its own copyright and license.
|
|
17
|
+
Refer to docs/model_licenses.md for per-model upstream license information.
|
|
18
|
+
Users are responsible for reviewing upstream model, dataset, and checkpoint
|
|
19
|
+
licenses before commercial deployment.
|