annodesk 0.3.1__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.
- annodesk-0.3.1/.gitignore +30 -0
- annodesk-0.3.1/AGENTS.md +72 -0
- annodesk-0.3.1/LICENSE +21 -0
- annodesk-0.3.1/PKG-INFO +636 -0
- annodesk-0.3.1/README.md +194 -0
- annodesk-0.3.1/assets/models/yolo11n/NOTICE.md +12 -0
- annodesk-0.3.1/assets/models/yolo11n/yolo11n.pt +0 -0
- annodesk-0.3.1/docs/releases/0.3.1.md +39 -0
- annodesk-0.3.1/docs/specs/annodesk.md +479 -0
- annodesk-0.3.1/docs/specs/assisted-boxes.md +105 -0
- annodesk-0.3.1/docs/specs/mask-candidates.md +28 -0
- annodesk-0.3.1/docs/user-guide-cn.md +607 -0
- annodesk-0.3.1/docs/user-guide.md +615 -0
- annodesk-0.3.1/docs/validation/real-models-2026-10-22.md +82 -0
- annodesk-0.3.1/frontend/index.html +13 -0
- annodesk-0.3.1/frontend/package-lock.json +2109 -0
- annodesk-0.3.1/frontend/package.json +25 -0
- annodesk-0.3.1/frontend/public/annodesk.svg +8 -0
- annodesk-0.3.1/frontend/src/App.vue +1249 -0
- annodesk-0.3.1/frontend/src/api.test.ts +32 -0
- annodesk-0.3.1/frontend/src/api.ts +226 -0
- annodesk-0.3.1/frontend/src/components/AnnotationCanvas.test.ts +656 -0
- annodesk-0.3.1/frontend/src/components/AnnotationCanvas.vue +783 -0
- annodesk-0.3.1/frontend/src/components/BatchSetup.vue +385 -0
- annodesk-0.3.1/frontend/src/components/BoxPaddingControls.vue +67 -0
- annodesk-0.3.1/frontend/src/components/CandidateBar.vue +202 -0
- annodesk-0.3.1/frontend/src/components/CategoryEditor.test.ts +267 -0
- annodesk-0.3.1/frontend/src/components/CategoryEditor.vue +77 -0
- annodesk-0.3.1/frontend/src/components/ClassPalette.vue +71 -0
- annodesk-0.3.1/frontend/src/components/ClassPicker.vue +121 -0
- annodesk-0.3.1/frontend/src/components/ClearImageAnnotations.test.ts +91 -0
- annodesk-0.3.1/frontend/src/components/ClearImageAnnotations.vue +120 -0
- annodesk-0.3.1/frontend/src/components/ExportSetup.vue +436 -0
- annodesk-0.3.1/frontend/src/components/FastTooltip.vue +118 -0
- annodesk-0.3.1/frontend/src/components/FilmStrip.test.ts +185 -0
- annodesk-0.3.1/frontend/src/components/FilmStrip.vue +116 -0
- annodesk-0.3.1/frontend/src/components/Icon.vue +43 -0
- annodesk-0.3.1/frontend/src/components/ImageList.test.ts +204 -0
- annodesk-0.3.1/frontend/src/components/ImageList.vue +148 -0
- annodesk-0.3.1/frontend/src/components/LogDrawer.vue +329 -0
- annodesk-0.3.1/frontend/src/components/ModelNotice.test.ts +103 -0
- annodesk-0.3.1/frontend/src/components/ModelNotice.vue +99 -0
- annodesk-0.3.1/frontend/src/components/ModelSettings.test.ts +192 -0
- annodesk-0.3.1/frontend/src/components/ModelSettings.vue +477 -0
- annodesk-0.3.1/frontend/src/components/SelectedObjectActions.test.ts +77 -0
- annodesk-0.3.1/frontend/src/components/SelectedObjectActions.vue +251 -0
- annodesk-0.3.1/frontend/src/components/StatisticsBar.vue +164 -0
- annodesk-0.3.1/frontend/src/components/StatisticsDrawer.test.ts +71 -0
- annodesk-0.3.1/frontend/src/components/StatisticsDrawer.vue +437 -0
- annodesk-0.3.1/frontend/src/components/TaskProgress.vue +79 -0
- annodesk-0.3.1/frontend/src/components/TaskWindow.vue +462 -0
- annodesk-0.3.1/frontend/src/components/ThumbImage.vue +26 -0
- annodesk-0.3.1/frontend/src/components/WorkspaceInspector.test.ts +269 -0
- annodesk-0.3.1/frontend/src/components/WorkspaceInspector.vue +519 -0
- annodesk-0.3.1/frontend/src/i18n.test.ts +158 -0
- annodesk-0.3.1/frontend/src/i18n.ts +90 -0
- annodesk-0.3.1/frontend/src/locales/zh-CN.json +558 -0
- annodesk-0.3.1/frontend/src/main.ts +5 -0
- annodesk-0.3.1/frontend/src/maskOutline.test.ts +21 -0
- annodesk-0.3.1/frontend/src/maskOutline.ts +55 -0
- annodesk-0.3.1/frontend/src/preferences.test.ts +115 -0
- annodesk-0.3.1/frontend/src/preferences.ts +15 -0
- annodesk-0.3.1/frontend/src/review.ts +27 -0
- annodesk-0.3.1/frontend/src/stores/project.test.ts +1208 -0
- annodesk-0.3.1/frontend/src/stores/project.ts +1268 -0
- annodesk-0.3.1/frontend/src/style.css +1641 -0
- annodesk-0.3.1/frontend/src/taskFlow.test.ts +278 -0
- annodesk-0.3.1/frontend/src/tasks.ts +64 -0
- annodesk-0.3.1/frontend/src/thumbnails.test.ts +34 -0
- annodesk-0.3.1/frontend/src/thumbnails.ts +79 -0
- annodesk-0.3.1/frontend/src/toolCursors.ts +41 -0
- annodesk-0.3.1/frontend/tsconfig.json +15 -0
- annodesk-0.3.1/frontend/vite.config.ts +12 -0
- annodesk-0.3.1/models.json +54 -0
- annodesk-0.3.1/pyproject.toml +56 -0
- annodesk-0.3.1/src/annodesk/__init__.py +3 -0
- annodesk-0.3.1/src/annodesk/__main__.py +3 -0
- annodesk-0.3.1/src/annodesk/app.py +102 -0
- annodesk-0.3.1/src/annodesk/batch.py +388 -0
- annodesk-0.3.1/src/annodesk/candidates.py +153 -0
- annodesk-0.3.1/src/annodesk/classes.py +76 -0
- annodesk-0.3.1/src/annodesk/cli.py +386 -0
- annodesk-0.3.1/src/annodesk/colors.py +52 -0
- annodesk-0.3.1/src/annodesk/detector.py +130 -0
- annodesk-0.3.1/src/annodesk/devices.py +105 -0
- annodesk-0.3.1/src/annodesk/domain.py +56 -0
- annodesk-0.3.1/src/annodesk/events.py +220 -0
- annodesk-0.3.1/src/annodesk/execution.py +331 -0
- annodesk-0.3.1/src/annodesk/exports.py +224 -0
- annodesk-0.3.1/src/annodesk/images.py +44 -0
- annodesk-0.3.1/src/annodesk/inference.py +425 -0
- annodesk-0.3.1/src/annodesk/jobs.py +194 -0
- annodesk-0.3.1/src/annodesk/lease.py +30 -0
- annodesk-0.3.1/src/annodesk/lifecycle.py +331 -0
- annodesk-0.3.1/src/annodesk/masks.py +69 -0
- annodesk-0.3.1/src/annodesk/models.py +249 -0
- annodesk-0.3.1/src/annodesk/offline.py +46 -0
- annodesk-0.3.1/src/annodesk/operations.py +256 -0
- annodesk-0.3.1/src/annodesk/routes.py +511 -0
- annodesk-0.3.1/src/annodesk/statistics.py +271 -0
- annodesk-0.3.1/src/annodesk/storage.py +405 -0
- annodesk-0.3.1/src/annodesk/web_dist/annodesk.svg +8 -0
- annodesk-0.3.1/src/annodesk/web_dist/assets/BatchSetup-BZxRoLUw.js +1 -0
- annodesk-0.3.1/src/annodesk/web_dist/assets/BatchSetup-DzyKsN-b.css +1 -0
- annodesk-0.3.1/src/annodesk/web_dist/assets/ModelSettings-BTGm-2wz.js +1 -0
- annodesk-0.3.1/src/annodesk/web_dist/assets/ModelSettings-BXpFkB0h.css +1 -0
- annodesk-0.3.1/src/annodesk/web_dist/assets/index-CY6ssN86.js +1200 -0
- annodesk-0.3.1/src/annodesk/web_dist/assets/index-wLDHp-w7.css +1 -0
- annodesk-0.3.1/src/annodesk/web_dist/index.html +14 -0
- annodesk-0.3.1/tests/__init__.py +1 -0
- annodesk-0.3.1/tests/fakes.py +57 -0
- annodesk-0.3.1/tests/test_adapter_contract.py +156 -0
- annodesk-0.3.1/tests/test_api.py +399 -0
- annodesk-0.3.1/tests/test_assistance.py +359 -0
- annodesk-0.3.1/tests/test_batch.py +275 -0
- annodesk-0.3.1/tests/test_candidates.py +262 -0
- annodesk-0.3.1/tests/test_cli.py +300 -0
- annodesk-0.3.1/tests/test_detector.py +50 -0
- annodesk-0.3.1/tests/test_devices.py +36 -0
- annodesk-0.3.1/tests/test_events.py +42 -0
- annodesk-0.3.1/tests/test_exports.py +163 -0
- annodesk-0.3.1/tests/test_images.py +172 -0
- annodesk-0.3.1/tests/test_inference.py +216 -0
- annodesk-0.3.1/tests/test_jobs.py +91 -0
- annodesk-0.3.1/tests/test_lease.py +38 -0
- annodesk-0.3.1/tests/test_lifecycle.py +238 -0
- annodesk-0.3.1/tests/test_models.py +280 -0
- annodesk-0.3.1/tests/test_statistics.py +141 -0
- annodesk-0.3.1/tests/test_storage.py +332 -0
- annodesk-0.3.1/uv.lock +2192 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
.hfms-bridge/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.ruff_cache/
|
|
7
|
+
dist/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
.env
|
|
10
|
+
|
|
11
|
+
# OS
|
|
12
|
+
.DS_Store
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.vscode
|
|
16
|
+
|
|
17
|
+
# Other
|
|
18
|
+
# Design history, disposable prototypes, and local execution plans
|
|
19
|
+
docs/superpowers/
|
|
20
|
+
docs/design-previews/
|
|
21
|
+
docs/plans/
|
|
22
|
+
.superpowers/
|
|
23
|
+
frontend/node_modules/
|
|
24
|
+
frontend/dist/
|
|
25
|
+
*.safetensors
|
|
26
|
+
*.pt
|
|
27
|
+
*.pth
|
|
28
|
+
|
|
29
|
+
# Deliberately bundled default detector; all other model weights stay ignored.
|
|
30
|
+
!assets/models/yolo11n/yolo11n.pt
|
annodesk-0.3.1/AGENTS.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Working on AnnoDesk
|
|
2
|
+
|
|
3
|
+
Read `docs/specs/annodesk.md` and its `assisted-boxes.md` extension before changing behavior. It records the product contract;
|
|
4
|
+
`docs/user-guide.md` is the default English guide; `docs/user-guide-cn.md` is its Simplified Chinese
|
|
5
|
+
translation. Both ship inside the wheel; keep them synchronized. `README.md` describes development.
|
|
6
|
+
Update these documents together when behavior or commands change. Clearly distinguish implemented
|
|
7
|
+
features from future targets and hardware validation that has not been performed.
|
|
8
|
+
|
|
9
|
+
## Project conventions
|
|
10
|
+
|
|
11
|
+
- Use Python 3.11+ with uv; repository development uses Python 3.13. Keep `uv.lock` current.
|
|
12
|
+
- CLI commands use **tyro**, never argparse or Typer. Model imports stay lazy; Ultralytics is a main dependency shared by detection and segmentation.
|
|
13
|
+
- Frontend: Vue 3, TypeScript, Pinia, Naive UI and Konva. English and Simplified Chinese UI, light theme.
|
|
14
|
+
- Keep changes focused. Do not add speculative frameworks, generic plugin systems or unrelated refactors.
|
|
15
|
+
- Never download model weights or install inference dependencies implicitly at runtime. Model IDs resolve through
|
|
16
|
+
`ModelRegistry`; `source` is a directory, resolved relative to its JSON then via `HF_MODELS`.
|
|
17
|
+
- Device numbers are logical indices after `CUDA_VISIBLE_DEVICES`. Never rewrite that environment
|
|
18
|
+
variable or treat logical indices as host GPU numbers.
|
|
19
|
+
- Batch workers use spawn and compute on snapshots. Only the parent coordinator writes annotations.
|
|
20
|
+
Keep dispatch/results bounded, acquire the project write lease at runtime boundaries, and preserve
|
|
21
|
+
revision/fingerprint validation and journaled saves.
|
|
22
|
+
- Internal annotation JSON/RLE is authoritative. `labels` and `labels_seg` are YOLO projections.
|
|
23
|
+
Only create mask-derived boxes through the explicit geometry operation; never invent detection boxes for ordinary mask-only annotations or mark automatic masks human-approved.
|
|
24
|
+
- Statistics SQLite is disposable derived metadata. Log failures must not lose committed annotations.
|
|
25
|
+
- Log important business events explicitly; keep polling, per-box and autosave noise out of UI logs.
|
|
26
|
+
Never log credentials or expanded exception locals.
|
|
27
|
+
- Use temporary datasets for tests/previews. Synthetic masks belong only in tests/disposable demos.
|
|
28
|
+
|
|
29
|
+
## Verification and delivery
|
|
30
|
+
|
|
31
|
+
Before every code commit:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
uv run ruff format src tests
|
|
35
|
+
uv run ruff check src tests
|
|
36
|
+
uv run pytest
|
|
37
|
+
npm test --prefix frontend
|
|
38
|
+
npm run build --prefix frontend
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Run frontend checks/build when frontend behavior or bundled assets change. Commit matching
|
|
42
|
+
`src/annodesk/web_dist` output so wheel users do not need Node. For release changes, run `uv build`
|
|
43
|
+
and smoke-test the wheel outside the checkout, including CLI help, bundled docs, model listing,
|
|
44
|
+
API and static resources. Do not claim CUDA/MPS compatibility based solely on synthetic tests.
|
|
45
|
+
|
|
46
|
+
Keep package versions in `pyproject.toml`, `src/annodesk/__init__.py`, frontend package/lock and
|
|
47
|
+
`uv.lock` aligned. Release versions belong in annotated Git tags and package metadata, not commit messages.
|
|
48
|
+
Publishing requires an explicit user request; committing a version bump does
|
|
49
|
+
not authorize publication. Never amend a published release to add new features.
|
|
50
|
+
|
|
51
|
+
Git tracks source, tests, lockfiles and official docs. Keep plans under ignored `docs/plans/`;
|
|
52
|
+
previews/screenshots under ignored `docs/design-previews/`. The explicitly bundled `assets/models/yolo11n/` checkpoint and its upstream notices are the
|
|
53
|
+
only model exception. Do not commit other models, user datasets,
|
|
54
|
+
caches, local credentials or execution notes. Use `rg` for search and meaningful tests for risky
|
|
55
|
+
state transitions. When reviews are requested, evaluate findings individually, fix reproducible
|
|
56
|
+
issues, and reject unrelated or speculative work with a brief reason.
|
|
57
|
+
|
|
58
|
+
Detector class mappings must match exact (numeric ID, name) subsets. Never silently remap IDs,
|
|
59
|
+
restore deleted classes, or create unused model classes. New classes and successful image labels
|
|
60
|
+
commit in the same journaled transaction. Working IDs may be sparse; exports use a continuous
|
|
61
|
+
copy with `class-id-map.json`. Geometry-only operations must not import Torch or load models.
|
|
62
|
+
Models and Tasks use central windows; project review statistics remain permanently visible.
|
|
63
|
+
Use `frontend/src/i18n.ts` and the locale catalog for UI text, tooltips and accessibility labels.
|
|
64
|
+
Translate at render time so language switching stays reactive; preserve stored enums, project
|
|
65
|
+
class/tag names, model IDs, paths and raw diagnostics. Use whole interpolated messages for counts.
|
|
66
|
+
Keep bilingual wrapping and numeric alignment intact; verify both languages after UI edits.
|
|
67
|
+
|
|
68
|
+
Interactive multimask proposals follow `docs/specs/mask-candidates.md`. Keep previews transient
|
|
69
|
+
and bounded; applying a candidate preserves instance identity/class/box and validates revision,
|
|
70
|
+
image stamp and external label fingerprints. Batch/auto/single-mask inference explicitly passes
|
|
71
|
+
`multimask_output=False`; semantic text results are not alternative candidates. Keep at most one
|
|
72
|
+
in-flight candidate request per client and discard stale results after edits or navigation.
|
annodesk-0.3.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AnnoDesk contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|