Instructions to use garagehq/Minus-v0.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use garagehq/Minus-v0.3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="garagehq/Minus-v0.3", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("garagehq/Minus-v0.3", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Minus-v0.3: the ad detector on the box's own NPU
Minus-v0.3 is the vision model in Minus, an HDMI box that blocks TV ads by looking at the picture. It is Liquid's d1-omni-600M decision model, fine-tuned to answer two questions about a TV frame in one forward pass, with no generated tokens:
- "Is this TV frame an advertisement?" (yes / no; blocks ads)
- "What state is this TV screen in?" (PLAYING / PAUSED / DIALOG / MENU / SCREENSAVER; lets autonomous mode drive the TV)
It replaces Minus-v0.2. The big change is where it runs: v0.2 needed an add-on Axera AX650 NPU card; v0.3 runs on the Rock 5B+'s own RK3588 NPU (core 2, next to OCR on core 0 and speech recognition on core 1). The box no longer needs the card.
| Minus-v0.2 | Minus-v0.3 | |
|---|---|---|
| model | LFM2.5-VL-450M (generates "Yes"/"No") | d1-omni-600M (reads the answer from the head) |
| hardware | Axera AX650 add-on card | RK3588 NPU core 2, built in |
| input | 512Γ512 | 320Γ320 |
| 800-image test: accuracy | 99.1% | 98.6% |
| ad recall / non-ad recall | 99.8% / 98.5% | 99.5% / 97.75% |
| screen-state check (193 frames) | 95.9% | 93.8% |
| Nov 2026 box frames (3,185, labels where box and v0.2 agree) | (reference) | 99.65% |
| time per decision on the box | ~0.37 s | ~0.8 s (vision 320 ms + decision 448 ms) |
| box RAM for the model | β | 2.8 GB |
Accuracy numbers are from the PyTorch weights. The RKNN fp16 graphs make the same yes/no call as PyTorch on 40 of 40 check frames (largest probability difference 0.04). On the box, in a live run with OCR and ASR busy on the other cores, v0.3 ran 0.8 s per decision with no timeouts or crashes.
Files
| Path | What it is |
|---|---|
model.safetensors, config.json, *.py, tokenizer* |
Full fine-tuned d1-omni-600M (transformers, trust_remote_code=True) |
rknn/vision_fp16.rknn |
Vision encoder: patches (1, 400, 768) β prefix (1, 100, 1024) |
rknn/decide_ad_fp16.rknn |
Trunk + head for the ad question: prefix β logits (no, yes) |
rknn/decide_screen_fp16.rknn |
Trunk + head for the screen question: prefix β 5 logits |
conversion/d1_decider.py |
The box's runtime (rknnlite), as shipped in Minus |
conversion/ |
Training, ONNX export, RKNN conversion and scoring scripts |
The RKNN graphs were built with rknn-toolkit2 for rk3588, fp16 (int8 collapses the decision graph). The question
text, mask and positions are baked into each decide_* graph, so it takes only the vision prefix.
Using it
On the box (RK3588, rknn-toolkit-lite2):
from d1_decider import D1Manager
d1 = D1Manager(model_dir="rknn", size=320) # conversion/d1_decider.py; it imports Minus's config.py
d1.load_model()
is_ad, text, seconds, confidence = d1.detect_ad("frame.png")
state, seconds = d1.query_image("frame.png", "screen state") # PLAYING / PAUSED / DIALOG / MENU / SCREENSAVER
Preprocessing: squash the whole frame to 320Γ320 (bilinear, no letterbox; that is what the box does and what it was trained on), scale to [-1, 1], cut into 16Γ16 patches in (row, column, channel) order.
With transformers:
import torch
from PIL import Image
from transformers import AutoModel
m = AutoModel.from_pretrained("garagehq/Minus-v0.3", trust_remote_code=True, dtype=torch.float16).to("cuda").eval()
img = Image.open("frame.png").convert("RGB").resize((320, 320), Image.BILINEAR)
q = {"ad": {"type": "noul", "instructions": "Is this TV frame an advertisement?"}}
p_ad = m.system_one(None, q, images=[img])["answers"]["ad"]["noul"]
The screen question must be asked exactly as it was trained (see SCREEN_Q in conversion/train_d1_ads.py).
How it was trained
- Base: LiquidAI/d1-omni-600M. Vision encoder frozen; trunk and decision head trained (lr 2e-5, head 1e-4), cross-entropy over each question's options.
- Data: the same 101,080 rows as v0.2 (box captures through 2026-10-26, incl. 5,670 screen-state examples), plus the box's November 2026 frames where the box and v0.2 agree, repeated twice. 1.5 epochs; best checkpoint at step 5,500 by the 800-image test.
- Frames squashed to 320Γ320, as on the box. 320 was picked over 384 (98.75%, 1.5 s) and 256 (98.4%, 0.55 s) because it keeps 384's accuracy at about half its latency.
Known limits
- Screen state is the weakest number (93.8% vs v0.2's 95.9%); PAUSED / DIALOG / SCREENSAVER frames are rare in the data.
- Small "Advertisement" badges are hard to read at 320Β². Minus runs OCR next to the model, which catches them.
- A few music-video frames (bright title cards) get called ads; Minus's audio and static-screen checks usually stop these from blocking.
License
The weights are a fine-tune of LiquidAI/d1-omni-600M and are released under Liquid's LFM Open License v1.0 (see
LICENSE).
- Downloads last month
- -
Model tree for garagehq/Minus-v0.3
Base model
LiquidAI/LFM2.5-350M-Base