Termux-Vision Logo

Termux-Vision

v1.0.0
Foundation
pip / npm
Sponsor GitHub Founder CV

API Reference

Complete technical specification of classes, modules, and functions

1. Module: termux_vision.vlm

load(model_id, device='auto', threads='auto', ...) -> VLMContext

Loads a VLM inference engine context manager.

VLMContext.describe(image, prompt=None, max_tokens=150, temperature=0.2, ...) -> VLMResult

Performs visual image description with strict parameter validation.

2. Module: termux_vision.cv

canny(image, low_threshold=40.0, high_threshold=120.0) -> np.ndarray

Executes pure NumPy 5-stage Canny Edge Detection with double-threshold hysteresis.

sobel(image) -> Tuple[np.ndarray, np.ndarray, np.ndarray]

Computes Sobel 3x3 horizontal, vertical gradients, and magnitude map.

3. Module: termux_vision.detect

detect_faces(image) -> List[Detection]

Scans candidate face regions using an integral-image Haar Cascade classifier with Non-Maximum Suppression (NMS).

4. Module: termux_vision.cli.doctor

run_doctor(probe_vulkan=False) -> dict

Inspects platform architecture, RAM availability, CPU core count, and Vulkan GPU driver presence.