Skip to main content

Termux-Vision

PyPI Python npm npm downloads License

디바이스 리소스를 활용한 안드로이드 Termux 제로 디펜던시 온디바이스 컴퓨터 비전 & VLM 멀티모달 추론 엔진
Zero-Dependency On-Device Computer Vision & Multimodal VLM Inference Engine Utilizing Device Resources for Android Termux


📌 Architecture & Overview

순수 ARM64 NEON 커널과 4단계 화질 프리셋(fast, optimal, high, original), 디바이스 리소스 최적화 연산을 결합하여 메모리 격리 환경에서 엣지 검출과 VLM 멀티모달 시각 추론을 실현합니다.

Eliminates heavy C++ dependencies by integrating SIMD NEON spatial image transforms with on-device VLM (Qwen2-VL, SmolVLM) multi-tier resolution presets (fast, optimal, high, original) utilizing device resources under strict memory isolation.


🚀 Installation & Quickstart

Python (PyPI)

pip install termux-vision
import termux_vision as tv

# 1. Zero-Dependency Spatial Filtering (0.01s ultra-fast)
img = tv.io.load_image("photo.jpg")
edges = tv.cv.canny(tv.transforms.to_grayscale(img), 40, 120)

# 2. On-Device VLM Multimodal Inference with 4-Tier Quality Presets
with tv.vlm.load("qwen2-vl-2b-q4", quality="optimal") as engine:
    res = engine.describe("photo.jpg", prompt="Describe this scene in detail.", quality="optimal")
    print(f"Generated ({res.metrics.tokens_per_second:.1f} t/s): {res.text}")

Node.js / TypeScript (npm)

npm install termux-vision
import tv from 'termux-vision';

// 1. Diagnostics & Hardware Probe
const doc = tv.doctor(true);
console.log(`Vulkan GPU: ${doc.vulkan.status} | RAM: ${doc.hardware.availableRamMb} MB`);

// 2. Multimodal VLM Inference with Quality Preset
const engine = await tv.load({ modelId: 'qwen2-vl-2b-q4', contextLimit: 4096 });
const result = await engine.describe('photo.jpg', { quality: 'optimal', maxTokens: 300 });
console.log(`[${result.metrics.backend.toUpperCase()}] ${result.text}`);
engine.close();

📖 Official Documentation & Benchmarks


📄 License

Licensed under the Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).

Metadata

Release files for termux-vision 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for termux-vision 1.1.4
File Size Uploaded
termux_vision-1.1.4.tar.gz 84.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for termux-vision 1.1.4
File Interpreter ABI Platform
termux_vision-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 172.4 kB

Release files / termux_vision-1.1.4.tar.gz

Download URL termux_vision-1.1.4.tar.gz
Size 84.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e2fd44f7cfc09b9a4033f72d4af8a65fdb4f71f1e950500a56e143441b4804b7
BLAKE2b-256 checksum
How to use checksums
a9abf1166b2d5e6124c02a45bd165ee2061af3f1240416c45824aff9a0604a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / termux_vision-1.1.4-py3-none-any.whl

Download URL termux_vision-1.1.4-py3-none-any.whl
Size 88.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83a1ad7fa0fb4c91d00f0291b58cabf575a56a3fb2efd1d3367ecf2511446929
BLAKE2b-256 checksum
How to use checksums
a073fbf50f33f957a21211f41a2a588e2892b4807a6f32187bb7991e939c40e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release history Release notifications | RSS feed

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

This release

1.1.4 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page