@ultralytics/yolo 0.0.28 → 0.0.29
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/dist/index.d.ts +5 -5
- package/dist/index.js +4 -2
- package/package.json +1 -1
- package/pkg/package.json +1 -1
- package/pkg/ultralytics_inference_web_bg.wasm +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -114,14 +114,14 @@ export interface PredictOptions {
|
|
|
114
114
|
*/
|
|
115
115
|
classes?: number[];
|
|
116
116
|
/**
|
|
117
|
-
* Depth colormap for the `depth` overlay: `"
|
|
118
|
-
* `"spectral"` (`Spectral_r`, DepthAnything-style), or `"gray"` (raw
|
|
119
|
-
* Ignored by every other task.
|
|
117
|
+
* Depth colormap for the `depth` overlay: `"jet"` (default, classic rainbow),
|
|
118
|
+
* `"inferno"`, `"spectral"` (`Spectral_r`, DepthAnything-style), or `"gray"` (raw
|
|
119
|
+
* grayscale). Ignored by every other task.
|
|
120
120
|
*/
|
|
121
121
|
colormap?: "inferno" | "jet" | "spectral" | "gray";
|
|
122
122
|
/**
|
|
123
|
-
* Depth normalization: `"
|
|
124
|
-
*
|
|
123
|
+
* Depth normalization: `"disparity"` (default, inverse depth + percentile clip, the
|
|
124
|
+
* DepthAnything look) or `"metric"` (min/max). Ignored by every other task.
|
|
125
125
|
*/
|
|
126
126
|
depthViz?: "metric" | "disparity";
|
|
127
127
|
}
|
package/dist/index.js
CHANGED
|
@@ -422,8 +422,10 @@ export class YOLO {
|
|
|
422
422
|
const conf = options?.conf ?? DEFAULT_CONF;
|
|
423
423
|
const iou = options?.iou ?? DEFAULT_IOU;
|
|
424
424
|
const classes = options?.classes ? new Uint32Array(options.classes) : undefined;
|
|
425
|
-
|
|
426
|
-
|
|
425
|
+
// Empty means "unset": the wasm side falls back to the Rust `Colormap`/`DepthViz`
|
|
426
|
+
// defaults, so the default lives in exactly one place.
|
|
427
|
+
const colormap = options?.colormap ?? "";
|
|
428
|
+
const depthViz = options?.depthViz ?? "";
|
|
427
429
|
if (isDrawable(image)) {
|
|
428
430
|
const { data, width, height } = toImageData(image);
|
|
429
431
|
return decodeResults(await this.engine.predictDrawable(data, width, height, conf, iou, classes, colormap, depthViz));
|
package/package.json
CHANGED
package/pkg/package.json
CHANGED
|
Binary file
|