prappo commited on
Commit
0e7bcc2
·
1 Parent(s): 276c473

Upload 21 files

Browse files
2ebb460f4adfe0ebf34d.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6e8497ba978a6f5fbb647e419d2696cd80df5a23cb6a8ea532021911bd76acb
3
+ size 88188479
5fd9e75c3bb1f31c2207.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:295cda021bff7ad5210ad6f5d6c5754bb375b712d95bce3e6ed0cc1e3b6cf787
3
+ size 10281838
9f4d6e330a4b1cebd316.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b24a1a7c88c79f4f6c6d29c2dc073763f0edb9548c99001912d02b0ab6823f15
3
+ size 10335238
a620c8c752bdf5c69d98.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7001d60734fdc112dd9c062635fb59cd401fb82a9d4213134bce4dbd655c803a
3
+ size 44342436
browser.d.ts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export default removeBackground;
2
+ export type { ImageSource, Config };
3
+ import { Config } from './schema';
4
+ type ImageSource = ImageData | ArrayBuffer | Uint8Array | Blob | URL | string;
5
+ declare function removeBackground(image: ImageSource, configuration?: Config): Promise<Blob>;
browser.js ADDED
The diff for this file is too large to render. See raw diff
 
browser.js.LICENSE.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @license
3
+ * Lodash <https://lodash.com/>
4
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5
+ * Released under MIT license <https://lodash.com/license>
6
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8
+ */
browser.js.map ADDED
The diff for this file is too large to render. See raw diff
 
browser.mjs ADDED
The diff for this file is too large to render. See raw diff
 
browser.mjs.LICENSE.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @license
3
+ * Lodash <https://lodash.com/>
4
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5
+ * Released under MIT license <https://lodash.com/license>
6
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8
+ */
browser.mjs.map ADDED
The diff for this file is too large to render. See raw diff
 
bundle.d.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ export { preload, load };
2
+ import { Config } from './schema';
3
+ type Entry = {
4
+ url: string;
5
+ size: number;
6
+ mime: string;
7
+ };
8
+ declare function load(key: string, config: Config): Promise<Blob>;
9
+ declare function preload(config: Config): Promise<Map<string, Entry>>;
c285eb5377ad8280cf32.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:138ceb077e66fc6ba1cc5c814828274dd6f695bddd23bfd41e516ee35be5b891
3
+ size 9487920
deea8254622ca47c4771.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fe0e6d716388c051d2db6be1d0db03bd81c1b559bb8c046386104a375ddc7a0
3
+ size 16836274
eac818d9d05525e8f209.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef9331edcc3ab22aa726ac517644bba47726343b44581aeecb4860f354d59c18
3
+ size 9413659
ec79eeba92555e43251e.wasm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff3e4776f0b4c94041be134736da781303a841375eb15efbe3c3582d1af731d2
3
+ size 18215132
inference.d.ts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import { Imports } from './tensor';
2
+ import { Config } from './schema';
3
+ export declare function runInference(imageData: ImageData, config: Config, imports: Imports, session: any): Promise<ImageData>;
ort-web-rt.d.ts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ export { createOnnxRuntime };
2
+ import { Imports } from './tensor';
3
+ declare function createOnnxRuntime(config: any): Imports;
schema.d.ts ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export { ConfigSchema, Config, validateConfig };
2
+ import { z } from 'zod';
3
+ declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
4
+ publicPath: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
5
+ debug: z.ZodDefault<z.ZodBoolean>;
6
+ proxyToWorker: z.ZodDefault<z.ZodBoolean>;
7
+ fetchArgs: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
8
+ progress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodNumber, z.ZodNumber], z.ZodUnknown>, z.ZodUndefined>>;
9
+ model: z.ZodDefault<z.ZodEnum<["small", "medium"]>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ debug: boolean;
12
+ proxyToWorker: boolean;
13
+ fetchArgs: {};
14
+ model: "small" | "medium";
15
+ publicPath?: string | undefined;
16
+ progress?: ((args_0: string, args_1: number, args_2: number, ...args_3: unknown[]) => undefined) | undefined;
17
+ }, {
18
+ publicPath?: string | undefined;
19
+ debug?: boolean | undefined;
20
+ proxyToWorker?: boolean | undefined;
21
+ fetchArgs?: {} | undefined;
22
+ progress?: ((args_0: string, args_1: number, args_2: number, ...args_3: unknown[]) => undefined) | undefined;
23
+ model?: "small" | "medium" | undefined;
24
+ }>>;
25
+ type Config = z.infer<typeof ConfigSchema>;
26
+ declare function validateConfig(config?: Config): Config;
tensor.d.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ export type Tensor = {
2
+ shape: number[];
3
+ data: Float32Array;
4
+ dataType: 'float32';
5
+ };
6
+ export type Imports = {
7
+ createSession: (model: any) => Promise<any>;
8
+ runSession(session: any, inputs: [string, Tensor][], outputs: [string]): Promise<Tensor[]>;
9
+ };
utils.d.ts ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ export { imageDecode, imageEncode, imageBitmapToImageData, imageDataResize, imageDataToFloat32Array, calculateProportionalSize, isAbsoluteURL, ensureAbsoluteURL, imageSourceToImageData };
2
+ declare function imageDecode(blob: Blob): Promise<ImageData>;
3
+ declare function imageEncode(imageData: ImageData, quality?: number, type?: string): Promise<Blob>;
4
+ declare function imageBitmapToImageData(imageBitmap: ImageBitmap): ImageData;
5
+ declare function imageDataResize(imageData: ImageData, newWidth: number, newHeight: number): Promise<ImageData>;
6
+ declare function imageDataToFloat32Array(image: ImageData, mean?: number[], std?: number[]): Float32Array;
7
+ declare function calculateProportionalSize(originalWidth: number, originalHeight: number, maxWidth: number, maxHeight: number): [number, number];
8
+ declare function isAbsoluteURL(url: string): boolean;
9
+ declare function ensureAbsoluteURL(url: string): string;
10
+ declare function imageSourceToImageData(image: string | URL | ArrayBuffer | ImageData | Blob | Uint8Array): Promise<ImageData>;