termux-vision 1.7.0 → 1.8.0

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.
package/README.md CHANGED
@@ -72,8 +72,8 @@ pkg install -y python nodejs clang make cmake git termux-api wget vulkan-loader
72
72
 
73
73
  * **Option C: Direct GitHub Releases Wheel Asset**:
74
74
  ```bash
75
- # Download and install the prebuilt v1.6.0 release wheel
76
- pip install https://github.com/uno-km/termux-vision/releases/download/v1.6.0/termux_vision-1.6.0-py3-none-any.whl
75
+ # Download and install the prebuilt v1.5.0 release wheel
76
+ pip install https://github.com/uno-km/termux-vision/releases/download/v1.5.0/termux_vision-1.5.0-py3-none-any.whl
77
77
  ```
78
78
 
79
79
  ### 2.3 Node.js / TypeScript CLI Installation
@@ -281,49 +281,6 @@ termux-vision doctor
281
281
 
282
282
  ---
283
283
 
284
- ## Distributed Clustering & Memory Pooling (AMEVA-Cluster)
285
-
286
- Termux-Vision integrates with **AMEVA-Cluster** (`pip install ameva-cluster`) for distributed multimodal VLM inference across interconnected mobile fleets.
287
-
288
- ### 1. Install Cluster Runtime
289
- ```bash
290
- pip install ameva-cluster
291
- # or Node.js:
292
- npm install @ameva/cluster
293
- ```
294
-
295
- ### 2. Launch Worker Node on Remote Phone
296
- ```bash
297
- # On remote worker device (e.g. Galaxy A53):
298
- ameva-cluster worker --port 50052
299
- ```
300
-
301
- ### 3. Distributed VLM Image Analysis
302
- ```bash
303
- # Master node running VLM inference sharded across remote phone RAM:
304
- termux-vision analyze \
305
- --model Qwen2.5-VL-7B-Instruct-Q4_K_M.gguf \
306
- --mmproj mmproj-Qwen2.5-VL-7B.gguf \
307
- --image scene.jpg \
308
- --rpc 192.0.2.10:50052,192.0.2.11:50052 \
309
- -p "Detailed description of all objects in this image."
310
- ```
311
-
312
- ```python
313
- from termux_vision import vlm
314
-
315
- # Python SDK Distributed VLM
316
- engine = vlm.load(
317
- "Qwen2.5-VL-7B-Instruct-Q4_K_M.gguf",
318
- mmproj="mmproj-Qwen2.5-VL-7B.gguf",
319
- cluster_rpc_servers="192.0.2.10:50052,192.0.2.11:50052"
320
- )
321
- res = engine.generate("scene.jpg", prompt="Describe the image.")
322
- print(res.text)
323
- ```
324
-
325
- ---
326
-
327
284
  ## 9. Hardware Requirements & Operational Limits
328
285
 
329
286
  | Requirement | Minimum Specification | Recommended Specification |
package/README.pypi.md CHANGED
@@ -39,7 +39,7 @@ termux-vision install
39
39
 
40
40
  ### 2.3 Direct GitHub Releases Wheel Asset
41
41
  ```bash
42
- pip install https://github.com/uno-km/termux-vision/releases/download/v1.6.0/termux_vision-1.6.0-py3-none-any.whl
42
+ pip install https://github.com/uno-km/termux-vision/releases/download/v1.5.0/termux_vision-1.5.0-py3-none-any.whl
43
43
  ```
44
44
 
45
45
  ### 2.4 One-Line Bootstrap Installer
package/bin/cli.js CHANGED
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
4
+ * SPDX-License-Identifier: Apache-2.0 OR Commercial-License
5
+ */
2
6
  /**
3
7
  * AMEVA Standard Node.js CLI Runner for termux_vision.
4
8
  * Automatically resolves Python 3 environment and dispatches to python -m termux_vision.
package/index.d.ts CHANGED
@@ -1,97 +1,101 @@
1
- /**
2
- * Type declarations for termux-vision Node.js SDK
3
- */
4
-
5
- export interface VLMDescribeOptions {
6
- prompt?: string;
7
- maxTokens?: number;
8
- temperature?: number;
9
- }
10
-
11
- export interface InferenceMetrics {
12
- backend: string;
13
- modelId: string;
14
- decodeMs: number;
15
- tokensPerSecond?: number;
16
- }
17
-
18
- export interface VLMResult {
19
- text: string;
20
- finishReason: string;
21
- wordCount: number;
22
- metrics: InferenceMetrics;
23
- warnings: string[];
24
- }
25
-
26
- export interface VLMContext {
27
- describe(imagePath: string, options?: VLMDescribeOptions): Promise<VLMResult>;
28
- ask(imagePath: string, question: string): Promise<string>;
29
- close(): void;
30
- }
31
-
32
- export interface LoadOptions {
33
- modelId?: string;
34
- device?: 'auto' | 'cpu' | 'vulkan' | 'gpu' | 'vulkan-force';
35
- threads?: number | 'auto';
36
- runtimePath?: string;
37
- mmprojPath?: string;
38
- allowDownload?: boolean;
39
- }
40
-
41
- export interface DiagnosticReport {
42
- schemaVersion: number;
43
- platform: {
44
- system: string;
45
- machine: string;
46
- isAndroid: boolean;
47
- };
48
- hardware: {
49
- cpuCores: number;
50
- totalRamMb: number | null;
51
- availableRamMb: number | null;
52
- };
53
- vulkan: {
54
- loaderDetected: boolean;
55
- driverDetected: boolean;
56
- status: string;
57
- };
58
- modelsCount: number;
59
- }
60
-
61
- export interface ModelInfo {
62
- modelId: string;
63
- tier: string;
64
- state: string;
65
- sizeMb: number;
66
- path: string;
67
- }
68
-
69
- export namespace vlm {
70
- export function load(options?: LoadOptions): Promise<VLMContext>;
71
- }
72
-
73
- export namespace cache {
74
- export function listInstalled(): ModelInfo[];
75
- export function install(modelId: string, onProgress?: (file: string, downloaded: number, total: number) => void): Promise<void>;
76
- export function remove(modelId: string): boolean;
77
- }
78
-
79
- export namespace doctor {
80
- export function run(probeVulkan?: boolean): DiagnosticReport;
81
- }
82
-
83
- export namespace cv {
84
- export function canny(grayPixels: Uint8Array, width: number, height: number, low?: number, high?: number): Uint8Array;
85
- export function sobel(grayPixels: Uint8Array, width: number, height: number): { gradX: Float32Array; gradY: Float32Array; magnitude: Float32Array };
86
- }
87
-
88
- export namespace detect {
89
- export interface BBox {
90
- x: number;
91
- y: number;
92
- width: number;
93
- height: number;
94
- score?: number;
95
- }
96
- export function nms(boxes: BBox[], iouThreshold?: number): BBox[];
97
- }
1
+ /**
2
+ * Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0 OR Commercial-License
4
+ */
5
+ /**
6
+ * Type declarations for termux-vision Node.js SDK
7
+ */
8
+
9
+ export interface VLMDescribeOptions {
10
+ prompt?: string;
11
+ maxTokens?: number;
12
+ temperature?: number;
13
+ }
14
+
15
+ export interface InferenceMetrics {
16
+ backend: string;
17
+ modelId: string;
18
+ decodeMs: number;
19
+ tokensPerSecond?: number;
20
+ }
21
+
22
+ export interface VLMResult {
23
+ text: string;
24
+ finishReason: string;
25
+ wordCount: number;
26
+ metrics: InferenceMetrics;
27
+ warnings: string[];
28
+ }
29
+
30
+ export interface VLMContext {
31
+ describe(imagePath: string, options?: VLMDescribeOptions): Promise<VLMResult>;
32
+ ask(imagePath: string, question: string): Promise<string>;
33
+ close(): void;
34
+ }
35
+
36
+ export interface LoadOptions {
37
+ modelId?: string;
38
+ device?: 'auto' | 'cpu' | 'vulkan' | 'gpu' | 'vulkan-force';
39
+ threads?: number | 'auto';
40
+ runtimePath?: string;
41
+ mmprojPath?: string;
42
+ allowDownload?: boolean;
43
+ }
44
+
45
+ export interface DiagnosticReport {
46
+ schemaVersion: number;
47
+ platform: {
48
+ system: string;
49
+ machine: string;
50
+ isAndroid: boolean;
51
+ };
52
+ hardware: {
53
+ cpuCores: number;
54
+ totalRamMb: number | null;
55
+ availableRamMb: number | null;
56
+ };
57
+ vulkan: {
58
+ loaderDetected: boolean;
59
+ driverDetected: boolean;
60
+ status: string;
61
+ };
62
+ modelsCount: number;
63
+ }
64
+
65
+ export interface ModelInfo {
66
+ modelId: string;
67
+ tier: string;
68
+ state: string;
69
+ sizeMb: number;
70
+ path: string;
71
+ }
72
+
73
+ export namespace vlm {
74
+ export function load(options?: LoadOptions): Promise<VLMContext>;
75
+ }
76
+
77
+ export namespace cache {
78
+ export function listInstalled(): ModelInfo[];
79
+ export function install(modelId: string, onProgress?: (file: string, downloaded: number, total: number) => void): Promise<void>;
80
+ export function remove(modelId: string): boolean;
81
+ }
82
+
83
+ export namespace doctor {
84
+ export function run(probeVulkan?: boolean): DiagnosticReport;
85
+ }
86
+
87
+ export namespace cv {
88
+ export function canny(grayPixels: Uint8Array, width: number, height: number, low?: number, high?: number): Uint8Array;
89
+ export function sobel(grayPixels: Uint8Array, width: number, height: number): { gradX: Float32Array; gradY: Float32Array; magnitude: Float32Array };
90
+ }
91
+
92
+ export namespace detect {
93
+ export interface BBox {
94
+ x: number;
95
+ y: number;
96
+ width: number;
97
+ height: number;
98
+ score?: number;
99
+ }
100
+ export function nms(boxes: BBox[], iouThreshold?: number): BBox[];
101
+ }
package/index.js CHANGED
@@ -1,32 +1,36 @@
1
- /**
2
- * termux-vision: Native On-Device Computer Vision & VLM Multimodal Inference Framework.
3
- * Dual-Engine (Python & Node.js/TypeScript) Native Module for Android Termux & ARM64.
4
- * Open-Source under Apache License 2.0.
5
- */
6
-
7
- 'use strict';
8
-
9
- const errors = require('./lib/errors');
10
- const cache = require('./lib/cache');
11
- const vlm = require('./lib/vlm');
12
- const doctor = require('./lib/doctor');
13
- const cv = require('./lib/cv');
14
- const detect = require('./lib/detect');
15
-
16
- const packageJson = require('./package.json');
17
- const version = packageJson.version;
18
- const cacheManager = new cache.ModelCacheManager();
19
- cacheManager.ModelCacheManager = cache.ModelCacheManager;
20
-
21
- module.exports = {
22
- version,
23
- __version__: version,
24
- errors,
25
- cache: cacheManager,
26
- ModelCacheManager: cache.ModelCacheManager,
27
- vlm,
28
- load: vlm.load,
29
- doctor: doctor.runDoctor,
30
- cv,
31
- detect
32
- };
1
+ /**
2
+ * Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0 OR Commercial-License
4
+ */
5
+ /**
6
+ * termux-vision: Native On-Device Computer Vision & VLM Multimodal Inference Framework.
7
+ * Dual-Engine (Python & Node.js/TypeScript) Native Module for Android Termux & ARM64.
8
+ * Open-Source under Apache License 2.0.
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const errors = require('./lib/errors');
14
+ const cache = require('./lib/cache');
15
+ const vlm = require('./lib/vlm');
16
+ const doctor = require('./lib/doctor');
17
+ const cv = require('./lib/cv');
18
+ const detect = require('./lib/detect');
19
+
20
+ const packageJson = require('./package.json');
21
+ const version = packageJson.version;
22
+ const cacheManager = new cache.ModelCacheManager();
23
+ cacheManager.ModelCacheManager = cache.ModelCacheManager;
24
+
25
+ module.exports = {
26
+ version,
27
+ __version__: version,
28
+ errors,
29
+ cache: cacheManager,
30
+ ModelCacheManager: cache.ModelCacheManager,
31
+ vlm,
32
+ load: vlm.load,
33
+ doctor: doctor.runDoctor,
34
+ cv,
35
+ detect
36
+ };