@ultralytics/yolo 0.0.20 → 0.0.21

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.
package/README.md CHANGED
@@ -1,19 +1,23 @@
1
1
  <!-- Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license -->
2
2
 
3
- # Ultralytics Inference (Browser / WebGPU)
3
+ <a href="https://www.ultralytics.com/"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg" width="320" alt="Ultralytics logo"></a>
4
+
5
+ # Ultralytics Inference
4
6
 
5
7
  [![npm version](https://img.shields.io/npm/v/@ultralytics/yolo?logo=npm&logoColor=white&label=npm&color=CB3837)](https://www.npmjs.com/package/@ultralytics/yolo)
6
8
  [![npm downloads](https://img.shields.io/npm/dm/@ultralytics/yolo?logo=npm&logoColor=white&label=downloads&color=CB3837)](https://www.npmjs.com/package/@ultralytics/yolo)
9
+ [![CI](https://github.com/ultralytics/inference/actions/workflows/ci.yml/badge.svg)](https://github.com/ultralytics/inference/actions/workflows/ci.yml)
7
10
  [![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](https://github.com/ultralytics/inference/blob/main/LICENSE)
8
11
 
9
12
  [![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics)
10
13
  [![Ultralytics Forums](https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue)](https://community.ultralytics.com/)
11
14
  [![Ultralytics Reddit](https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue)](https://reddit.com/r/ultralytics)
12
15
 
13
- Run [Ultralytics](https://ultralytics.com) YOLO models directly in the browser on
14
- **WebGPU**, with no server and no Python. It covers detection, segmentation,
15
- pose, classification, OBB, and semantic segmentation, with a compact
16
- TypeScript API and a built-in `annotate()` for drawing.
16
+ Run [Ultralytics](https://ultralytics.com) YOLO models directly in the browser,
17
+ with no server and no Python. It runs on **WebGPU** (with an automatic CPU/wasm
18
+ fallback) and covers detection, segmentation, pose, classification, OBB, and
19
+ semantic segmentation, behind a small TypeScript API with a built-in
20
+ `annotate()` that draws results straight to a canvas.
17
21
 
18
22
  ```ts
19
23
  import { YOLO, annotate } from "@ultralytics/yolo";
@@ -34,8 +38,16 @@ visuals match the native and Python paths.
34
38
 
35
39
  ```bash
36
40
  npm install @ultralytics/yolo
41
+ # or
42
+ pnpm add @ultralytics/yolo
43
+ yarn add @ultralytics/yolo
44
+ bun add @ultralytics/yolo
37
45
  ```
38
46
 
47
+ It ships as an ES module with TypeScript types and works in any modern bundler
48
+ (Vite, webpack, esbuild, Bun) or directly via a CDN such as
49
+ [esm.sh](https://esm.sh/@ultralytics/yolo).
50
+
39
51
  ## Quick start
40
52
 
41
53
  ```ts
@@ -76,18 +88,30 @@ async function frame() {
76
88
  }
77
89
  ```
78
90
 
79
- ## Models
91
+ ## ✨ Models
92
+
93
+ <a href="https://docs.ultralytics.com/tasks" target="_blank">
94
+ <img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/docs/ultralytics-yolov8-tasks-banner.avif" alt="Ultralytics YOLO supported tasks">
95
+ </a>
96
+ <br>
97
+ <br>
98
+
99
+ Runs [YOLOv8](https://docs.ultralytics.com/models/yolov8),
100
+ [YOLO11](https://docs.ultralytics.com/models/yolo11), and
101
+ [YOLO26](https://docs.ultralytics.com/models/yolo26) ONNX exports for detection,
102
+ segmentation, pose, OBB, classification, and semantic segmentation.
80
103
 
81
- A bare ONNX name resolves to the
82
- [Ultralytics assets release](https://github.com/ultralytics/assets/releases):
104
+ Pass a bare ONNX name and it is **auto-downloaded** from the
105
+ [Ultralytics assets release](https://github.com/ultralytics/assets/releases) (the
106
+ same weights the native crate and Python use):
83
107
 
84
108
  ```ts
85
- await YOLO.load("yolo26n.onnx"); // resolves to the release: .../download/v8.4.0/yolo26n.onnx
109
+ await YOLO.load("yolo26n.onnx"); // auto-downloads from the release: .../download/v8.4.0/yolo26n.onnx
86
110
  ```
87
111
 
88
- Supports **yolo26**, **yolo11**, and **yolov8** in sizes `n/s/m/l/x` with task
89
- suffixes `-seg`, `-pose`, `-cls`, `-obb`, and `-sem` (semantic, yolo26 only). A
90
- value containing a `/` or a scheme is used as a URL/path as-is.
112
+ Auto-download covers **yolo26**, **yolo11**, and **yolov8** in sizes `n/s/m/l/x`
113
+ with task suffixes `-seg`, `-pose`, `-cls`, `-obb`, and `-sem` (semantic, yolo26
114
+ only). A value containing a `/` or a scheme is used as a URL/path as-is.
91
115
 
92
116
  > **CORS note:** GitHub release assets do not send `Access-Control-Allow-Origin`,
93
117
  > so a browser cannot fetch them cross-origin. Host the `.onnx` **same-origin**
@@ -125,9 +149,9 @@ the native renderer. None of this is duplicated in JS.
125
149
  context** (`https://` or `http://localhost`) gives the fast path. Without
126
150
  WebGPU (older browsers, some phones), `YOLO.load` automatically falls back to a
127
151
  portable **CPU/wasm** build that runs everywhere. Pick the device with
128
- `YOLO.load(model, { device: "webgpu" | "cpu" })` (default `"auto"`). If WebGPU
129
- cannot engage, the load falls back to CPU; `model.device` reports what actually
130
- ran.
152
+ `YOLO.load("yolo26n.onnx", { device: "webgpu" | "cpu" })` (default `"auto"`). If
153
+ WebGPU cannot engage, the load falls back to CPU; `model.device` reports what
154
+ actually ran.
131
155
  - **Model format**: export your model to ONNX with Ultralytics so the metadata
132
156
  (task, class names, `imgsz`) is embedded:
133
157
 
@@ -163,6 +187,46 @@ npm run build # wasm-pack build + tsc
163
187
  Serve the built `dist/` + `pkg/` over `localhost` (a secure context) and open it
164
188
  in a WebGPU browser.
165
189
 
166
- ## License
190
+ ## 💡 Contributing
191
+
192
+ Ultralytics thrives on community collaboration, and we deeply value your contributions! Whether it's reporting bugs,
193
+ suggesting features, or submitting code changes, your involvement is crucial.
194
+
195
+ - **Report Issues**: Found a bug? [Open an issue](https://github.com/ultralytics/inference/issues)
196
+ - **Feature Requests**: Have an idea? [Share it](https://github.com/ultralytics/inference/issues)
197
+ - **Pull Requests**: Read our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) first
198
+ - **Feedback**: Take our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey)
199
+
200
+ A heartfelt thank you 🙏 goes out to all our contributors! Your efforts help make Ultralytics tools better for everyone.
201
+
202
+ [![Ultralytics open-source contributors](https://raw.githubusercontent.com/ultralytics/assets/main/im/image-contributors.png)](https://github.com/ultralytics/ultralytics/graphs/contributors)
203
+
204
+ ## 📜 License
205
+
206
+ Ultralytics offers two licensing options to suit different needs:
207
+
208
+ - **AGPL-3.0 License**: This [OSI-approved](https://opensource.org/license/agpl-3.0) open-source license is perfect for students, researchers, and enthusiasts. It encourages open collaboration and knowledge sharing. See the [LICENSE](https://github.com/ultralytics/inference/blob/main/LICENSE) file for full details.
209
+ - **Ultralytics Enterprise License**: Designed for commercial use, this license allows for the seamless integration of Ultralytics software and AI models into commercial products and services, bypassing the open-source requirements of AGPL-3.0. If your use case involves commercial deployment, please contact us via [Ultralytics Licensing](https://www.ultralytics.com/license).
210
+
211
+ ## 📮 Contact
212
+
213
+ - **GitHub Issues**: [Bug reports and feature requests](https://github.com/ultralytics/inference/issues)
214
+ - **Discord**: [Join our community](https://discord.com/invite/ultralytics)
215
+ - **Documentation**: [docs.ultralytics.com](https://docs.ultralytics.com)
167
216
 
168
- AGPL-3.0. See the repository [LICENSE](https://github.com/ultralytics/inference/blob/main/LICENSE).
217
+ <br>
218
+ <div align="center">
219
+ <a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="3%" alt="Ultralytics GitHub"></a>
220
+ <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
221
+ <a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="3%" alt="Ultralytics LinkedIn"></a>
222
+ <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
223
+ <a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="3%" alt="Ultralytics Twitter"></a>
224
+ <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
225
+ <a href="https://www.youtube.com/ultralytics?sub_confirmation=1"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="3%" alt="Ultralytics YouTube"></a>
226
+ <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
227
+ <a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="3%" alt="Ultralytics TikTok"></a>
228
+ <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
229
+ <a href="https://ultralytics.com/bilibili"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-bilibili.png" width="3%" alt="Ultralytics BiliBili"></a>
230
+ <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
231
+ <a href="https://discord.com/invite/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
232
+ </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ultralytics/yolo",
3
- "version": "0.0.20",
4
- "description": "Run Ultralytics YOLO models in the browser on WebGPU (WebAssembly, ONNX Runtime Web via ort-web). Python-like API.",
3
+ "version": "0.0.21",
4
+ "description": "Run Ultralytics YOLO models in the browser on WebGPU (WebAssembly, ONNX Runtime Web via ort-web).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -43,9 +43,18 @@
43
43
  "computer-vision"
44
44
  ],
45
45
  "license": "AGPL-3.0",
46
+ "author": "Ultralytics",
47
+ "contributors": [
48
+ "Glenn Jocher <glenn.jocher@ultralytics.com>",
49
+ "Onuralp Sezer <onuralp@ultralytics.com>"
50
+ ],
46
51
  "repository": {
47
52
  "type": "git",
48
- "url": "https://github.com/ultralytics/inference"
53
+ "url": "git+https://github.com/ultralytics/inference.git",
54
+ "directory": "web"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/ultralytics/inference/issues"
49
58
  },
50
59
  "homepage": "https://www.ultralytics.com",
51
60
  "devDependencies": {
package/pkg/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ultralytics-inference-web",
3
3
  "type": "module",
4
4
  "description": "Browser/WebAssembly bindings for ultralytics-inference (WebGPU via ort-web)",
5
- "version": "0.0.20",
5
+ "version": "0.0.21",
6
6
  "license": "AGPL-3.0",
7
7
  "repository": {
8
8
  "type": "git",