Amon Hen
"From the Seat of Seeing, no moment remains hidden."
A fast, lightweight CLI and Python library for natural language video moment retrieval on local CPU. Runs entirely on CPU without discrete GPUs, background daemons, or cloud dependencies.
Key Highlights
- 100% CPU Execution: Powered by Apple's MobileCLIP2 architecture and ONNX Runtime.
- Low Footprint: Hybrid FP32-vision + INT8-quantized text pipeline (approx. 105 MB RAM).
- Zero Infrastructure: Embedded vector database via SQLite and
sqlite-vec(single.dbfile). - High Throughput: 3-gate adaptive motion sampler achieving 4.8x to 18.5x realtime indexing speed.
- Temporal Grouping: Merges consecutive matching frames into start-end timestamp intervals.
Installation
# Recommended via uv
uv tool install amon-hen
# Or via pipx
pipx install amon-hen
# Or standard pip
pip install amon-hen
Quickstart
1. Interactive Terminal UI
Run amon-hen without arguments to launch the interactive prompt:
amon-hen
Supports instant search queries, history navigation (↑/↓), /open <n> to play matches in your default player, and /cut <n> [output] to export clips.
2. Index Videos
# Index a video or entire folder with adaptive motion sampling
amon-hen index /path/to/videos/ --sampler adaptive
3. Search Moments
# Search using natural language
amon-hen search "a person holding an umbrella"
4. Extract Video Clip
# Extract matching segment into a standalone video clip
amon-hen cut video.mp4 --start 00:00:37 --end 00:01:06 -o match.mp4
Python API
from amonhen.store import Store
from amonhen.model_registry import get_model
from amonhen.encode import TextEncoder
from amonhen.pipeline import search
# 1. Connect to index
store = Store("index.db", embed_dim=512)
# 2. Load CPU-optimized text encoder
model = get_model("mobileclip2-s0").download()
text_encoder = TextEncoder(model.text_model_path, model.tokenizer_path)
# 3. Retrieve matching video segments
results = search("red sports car turning", store=store, text_encoder=text_encoder)
for seg in results:
print(
f"{seg.video_path}: {seg.start_ms / 1000.0:.1f}s - {seg.end_ms / 1000.0:.1f}s (score: {seg.score:.3f})"
)
Resources & Links
- GitHub Repository: https://github.com/flxhrdyn/amon-hen
- CLI User Manual: https://github.com/flxhrdyn/amon-hen/blob/main/docs/CLI_GUIDE.md
- Python API Documentation: https://github.com/flxhrdyn/amon-hen/blob/main/docs/PYTHON_API.md
- Project Roadmap: https://github.com/flxhrdyn/amon-hen/blob/main/docs/ROADMAP.md
- Hugging Face Model Hub: https://huggingface.co/felixhrdyn/mobileclip2-s0-onnx
- License: MIT License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amon_hen-0.1.3.tar.gz.
File metadata
- Download URL: amon_hen-0.1.3.tar.gz
- Upload date:
- Size: 6.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0264a325e7a7c33d9944aaea1d63d37cf00275db7f423fca7a1e3605b4fbf143
|
|
| MD5 |
7cd445ef97f8f39d83019d1a429fbd76
|
|
| BLAKE2b-256 |
2ac556c34343dce9e6d6a409aabfba7d469616ff6984b747f102e209392a4dab
|
Provenance
The following attestation bundles were made for amon_hen-0.1.3.tar.gz:
Publisher:
release.yml on flxhrdyn/amon-hen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amon_hen-0.1.3.tar.gz -
Subject digest:
0264a325e7a7c33d9944aaea1d63d37cf00275db7f423fca7a1e3605b4fbf143 - Sigstore transparency entry: 2657551500
- Sigstore integration time:
-
Permalink:
flxhrdyn/amon-hen@9dd690d21eb56abd5d91e95665ef97fc657ab359 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/flxhrdyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9dd690d21eb56abd5d91e95665ef97fc657ab359 -
Trigger Event:
push
-
Statement type:
File details
Details for the file amon_hen-0.1.3-py3-none-any.whl.
File metadata
- Download URL: amon_hen-0.1.3-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09edda50ef878ac0a8b752abd44cec68185790e089e893fb5975c3e0d7ffefa
|
|
| MD5 |
7a9968006d816ffd8ff7d5f58ac40c1d
|
|
| BLAKE2b-256 |
57608a161a6332e22eee7f66bdee4ee9fec417e425ae9f5f9acf0ce2ca24ae1b
|
Provenance
The following attestation bundles were made for amon_hen-0.1.3-py3-none-any.whl:
Publisher:
release.yml on flxhrdyn/amon-hen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amon_hen-0.1.3-py3-none-any.whl -
Subject digest:
e09edda50ef878ac0a8b752abd44cec68185790e089e893fb5975c3e0d7ffefa - Sigstore transparency entry: 2657551573
- Sigstore integration time:
-
Permalink:
flxhrdyn/amon-hen@9dd690d21eb56abd5d91e95665ef97fc657ab359 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/flxhrdyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9dd690d21eb56abd5d91e95665ef97fc657ab359 -
Trigger Event:
push
-
Statement type: