Vision Tagger
macOS-native image analysis using Apple's Vision framework. All processing is local — no cloud APIs, no API keys needed.
Requirements
- macOS 12+ (Monterey or later)
- Xcode Command Line Tools
- Python 3 with Pillow
Setup (one-time)
# Install Xcode CLI tools if needed
xcode-select --install
# Install Pillow
pip3 install Pillow
# Compile the Swift binary
cd scripts/
swiftc -O -o image_tagger image_tagger.swift
Usage
Analyze image → JSON
./scripts/image_tagger /path/to/photo.jpg
Output includes:
faces — bounding boxes, roll/yaw/pitch, landmarks (eyes, nose, mouth)
bodies — 18 skeleton joints with confidence scores
hands — 21 joints per hand (left/right)
text — OCR results with bounding boxes
labels — scene classification (desk, outdoor, clothing, etc.)
barcodes — QR codes, UPC, etc.
saliency — attention and objectness regions
Annotate image with boxes
python3 scripts/annotate_image.py photo.jpg output.jpg
Draws colored boxes:
- 🟢 Green: faces
- 🟠 Orange: body skeleton
- 🟣 Magenta: hands
- 🔵 Cyan: text regions
- 🟡 Yellow: rectangles/objects
- Scene labels at bottom
Python integration
import subprocess, json
def analyze(path):
r = subprocess.run(['./scripts/image_tagger', path], capture_output=True, text=True)
return json.loads(r.stdout[r.stdout.find('{'):])
tags = analyze('photo.jpg')
print(tags['labels']) # [{'label': 'desk', 'confidence': 0.85}, ...]
print(tags['faces']) # [{'bbox': {...}, 'confidence': 0.99, 'yaw': 5.2}]
Example JSON Output
{
"dimensions": {"width": 1920, "height": 1080},
"faces": [{"bbox": {"x": 0.3, "y": 0.4, "width": 0.15, "height": 0.2}, "confidence": 0.99, "roll": -2, "yaw": 5}],
"bodies": [{"joints": {"head_joint": {"x": 0.5, "y": 0.7, "confidence": 0.9}, "left_shoulder": {...}}, "confidence": 1}],
"hands": [{"chirality": "left", "joints": {"VNHLKWRI": {"x": 0.4, "y": 0.3, "confidence": 0.85}}}],
"text": [{"text": "HELLO", "confidence": 0.95, "bbox": {...}}],
"labels": [{"label": "outdoor", "confidence": 0.88}, {"label": "sky", "confidence": 0.75}],
"saliency": {"attentionBased": [{"x": 0.2, "y": 0.1, "width": 0.6, "height": 0.8}]}
}
Detection Capabilities
| Feature |
Details |
| Faces |
Bounding box, confidence, roll/yaw/pitch angles, 76-point landmarks |
| Bodies |
18 joints: head, neck, shoulders, elbows, wrists, hips, knees, ankles |
| Hands |
21 joints per hand, left/right chirality |
| Text (OCR) |
Recognized text with confidence and bounding boxes |
| Labels |
1000+ scene/object categories (clothing, furniture, outdoor, etc.) |
| Barcodes |
QR, UPC, EAN, Code128, PDF417, Aztec, DataMatrix |
| Saliency |
Attention-based and objectness-based regions |
Use Cases
- Photo tagging — Auto-tag photos with detected objects/scenes
- Posture monitoring — Track face/body position for ergonomics
- Document scanning — Extract text from images
- Security — Detect people in camera feeds
- Accessibility — Describe image contents
1---
2name: vision-tagger
3description: Tag and annotate images using Apple Vision framework (macOS only). Detects faces, bodies, hands, text (OCR), barcodes, objects, scene labels, and saliency regions. Use for image analysis, photo tagging, posture monitoring, or any task requiring computer vision on images.
4homepage: https://clawhub.ai/skills/vision-tagger
5metadata:
6 source: https://skillmd.com/skills/modbender/vision-tagger
7 clawdbot:
8 emoji: 👁️
9 requires:
10 os: macos
11 bins:
12 - swiftc
13 - python3
14 install:
15 - id: xcode
16 kind: shell
17 command: xcode-select --install
18 label: Install Xcode CLI tools
19 - id: pillow
20 kind: shell
21 command: pip3 install Pillow
22 label: Install Pillow
23---
24
25# Vision Tagger
26
27macOS-native image analysis using Apple's Vision framework. All processing is local — no cloud APIs, no API keys needed.
28
29## Requirements
30
31- macOS 12+ (Monterey or later)
32- Xcode Command Line Tools
33- Python 3 with Pillow
34
35## Setup (one-time)
36
37```bash
38# Install Xcode CLI tools if needed
39xcode-select --install
40
41# Install Pillow
42pip3 install Pillow
43
44# Compile the Swift binary
45cd scripts/
46swiftc -O -o image_tagger image_tagger.swift
47```
48
49## Usage
50
51### Analyze image → JSON
52
53```bash
54./scripts/image_tagger /path/to/photo.jpg
55```
56
57Output includes:
58- `faces` — bounding boxes, roll/yaw/pitch, landmarks (eyes, nose, mouth)
59- `bodies` — 18 skeleton joints with confidence scores
60- `hands` — 21 joints per hand (left/right)
61- `text` — OCR results with bounding boxes
62- `labels` — scene classification (desk, outdoor, clothing, etc.)
63- `barcodes` — QR codes, UPC, etc.
64- `saliency` — attention and objectness regions
65
66### Annotate image with boxes
67
68```bash
69python3 scripts/annotate_image.py photo.jpg output.jpg
70```
71
72Draws colored boxes:
73- 🟢 Green: faces
74- 🟠 Orange: body skeleton
75- 🟣 Magenta: hands
76- 🔵 Cyan: text regions
77- 🟡 Yellow: rectangles/objects
78- Scene labels at bottom
79
80### Python integration
81
82```python
83import subprocess, json
84
85def analyze(path):
86 r = subprocess.run(['./scripts/image_tagger', path], capture_output=True, text=True)
87 return json.loads(r.stdout[r.stdout.find('{'):])
88
89tags = analyze('photo.jpg')
90print(tags['labels']) # [{'label': 'desk', 'confidence': 0.85}, ...]
91print(tags['faces']) # [{'bbox': {...}, 'confidence': 0.99, 'yaw': 5.2}]
92```
93
94## Example JSON Output
95
96```json
97{
98 "dimensions": {"width": 1920, "height": 1080},
99 "faces": [{"bbox": {"x": 0.3, "y": 0.4, "width": 0.15, "height": 0.2}, "confidence": 0.99, "roll": -2, "yaw": 5}],
100 "bodies": [{"joints": {"head_joint": {"x": 0.5, "y": 0.7, "confidence": 0.9}, "left_shoulder": {...}}, "confidence": 1}],
101 "hands": [{"chirality": "left", "joints": {"VNHLKWRI": {"x": 0.4, "y": 0.3, "confidence": 0.85}}}],
102 "text": [{"text": "HELLO", "confidence": 0.95, "bbox": {...}}],
103 "labels": [{"label": "outdoor", "confidence": 0.88}, {"label": "sky", "confidence": 0.75}],
104 "saliency": {"attentionBased": [{"x": 0.2, "y": 0.1, "width": 0.6, "height": 0.8}]}
105}
106```
107
108## Detection Capabilities
109
110| Feature | Details |
111|---------|---------|
112| Faces | Bounding box, confidence, roll/yaw/pitch angles, 76-point landmarks |
113| Bodies | 18 joints: head, neck, shoulders, elbows, wrists, hips, knees, ankles |
114| Hands | 21 joints per hand, left/right chirality |
115| Text (OCR) | Recognized text with confidence and bounding boxes |
116| Labels | 1000+ scene/object categories (clothing, furniture, outdoor, etc.) |
117| Barcodes | QR, UPC, EAN, Code128, PDF417, Aztec, DataMatrix |
118| Saliency | Attention-based and objectness-based regions |
119
120## Use Cases
121
122- **Photo tagging** — Auto-tag photos with detected objects/scenes
123- **Posture monitoring** — Track face/body position for ergonomics
124- **Document scanning** — Extract text from images
125- **Security** — Detect people in camera feeds
126- **Accessibility** — Describe image contents