moonlabel 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {moonlabel-0.2.0 → moonlabel-0.2.2}/PKG-INFO +19 -46
- {moonlabel-0.2.0 → moonlabel-0.2.2}/README.md +18 -45
- {moonlabel-0.2.0 → moonlabel-0.2.2}/pyproject.toml +1 -1
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/__init__.py +1 -1
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/backends.py +1 -1
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/dataset.py +1 -2
- moonlabel-0.2.0/src/moonlabel/server/static/assets/index-D4LTFS3p.js → moonlabel-0.2.2/src/moonlabel/server/static/assets/index-BheP1q3E.js +11 -11
- moonlabel-0.2.0/src/moonlabel/server/static/assets/index-4CKnE5iE.css → moonlabel-0.2.2/src/moonlabel/server/static/assets/index-fYMKpCJA.css +1 -1
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/server/static/index.html +2 -2
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel.egg-info/PKG-INFO +19 -46
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel.egg-info/SOURCES.txt +2 -2
- {moonlabel-0.2.0 → moonlabel-0.2.2}/LICENSE +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/setup.cfg +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/coco.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/infer.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/server/__init__.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/server/api.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/server/cli.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/server/static/assets/moonlabellogo-BPx9MdO3.svg +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/types.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/utils.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/voc.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel/yolo.py +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel.egg-info/dependency_links.txt +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel.egg-info/entry_points.txt +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel.egg-info/requires.txt +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/src/moonlabel.egg-info/top_level.txt +0 -0
- {moonlabel-0.2.0 → moonlabel-0.2.2}/tests/test_multimodal.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moonlabel
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Create object-detection (YOLO, COCO, VOC) and image-caption datasets using Multimodal LLMs and Moondream
|
|
5
5
|
Author: Muratcan Laloğlu
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -29,7 +29,7 @@ Dynamic: license-file
|
|
|
29
29
|
<p>An object-detection and image-caption dataset tool.</p>
|
|
30
30
|
<p><em>Powered by Multimodal LLMs (OpenAI, Gemini, Claude, Ollama, OpenRouter, vLLM) & <a href="https://moondream.ai/">Moondream VLM</a></em></p>
|
|
31
31
|
<p>
|
|
32
|
-
<a href="https://pypi.org/project/moonlabel/"><img src="https://img.shields.io/pypi/v/moonlabel
|
|
32
|
+
<a href="https://pypi.org/project/moonlabel/"><img src="https://img.shields.io/pypi/v/moonlabel?logo=pypi&label=pypi" alt="PyPI version"></a>
|
|
33
33
|
<a href="https://pepy.tech/projects/moonlabel"><img src="https://static.pepy.tech/personalized-badge/moonlabel?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="PyPI Downloads"></a>
|
|
34
34
|
</p>
|
|
35
35
|
</div>
|
|
@@ -44,7 +44,7 @@ MoonLabel is both a Python library and a lightweight web UI to generate object-d
|
|
|
44
44
|
2. Or launch the UI, switch between Detection/Caption, and export with one click.
|
|
45
45
|
|
|
46
46
|
Supported backends:
|
|
47
|
-
- **Multimodal LLMs** (zero extra dependencies): **OpenAI
|
|
47
|
+
- **Multimodal LLMs** (zero extra dependencies): the **OpenAI**, **Google Gemini**, and **Anthropic** APIs, plus **Ollama**, **OpenRouter**, and any **OpenAI-compatible** endpoint (vLLM, LM Studio, Groq, Together, and similar). You pass the model id that API serves; MoonLabel does not pin a model.
|
|
48
48
|
- **Moondream VLM**: Moondream Cloud, Moondream Station, or fully local (Hugging Face).
|
|
49
49
|
- **Custom backends**: Implement `VisionBackend` to plug in any custom vision model.
|
|
50
50
|
|
|
@@ -58,7 +58,7 @@ https://github.com/user-attachments/assets/a2dfc6b6-c83d-4296-986b-ac221e10fc3b
|
|
|
58
58
|
|
|
59
59
|
## Features
|
|
60
60
|
|
|
61
|
-
* 🤖 **Multimodal LLM support** — OpenAI, Google Gemini, Anthropic
|
|
61
|
+
* 🤖 **Multimodal LLM support** — OpenAI, Google Gemini, and Anthropic APIs, plus Ollama, OpenRouter, and any OpenAI-compatible vision API.
|
|
62
62
|
* 📦 **Library + UI** — `moonlabel` package with an optional web UI.
|
|
63
63
|
* 🌐 **FastAPI server** — Served by a single `moonlabel-ui` command.
|
|
64
64
|
* ⚛️ **Modern frontend** — React, TypeScript, TailwindCSS, Vite.
|
|
@@ -105,45 +105,18 @@ In the Home page:
|
|
|
105
105
|
|
|
106
106
|
### Using Multimodal LLMs
|
|
107
107
|
|
|
108
|
-
API keys can be passed via `api_key=...` or read
|
|
108
|
+
Pass `provider` for the API you are calling and `model` as the id that API serves. MoonLabel does not bundle or recommend a model. API keys can be passed via `api_key=...` or read from `OPENAI_API_KEY`, `GEMINI_API_KEY` / `GOOGLE_API_KEY`, `ANTHROPIC_API_KEY`, or `OPENROUTER_API_KEY`.
|
|
109
109
|
|
|
110
110
|
```python
|
|
111
111
|
from moonlabel import create_dataset
|
|
112
112
|
|
|
113
|
-
#
|
|
113
|
+
# OpenAI, Gemini, or Anthropic API
|
|
114
114
|
create_dataset(
|
|
115
115
|
"/path/to/images",
|
|
116
116
|
objects=["person", "car"],
|
|
117
|
-
provider="gemini"
|
|
118
|
-
model="
|
|
119
|
-
api_key="
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
# OpenAI (GPT-4o / GPT-4o-mini / GPT-4.1)
|
|
123
|
-
create_dataset(
|
|
124
|
-
"/path/to/images",
|
|
125
|
-
objects=["person", "dog"],
|
|
126
|
-
provider="openai",
|
|
127
|
-
model="gpt-4o-mini",
|
|
128
|
-
api_key="YOUR_OPENAI_API_KEY", # or OPENAI_API_KEY env var
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
# Anthropic Claude
|
|
132
|
-
create_dataset(
|
|
133
|
-
"/path/to/images",
|
|
134
|
-
objects=["bicycle", "helmet"],
|
|
135
|
-
provider="anthropic",
|
|
136
|
-
model="claude-sonnet-4-20250514",
|
|
137
|
-
api_key="YOUR_ANTHROPIC_API_KEY", # or ANTHROPIC_API_KEY env var
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
# Ollama (local multimodal LLMs: qwen2.5vl, llama3.2-vision, gemma3, llava, ...)
|
|
141
|
-
create_dataset(
|
|
142
|
-
"/path/to/images",
|
|
143
|
-
objects=["laptop", "cup"],
|
|
144
|
-
provider="ollama",
|
|
145
|
-
model="qwen2.5vl",
|
|
146
|
-
base_url="http://localhost:11434/v1", # default
|
|
117
|
+
provider="openai", # "gemini" or "anthropic"
|
|
118
|
+
model="MODEL_ID",
|
|
119
|
+
api_key="YOUR_API_KEY",
|
|
147
120
|
)
|
|
148
121
|
|
|
149
122
|
# OpenRouter
|
|
@@ -151,17 +124,17 @@ create_dataset(
|
|
|
151
124
|
"/path/to/images",
|
|
152
125
|
objects=["car", "traffic light"],
|
|
153
126
|
provider="openrouter",
|
|
154
|
-
model="
|
|
155
|
-
api_key="
|
|
127
|
+
model="MODEL_ID",
|
|
128
|
+
api_key="YOUR_API_KEY",
|
|
156
129
|
)
|
|
157
130
|
|
|
158
|
-
#
|
|
131
|
+
# Ollama, or any OpenAI-compatible server (vLLM, LM Studio, Groq, Together, ...)
|
|
159
132
|
create_dataset(
|
|
160
133
|
"/path/to/images",
|
|
161
|
-
objects=["
|
|
162
|
-
provider="openai-compatible"
|
|
163
|
-
model="
|
|
164
|
-
base_url="http://localhost:
|
|
134
|
+
objects=["laptop", "cup"],
|
|
135
|
+
provider="ollama", # or "openai-compatible"
|
|
136
|
+
model="MODEL_ID",
|
|
137
|
+
base_url="http://localhost:11434/v1",
|
|
165
138
|
)
|
|
166
139
|
```
|
|
167
140
|
|
|
@@ -219,7 +192,7 @@ You can also run inference directly on single images or implement a custom `Visi
|
|
|
219
192
|
```python
|
|
220
193
|
from moonlabel import MultimodalInference, VisionBackend, create_dataset
|
|
221
194
|
|
|
222
|
-
client = MultimodalInference(provider="gemini", model="
|
|
195
|
+
client = MultimodalInference(provider="gemini", model="MODEL_ID")
|
|
223
196
|
image, detections = client.detect("photo.jpg", ["person", "car"])
|
|
224
197
|
image, caption = client.caption("photo.jpg", length="normal")
|
|
225
198
|
|
|
@@ -236,7 +209,7 @@ The backend can connect to a running [Moondream Station](https://moondream.ai/st
|
|
|
236
209
|
|
|
237
210
|
## Local Mode (Hugging Face)
|
|
238
211
|
|
|
239
|
-
The backend can run fully offline using the open-source [
|
|
212
|
+
The backend can run fully offline using the open-source [Moondream checkpoint on Hugging Face](https://huggingface.co/vikhyatk/moondream2).
|
|
240
213
|
|
|
241
214
|
1. `pip install "moonlabel[local]"`
|
|
242
215
|
2. In the UI, select **Moondream Local (HF)** (no API key required).
|
|
@@ -290,7 +263,7 @@ moonlabel/
|
|
|
290
263
|
|
|
291
264
|
Below are planned enhancements and upcoming features. Contributions welcome!
|
|
292
265
|
|
|
293
|
-
- [x] **Multimodal LLM support** – OpenAI, Google Gemini, Anthropic
|
|
266
|
+
- [x] **Multimodal LLM support** – OpenAI, Google Gemini, and Anthropic APIs, plus Ollama, OpenRouter, and OpenAI-compatible endpoints.
|
|
294
267
|
- [x] **Local Hugging Face model support** – Offline inference with optional GPU acceleration.
|
|
295
268
|
- [x] **Moondream Station integration** – Native Mac/Linux app support for on-device inference.
|
|
296
269
|
- [x] **Batch uploads** – Label multiple images in one go, with progress tracking.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p>An object-detection and image-caption dataset tool.</p>
|
|
5
5
|
<p><em>Powered by Multimodal LLMs (OpenAI, Gemini, Claude, Ollama, OpenRouter, vLLM) & <a href="https://moondream.ai/">Moondream VLM</a></em></p>
|
|
6
6
|
<p>
|
|
7
|
-
<a href="https://pypi.org/project/moonlabel/"><img src="https://img.shields.io/pypi/v/moonlabel
|
|
7
|
+
<a href="https://pypi.org/project/moonlabel/"><img src="https://img.shields.io/pypi/v/moonlabel?logo=pypi&label=pypi" alt="PyPI version"></a>
|
|
8
8
|
<a href="https://pepy.tech/projects/moonlabel"><img src="https://static.pepy.tech/personalized-badge/moonlabel?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="PyPI Downloads"></a>
|
|
9
9
|
</p>
|
|
10
10
|
</div>
|
|
@@ -19,7 +19,7 @@ MoonLabel is both a Python library and a lightweight web UI to generate object-d
|
|
|
19
19
|
2. Or launch the UI, switch between Detection/Caption, and export with one click.
|
|
20
20
|
|
|
21
21
|
Supported backends:
|
|
22
|
-
- **Multimodal LLMs** (zero extra dependencies): **OpenAI
|
|
22
|
+
- **Multimodal LLMs** (zero extra dependencies): the **OpenAI**, **Google Gemini**, and **Anthropic** APIs, plus **Ollama**, **OpenRouter**, and any **OpenAI-compatible** endpoint (vLLM, LM Studio, Groq, Together, and similar). You pass the model id that API serves; MoonLabel does not pin a model.
|
|
23
23
|
- **Moondream VLM**: Moondream Cloud, Moondream Station, or fully local (Hugging Face).
|
|
24
24
|
- **Custom backends**: Implement `VisionBackend` to plug in any custom vision model.
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ https://github.com/user-attachments/assets/a2dfc6b6-c83d-4296-986b-ac221e10fc3b
|
|
|
33
33
|
|
|
34
34
|
## Features
|
|
35
35
|
|
|
36
|
-
* 🤖 **Multimodal LLM support** — OpenAI, Google Gemini, Anthropic
|
|
36
|
+
* 🤖 **Multimodal LLM support** — OpenAI, Google Gemini, and Anthropic APIs, plus Ollama, OpenRouter, and any OpenAI-compatible vision API.
|
|
37
37
|
* 📦 **Library + UI** — `moonlabel` package with an optional web UI.
|
|
38
38
|
* 🌐 **FastAPI server** — Served by a single `moonlabel-ui` command.
|
|
39
39
|
* ⚛️ **Modern frontend** — React, TypeScript, TailwindCSS, Vite.
|
|
@@ -80,45 +80,18 @@ In the Home page:
|
|
|
80
80
|
|
|
81
81
|
### Using Multimodal LLMs
|
|
82
82
|
|
|
83
|
-
API keys can be passed via `api_key=...` or read
|
|
83
|
+
Pass `provider` for the API you are calling and `model` as the id that API serves. MoonLabel does not bundle or recommend a model. API keys can be passed via `api_key=...` or read from `OPENAI_API_KEY`, `GEMINI_API_KEY` / `GOOGLE_API_KEY`, `ANTHROPIC_API_KEY`, or `OPENROUTER_API_KEY`.
|
|
84
84
|
|
|
85
85
|
```python
|
|
86
86
|
from moonlabel import create_dataset
|
|
87
87
|
|
|
88
|
-
#
|
|
88
|
+
# OpenAI, Gemini, or Anthropic API
|
|
89
89
|
create_dataset(
|
|
90
90
|
"/path/to/images",
|
|
91
91
|
objects=["person", "car"],
|
|
92
|
-
provider="gemini"
|
|
93
|
-
model="
|
|
94
|
-
api_key="
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
# OpenAI (GPT-4o / GPT-4o-mini / GPT-4.1)
|
|
98
|
-
create_dataset(
|
|
99
|
-
"/path/to/images",
|
|
100
|
-
objects=["person", "dog"],
|
|
101
|
-
provider="openai",
|
|
102
|
-
model="gpt-4o-mini",
|
|
103
|
-
api_key="YOUR_OPENAI_API_KEY", # or OPENAI_API_KEY env var
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
# Anthropic Claude
|
|
107
|
-
create_dataset(
|
|
108
|
-
"/path/to/images",
|
|
109
|
-
objects=["bicycle", "helmet"],
|
|
110
|
-
provider="anthropic",
|
|
111
|
-
model="claude-sonnet-4-20250514",
|
|
112
|
-
api_key="YOUR_ANTHROPIC_API_KEY", # or ANTHROPIC_API_KEY env var
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
# Ollama (local multimodal LLMs: qwen2.5vl, llama3.2-vision, gemma3, llava, ...)
|
|
116
|
-
create_dataset(
|
|
117
|
-
"/path/to/images",
|
|
118
|
-
objects=["laptop", "cup"],
|
|
119
|
-
provider="ollama",
|
|
120
|
-
model="qwen2.5vl",
|
|
121
|
-
base_url="http://localhost:11434/v1", # default
|
|
92
|
+
provider="openai", # "gemini" or "anthropic"
|
|
93
|
+
model="MODEL_ID",
|
|
94
|
+
api_key="YOUR_API_KEY",
|
|
122
95
|
)
|
|
123
96
|
|
|
124
97
|
# OpenRouter
|
|
@@ -126,17 +99,17 @@ create_dataset(
|
|
|
126
99
|
"/path/to/images",
|
|
127
100
|
objects=["car", "traffic light"],
|
|
128
101
|
provider="openrouter",
|
|
129
|
-
model="
|
|
130
|
-
api_key="
|
|
102
|
+
model="MODEL_ID",
|
|
103
|
+
api_key="YOUR_API_KEY",
|
|
131
104
|
)
|
|
132
105
|
|
|
133
|
-
#
|
|
106
|
+
# Ollama, or any OpenAI-compatible server (vLLM, LM Studio, Groq, Together, ...)
|
|
134
107
|
create_dataset(
|
|
135
108
|
"/path/to/images",
|
|
136
|
-
objects=["
|
|
137
|
-
provider="openai-compatible"
|
|
138
|
-
model="
|
|
139
|
-
base_url="http://localhost:
|
|
109
|
+
objects=["laptop", "cup"],
|
|
110
|
+
provider="ollama", # or "openai-compatible"
|
|
111
|
+
model="MODEL_ID",
|
|
112
|
+
base_url="http://localhost:11434/v1",
|
|
140
113
|
)
|
|
141
114
|
```
|
|
142
115
|
|
|
@@ -194,7 +167,7 @@ You can also run inference directly on single images or implement a custom `Visi
|
|
|
194
167
|
```python
|
|
195
168
|
from moonlabel import MultimodalInference, VisionBackend, create_dataset
|
|
196
169
|
|
|
197
|
-
client = MultimodalInference(provider="gemini", model="
|
|
170
|
+
client = MultimodalInference(provider="gemini", model="MODEL_ID")
|
|
198
171
|
image, detections = client.detect("photo.jpg", ["person", "car"])
|
|
199
172
|
image, caption = client.caption("photo.jpg", length="normal")
|
|
200
173
|
|
|
@@ -211,7 +184,7 @@ The backend can connect to a running [Moondream Station](https://moondream.ai/st
|
|
|
211
184
|
|
|
212
185
|
## Local Mode (Hugging Face)
|
|
213
186
|
|
|
214
|
-
The backend can run fully offline using the open-source [
|
|
187
|
+
The backend can run fully offline using the open-source [Moondream checkpoint on Hugging Face](https://huggingface.co/vikhyatk/moondream2).
|
|
215
188
|
|
|
216
189
|
1. `pip install "moonlabel[local]"`
|
|
217
190
|
2. In the UI, select **Moondream Local (HF)** (no API key required).
|
|
@@ -265,7 +238,7 @@ moonlabel/
|
|
|
265
238
|
|
|
266
239
|
Below are planned enhancements and upcoming features. Contributions welcome!
|
|
267
240
|
|
|
268
|
-
- [x] **Multimodal LLM support** – OpenAI, Google Gemini, Anthropic
|
|
241
|
+
- [x] **Multimodal LLM support** – OpenAI, Google Gemini, and Anthropic APIs, plus Ollama, OpenRouter, and OpenAI-compatible endpoints.
|
|
269
242
|
- [x] **Local Hugging Face model support** – Offline inference with optional GPU acceleration.
|
|
270
243
|
- [x] **Moondream Station integration** – Native Mac/Linux app support for on-device inference.
|
|
271
244
|
- [x] **Batch uploads** – Label multiple images in one go, with progress tracking.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "moonlabel"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Create object-detection (YOLO, COCO, VOC) and image-caption datasets using Multimodal LLMs and Moondream"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -1010,7 +1010,7 @@ class MultimodalInference(VisionBackend):
|
|
|
1010
1010
|
"""Unified inference client supporting Moondream and Multimodal LLMs.
|
|
1011
1011
|
|
|
1012
1012
|
Example:
|
|
1013
|
-
client = MultimodalInference(provider="gemini", model="
|
|
1013
|
+
client = MultimodalInference(provider="gemini", model="MODEL_ID", api_key="...")
|
|
1014
1014
|
image, detections = client.detect("photo.jpg", ["person", "car"])
|
|
1015
1015
|
image, caption = client.caption("photo.jpg", length="normal")
|
|
1016
1016
|
"""
|
|
@@ -52,8 +52,7 @@ def create_dataset(
|
|
|
52
52
|
- provider: Inference provider ("moondream", "openai", "gemini", "anthropic",
|
|
53
53
|
"ollama", "openrouter", or "openai-compatible"). Defaults to "moondream" when
|
|
54
54
|
neither `provider`, `model`, nor `base_url` is provided.
|
|
55
|
-
- model: Model
|
|
56
|
-
"claude-sonnet-4-20250514", "qwen2.5vl").
|
|
55
|
+
- model: Model id served by the selected provider API.
|
|
57
56
|
- base_url: Custom base URL for OpenAI-compatible, Ollama, or proxied endpoints.
|
|
58
57
|
- backend: Optional pre-configured `VisionBackend` instance (overrides provider/model/api_key).
|
|
59
58
|
- caption_prompt: Optional custom prompt for caption generation.
|