vi3ion 0.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 (106) hide show
  1. vi3ion-0.1.0/LICENSE +201 -0
  2. vi3ion-0.1.0/LOCAL_MODELS.md +106 -0
  3. vi3ion-0.1.0/MANIFEST.in +32 -0
  4. vi3ion-0.1.0/NOTICE +21 -0
  5. vi3ion-0.1.0/PERFORMANCE.md +65 -0
  6. vi3ion-0.1.0/PKG-INFO +369 -0
  7. vi3ion-0.1.0/README.md +321 -0
  8. vi3ion-0.1.0/adapters/README.md +35 -0
  9. vi3ion-0.1.0/adapters/claude-code.md +42 -0
  10. vi3ion-0.1.0/adapters/editors.md +62 -0
  11. vi3ion-0.1.0/adapters/generic-mcp.md +75 -0
  12. vi3ion-0.1.0/adapters/opencode/README.md +135 -0
  13. vi3ion-0.1.0/agent_interface/__init__.py +2 -0
  14. vi3ion-0.1.0/agent_interface/mcp_server.py +12 -0
  15. vi3ion-0.1.0/pyproject.toml +85 -0
  16. vi3ion-0.1.0/setup.cfg +4 -0
  17. vi3ion-0.1.0/vi3ion/__init__.py +3 -0
  18. vi3ion-0.1.0/vi3ion/analyzer.py +353 -0
  19. vi3ion-0.1.0/vi3ion/attention.py +96 -0
  20. vi3ion-0.1.0/vi3ion/brief.py +266 -0
  21. vi3ion-0.1.0/vi3ion/caption.py +145 -0
  22. vi3ion-0.1.0/vi3ion/cjk_glyphs.py +326 -0
  23. vi3ion-0.1.0/vi3ion/cli.py +1064 -0
  24. vi3ion-0.1.0/vi3ion/code_verify.py +173 -0
  25. vi3ion-0.1.0/vi3ion/colors.py +56 -0
  26. vi3ion-0.1.0/vi3ion/composition.py +371 -0
  27. vi3ion-0.1.0/vi3ion/config.py +229 -0
  28. vi3ion-0.1.0/vi3ion/core/__init__.py +1 -0
  29. vi3ion-0.1.0/vi3ion/core/context/__init__.py +3 -0
  30. vi3ion-0.1.0/vi3ion/core/context/session.py +25 -0
  31. vi3ion-0.1.0/vi3ion/core/coordinates.py +113 -0
  32. vi3ion-0.1.0/vi3ion/core/engine.py +1275 -0
  33. vi3ion-0.1.0/vi3ion/core/geometry/__init__.py +4 -0
  34. vi3ion-0.1.0/vi3ion/core/geometry/contours.py +23 -0
  35. vi3ion-0.1.0/vi3ion/core/geometry/edges.py +45 -0
  36. vi3ion-0.1.0/vi3ion/core/geometry/measurements.py +100 -0
  37. vi3ion-0.1.0/vi3ion/core/geometry/pipeline.py +83 -0
  38. vi3ion-0.1.0/vi3ion/core/geometry/shapes.py +215 -0
  39. vi3ion-0.1.0/vi3ion/core/ingestion/__init__.py +3 -0
  40. vi3ion-0.1.0/vi3ion/core/ingestion/loader.py +202 -0
  41. vi3ion-0.1.0/vi3ion/core/ocr/__init__.py +5 -0
  42. vi3ion-0.1.0/vi3ion/core/ocr/japan.py +105 -0
  43. vi3ion-0.1.0/vi3ion/core/ocr/models/japan_rec_crnn.onnx +0 -0
  44. vi3ion-0.1.0/vi3ion/core/ocr/pipeline.py +153 -0
  45. vi3ion-0.1.0/vi3ion/core/ocr/providers.py +152 -0
  46. vi3ion-0.1.0/vi3ion/core/ocr/reading_order.py +38 -0
  47. vi3ion-0.1.0/vi3ion/core/pixels/__init__.py +14 -0
  48. vi3ion-0.1.0/vi3ion/core/pixels/colors.py +128 -0
  49. vi3ion-0.1.0/vi3ion/core/pixels/element_color.py +209 -0
  50. vi3ion-0.1.0/vi3ion/core/pixels/pipeline.py +113 -0
  51. vi3ion-0.1.0/vi3ion/core/pixels/segmentation.py +71 -0
  52. vi3ion-0.1.0/vi3ion/core/pixels/statistics.py +66 -0
  53. vi3ion-0.1.0/vi3ion/core/semantics/__init__.py +67 -0
  54. vi3ion-0.1.0/vi3ion/core/semantics/clip_tags.py +108 -0
  55. vi3ion-0.1.0/vi3ion/core/semantics/florence.py +223 -0
  56. vi3ion-0.1.0/vi3ion/core/semantics/interface.py +68 -0
  57. vi3ion-0.1.0/vi3ion/core/semantics/merge.py +189 -0
  58. vi3ion-0.1.0/vi3ion/core/semantics/mock.py +83 -0
  59. vi3ion-0.1.0/vi3ion/core/semantics/owlvit.py +132 -0
  60. vi3ion-0.1.0/vi3ion/core/semantics/pipeline.py +178 -0
  61. vi3ion-0.1.0/vi3ion/core/semantics/remote.py +169 -0
  62. vi3ion-0.1.0/vi3ion/core/spatial/__init__.py +4 -0
  63. vi3ion-0.1.0/vi3ion/core/spatial/pipeline.py +125 -0
  64. vi3ion-0.1.0/vi3ion/core/spatial/relationships.py +201 -0
  65. vi3ion-0.1.0/vi3ion/core/spatial/scene_graph.py +66 -0
  66. vi3ion-0.1.0/vi3ion/core/summary.py +414 -0
  67. vi3ion-0.1.0/vi3ion/core/verification/__init__.py +4 -0
  68. vi3ion-0.1.0/vi3ion/core/verification/claims.py +278 -0
  69. vi3ion-0.1.0/vi3ion/core/verification/verifier.py +963 -0
  70. vi3ion-0.1.0/vi3ion/describe_shapes.py +300 -0
  71. vi3ion-0.1.0/vi3ion/errors.py +27 -0
  72. vi3ion-0.1.0/vi3ion/evaluate.py +311 -0
  73. vi3ion-0.1.0/vi3ion/evidence.py +187 -0
  74. vi3ion-0.1.0/vi3ion/footer_fix.py +137 -0
  75. vi3ion-0.1.0/vi3ion/fused_words.py +107 -0
  76. vi3ion-0.1.0/vi3ion/image_memory.py +444 -0
  77. vi3ion-0.1.0/vi3ion/index_sequence.py +201 -0
  78. vi3ion-0.1.0/vi3ion/local_stack.py +494 -0
  79. vi3ion-0.1.0/vi3ion/mcp_server.py +413 -0
  80. vi3ion-0.1.0/vi3ion/path_hints.py +88 -0
  81. vi3ion-0.1.0/vi3ion/relook.py +244 -0
  82. vi3ion-0.1.0/vi3ion/relook_rows.py +225 -0
  83. vi3ion-0.1.0/vi3ion/schemas/__init__.py +43 -0
  84. vi3ion-0.1.0/vi3ion/schemas/common.py +275 -0
  85. vi3ion-0.1.0/vi3ion/schemas/requests.py +94 -0
  86. vi3ion-0.1.0/vi3ion/schemas/responses.py +65 -0
  87. vi3ion-0.1.0/vi3ion/server/__init__.py +1 -0
  88. vi3ion-0.1.0/vi3ion/server/app.py +88 -0
  89. vi3ion-0.1.0/vi3ion/server/deps.py +9 -0
  90. vi3ion-0.1.0/vi3ion/server/routes/__init__.py +5 -0
  91. vi3ion-0.1.0/vi3ion/server/routes/images.py +251 -0
  92. vi3ion-0.1.0/vi3ion/server/routes/system.py +47 -0
  93. vi3ion-0.1.0/vi3ion/server/routes/tools.py +152 -0
  94. vi3ion-0.1.0/vi3ion/skill/SKILL.md +126 -0
  95. vi3ion-0.1.0/vi3ion/storage/__init__.py +4 -0
  96. vi3ion-0.1.0/vi3ion/storage/database.py +521 -0
  97. vi3ion-0.1.0/vi3ion/storage/image_store.py +45 -0
  98. vi3ion-0.1.0/vi3ion/text_merge.py +289 -0
  99. vi3ion-0.1.0/vi3ion/visual_diff.py +130 -0
  100. vi3ion-0.1.0/vi3ion/word_split.py +197 -0
  101. vi3ion-0.1.0/vi3ion.egg-info/PKG-INFO +369 -0
  102. vi3ion-0.1.0/vi3ion.egg-info/SOURCES.txt +104 -0
  103. vi3ion-0.1.0/vi3ion.egg-info/dependency_links.txt +1 -0
  104. vi3ion-0.1.0/vi3ion.egg-info/entry_points.txt +3 -0
  105. vi3ion-0.1.0/vi3ion.egg-info/requires.txt +23 -0
  106. vi3ion-0.1.0/vi3ion.egg-info/top_level.txt +2 -0
vi3ion-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Subadeepan-Y
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,106 @@
1
+ # Running Vi3ion with local models
2
+
3
+ Vi3ion is the perception layer for agents. When the agent's model is local
4
+ (Ollama, llama.cpp, LM Studio, vLLM, Unsloth, SGLang, LocalAI, jan,
5
+ koboldcpp, text-generation-webui), Vi3ion has three jobs:
6
+
7
+ 1. Be the **eyes** for models that cannot read pixels.
8
+ 2. Stay **out of the way** for local vision models that can.
9
+ 3. Stay **cheap**: low RAM, low CPU, small token footprint.
10
+
11
+ ## 1. See what is running
12
+
13
+ ```powershell
14
+ vi3ion local # runtimes + models + which ones accept images
15
+ vi3ion local --json # same, machine readable
16
+ ```
17
+
18
+ Output looks like:
19
+
20
+ ```
21
+ llama.cpp 127.0.0.1:8080 reachable
22
+ openai-compatible: http://127.0.0.1:8080/v1
23
+ - qwen3-8b (text)
24
+ - qwen2.5vl-7b (vision)
25
+
26
+ No local vision model detected: Vi3ion is the eyes for local models.
27
+ ```
28
+
29
+ In OpenCode, `/vi3ionlocal` prints the same in the chat and `/vi3ionstatus`
30
+ adds it to the status line.
31
+
32
+ The MCP tool `local_stack` exposes the same data to the agent itself.
33
+
34
+ ## 2. Point OpenCode at the local model
35
+
36
+ ```jsonc
37
+ {
38
+ "provider": {
39
+ "llamacpp": {
40
+ "npm": "@ai-sdk/openai-compatible",
41
+ "name": "llama.cpp",
42
+ "options": {
43
+ "baseURL": "http://127.0.0.1:8080/v1",
44
+ "apiKey": "dummy"
45
+ },
46
+ "models": {
47
+ "qwen2.5vl-7b": { "name": "Qwen2.5-VL 7B", "limit": { "context": 32768, "output": 4096 } }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ Ollama uses `http://127.0.0.1:11434/v1` with the same openai-compatible npm
55
+ package.
56
+
57
+ ## 3. What Vi3ion does automatically for local models
58
+
59
+ | Behaviour | Local model | Cloud model |
60
+ |---|---|---|
61
+ | Vision detection | `capabilities.input`, then name heuristics (`llava`, `qwen2.5-vl`, `minicpm-v`, `gemma3`, `llama3.2-vision`, `internvl`, `pixtral`, `smolvlm`, …) | declared modalities + known names |
62
+ | Evidence tier | `compact` | `compact` below 32K, else `full` |
63
+ | Token budget | ~8% of the context window (min 200, max 900) | unlimited in `full` tier |
64
+ | Second analysis pass | skipped (code cross-check only when `codeCheck: true`) | on |
65
+ | Role for a text-only model | Vi3ion is the eyes | Vi3ion is the eyes |
66
+ | Role for a vision model | model's own vision leads; Vi3ion assists | same |
67
+
68
+ A local model that cannot see images gets the same treatment as any
69
+ vision-less model: the intro states it must use Vi3ion evidence and must never
70
+ describe an image from its filename.
71
+
72
+ ## 4. Keep the evidence small
73
+
74
+ The token budget is derived from the model's context window. Override it when
75
+ needed:
76
+
77
+ - In OpenCode: `/vi3ionbudget 400` (0 = auto).
78
+ - In the CLI: `vi3ion brief screenshot.png --budget 400`.
79
+
80
+ With a budget, sections are kept in priority order — OCR text first, then
81
+ omission notes, composition, colour, scene prose, and the honesty note last.
82
+
83
+ ## 5. Model switching
84
+
85
+ A user can switch models mid-conversation. Vi3ion re-binds automatically:
86
+
87
+ - the intro block is re-injected with the new model and its role,
88
+ - the next request carries a role-change notice,
89
+ - the evidence tier and budget are recomputed for the new model.
90
+
91
+ No manual step is needed, and switching models never drops the evidence that
92
+ was already collected.
93
+
94
+ ## 6. If the local model is not detected as vision capable but it is
95
+
96
+ Name heuristics are conservative on purpose. Override per session with
97
+ `/vi3ionon` and `mode: "always"` in the plugin options, or rename the model
98
+ so the hint is visible (`qwen2.5vl-7b` is recognised; `my-model` is not).
99
+
100
+ ## 7. Checks
101
+
102
+ ```powershell
103
+ node .\.opencode\plugins\vi3ion-attach\smoke.mjs # hook behaviour
104
+ node .\.opencode\plugins\vi3ion-attach\e2e_local.mjs # local-model path, real screenshot
105
+ node .\.opencode\plugins\vi3ion-attach\e2e_visionless.mjs
106
+ ```
@@ -0,0 +1,32 @@
1
+ # Only the package, the docs and the license ship in the sdist.
2
+ include LICENSE
3
+ include README.md
4
+ include LOCAL_MODELS.md
5
+ include PERFORMANCE.md
6
+ include pyproject.toml
7
+
8
+ recursive-include vi3ion *.py
9
+ recursive-include vi3ion/core/ocr/models *.onnx
10
+ recursive-include vi3ion/skill *.md
11
+ recursive-include adapters *.md
12
+
13
+ # Everything below is local development material.
14
+ prune dashboard
15
+ prune .opencode
16
+ prune data
17
+ prune scripts
18
+ prune testing screenshots
19
+ prune tools
20
+ prune tests
21
+ prune .github
22
+ exclude *.png
23
+ exclude *.jpg
24
+ exclude *.jpeg
25
+ exclude .env
26
+ exclude .env.example
27
+ exclude CONTINUATION.md
28
+ exclude IMAGE_ANALYSIS.md
29
+ exclude IMAGE_ANALYSIS - new.md
30
+ exclude VI3ION_OUTPUT.md
31
+ global-exclude *.py[cod]
32
+ global-exclude __pycache__
vi3ion-0.1.0/NOTICE ADDED
@@ -0,0 +1,21 @@
1
+ VI3ION
2
+ Copyright 2026 Subadeepan-Y
3
+
4
+ This product includes software developed as an independent perception engine
5
+ for AI agents.
6
+
7
+ Portions of this software include ONNX OCR models distributed with the
8
+ `rapidocr-onnxruntime` package (Apache-2.0) and a bundled Japanese text
9
+ recognizer (`vi3ion/core/ocr/models/japan_rec_crnn.onnx`).
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.
@@ -0,0 +1,65 @@
1
+ # Vi3ion performance profile
2
+
3
+ Measured 2026-11-02 on this machine, running a full brief generation for the
4
+ new page screenshot **while OpenCode was open and idle** in the same session
5
+ (the exact IDE-plugin usage pattern).
6
+
7
+ ## Test machine
8
+
9
+ | | |
10
+ |---|---|
11
+ | OS | Windows 11 Pro 10.0.26200 |
12
+ | CPU | AMD Ryzen 5 5500GT (6 cores / 12 logical processors) |
13
+ | RAM | 15.3 GB |
14
+ | OCR | RapidOCR (ONNX Runtime, CPU) — bundled Chinese rec model |
15
+
16
+ ## Results (peak values during a run)
17
+
18
+ | Process | Peak working set | Peak CPU | Avg CPU |
19
+ |---|---|---|---|
20
+ | Vi3ion brief (venv python) | **584 MB** | **63.9%** (of total CPU) | 50.7% |
21
+ | OpenCode (opencode.exe ×2) | ~340 MB each | ~3% | ~0.7% |
22
+ | Other python (system) | ~32 MB | ~1% | ~0.5% |
23
+
24
+ Timing: one brief run = **56.6 s cold** (model load + OCR + recovery passes),
25
+ single-threaded startup and multi-threaded inference burst.
26
+
27
+ ## What this means for IDE integration
28
+
29
+ - **Memory floor:** Vi3ion itself needs roughly **0.6 GB** at peak while
30
+ processing (the OCR model + frame buffers). OpenCode stays at its normal
31
+ footprint (~0.7 GB total). A machine with ≥4 GB free RAM handles this
32
+ comfortably.
33
+ - **CPU burst:** inference is multi-threaded and briefly uses most cores;
34
+ the burst lasts seconds, then the process idles. Avoid running many Vi3ion
35
+ calls in parallel on small machines.
36
+ - **Latency:** expect **~1 minute cold** per image. Once the MCP server is
37
+ long-lived, the model stays loaded and subsequent images are faster
38
+ (warm) — this is the recommended deployment mode for IDE plugins.
39
+ - **Disk:** model files ~13 MB; no network use during processing.
40
+
41
+ ## Low-resource mode (for local models / low-end machines)
42
+
43
+ Auto-enabled when the machine has < 8 GB RAM (override with
44
+ `VI3ION_LOW_RESOURCE=0|1`). It:
45
+
46
+ - lowers the analysis cap 2048 → 1280 px (downscales images before OCR),
47
+ - skips the CJK margin-recovery pass (the most expensive extra pass),
48
+ - skips the context-driven attention relook.
49
+
50
+ Measured on this machine (1294×852 screenshot, warm runs):
51
+ - peak working set **453.9 MB** vs 562.6 MB normal (~19% less)
52
+ - run time ≈ unchanged (~4s warm)
53
+ - accuracy cost: CJK subtitles only (typical UI text unaffected)
54
+
55
+ The visual add-on also selects a **compact evidence tier** automatically for
56
+ models with < 32K context (`/vi3ioncompact`, `/vi3ionfull` to force).
57
+
58
+ ## Measuring yourself
59
+
60
+ `data/debug/profile_vi3ion.ps1` samples opencode + python processes every
61
+ 250 ms while running one brief and prints peaks. Run with:
62
+
63
+ ```powershell
64
+ powershell -ExecutionPolicy Bypass -File data/debug/profile_vi3ion.ps1
65
+ ```