@eyepop.ai/eyepop 0.18.6 → 0.19.0
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/eyepop.index.d.mts
CHANGED
|
@@ -105,7 +105,7 @@ interface PredictedObject extends PredictedClass {
|
|
|
105
105
|
mask: Mask | undefined;
|
|
106
106
|
objects: Array<PredictedObject> | undefined;
|
|
107
107
|
classes: Array<PredictedClass> | undefined;
|
|
108
|
-
labels: Array<
|
|
108
|
+
labels: Array<PredictedLabel> | undefined;
|
|
109
109
|
meshs: Array<PredictedMesh> | undefined;
|
|
110
110
|
keyPoints: Array<PredictedKeyPoints> | undefined;
|
|
111
111
|
}
|
|
@@ -128,6 +128,7 @@ interface PredictedKeyPoints {
|
|
|
128
128
|
points: Array<PredictedKeyPoint>;
|
|
129
129
|
}
|
|
130
130
|
interface PredictedKeyPoint extends Point3d, PredictedClass {
|
|
131
|
+
visible: boolean | undefined;
|
|
131
132
|
}
|
|
132
133
|
interface ResultStream extends AsyncIterable<Prediction> {
|
|
133
134
|
cancel(): void;
|
|
@@ -203,7 +204,9 @@ declare class Endpoint {
|
|
|
203
204
|
pendingJobs(): number;
|
|
204
205
|
popName(): string | null;
|
|
205
206
|
popComp(): string | null;
|
|
207
|
+
postTransform(): string | null;
|
|
206
208
|
changePopComp(popComp: string): Promise<void>;
|
|
209
|
+
changePostTransform(postTransform: string): Promise<void>;
|
|
207
210
|
popId(): string | null;
|
|
208
211
|
onStateChanged(handler: (fromState: EndpointState, toState: EndpointState) => void): Endpoint;
|
|
209
212
|
onIngressEvent(handler: (event: IngressEvent) => void): Endpoint;
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ interface PredictedObject extends PredictedClass {
|
|
|
105
105
|
mask: Mask | undefined;
|
|
106
106
|
objects: Array<PredictedObject> | undefined;
|
|
107
107
|
classes: Array<PredictedClass> | undefined;
|
|
108
|
-
labels: Array<
|
|
108
|
+
labels: Array<PredictedLabel> | undefined;
|
|
109
109
|
meshs: Array<PredictedMesh> | undefined;
|
|
110
110
|
keyPoints: Array<PredictedKeyPoints> | undefined;
|
|
111
111
|
}
|
|
@@ -128,6 +128,7 @@ interface PredictedKeyPoints {
|
|
|
128
128
|
points: Array<PredictedKeyPoint>;
|
|
129
129
|
}
|
|
130
130
|
interface PredictedKeyPoint extends Point3d, PredictedClass {
|
|
131
|
+
visible: boolean | undefined;
|
|
131
132
|
}
|
|
132
133
|
interface ResultStream extends AsyncIterable<Prediction> {
|
|
133
134
|
cancel(): void;
|
|
@@ -203,7 +204,9 @@ declare class Endpoint {
|
|
|
203
204
|
pendingJobs(): number;
|
|
204
205
|
popName(): string | null;
|
|
205
206
|
popComp(): string | null;
|
|
207
|
+
postTransform(): string | null;
|
|
206
208
|
changePopComp(popComp: string): Promise<void>;
|
|
209
|
+
changePostTransform(postTransform: string): Promise<void>;
|
|
207
210
|
popId(): string | null;
|
|
208
211
|
onStateChanged(handler: (fromState: EndpointState, toState: EndpointState) => void): Endpoint;
|
|
209
212
|
onIngressEvent(handler: (event: IngressEvent) => void): Endpoint;
|
package/dist/eyepop.index.js
CHANGED
|
@@ -9866,6 +9866,13 @@ var Endpoint = class {
|
|
|
9866
9866
|
return null;
|
|
9867
9867
|
}
|
|
9868
9868
|
}
|
|
9869
|
+
postTransform() {
|
|
9870
|
+
if (this._pipeline) {
|
|
9871
|
+
return this._pipeline.postTransform;
|
|
9872
|
+
} else {
|
|
9873
|
+
return null;
|
|
9874
|
+
}
|
|
9875
|
+
}
|
|
9869
9876
|
async changePopComp(popComp) {
|
|
9870
9877
|
const client = this._client;
|
|
9871
9878
|
const baseUrl = this._baseUrl;
|
|
@@ -9896,6 +9903,36 @@ var Endpoint = class {
|
|
|
9896
9903
|
this._pipeline.inferPipeline = popComp;
|
|
9897
9904
|
}
|
|
9898
9905
|
}
|
|
9906
|
+
async changePostTransform(postTransform) {
|
|
9907
|
+
const client = this._client;
|
|
9908
|
+
const baseUrl = this._baseUrl;
|
|
9909
|
+
if (!baseUrl || !client) {
|
|
9910
|
+
return Promise.reject("endpoint not connected, use connect() before changePopComp()");
|
|
9911
|
+
}
|
|
9912
|
+
const body = {
|
|
9913
|
+
"transform": postTransform
|
|
9914
|
+
};
|
|
9915
|
+
let response = await this.fetchWithRetry(async () => {
|
|
9916
|
+
const session = await this.session();
|
|
9917
|
+
let headers = {
|
|
9918
|
+
"Authorization": `Bearer ${session.accessToken}`,
|
|
9919
|
+
"Content-Type": "application/json"
|
|
9920
|
+
};
|
|
9921
|
+
const patch_url = `${session.baseUrl}/pipelines/${session.pipelineId}/postTransform`;
|
|
9922
|
+
return client.fetch(patch_url, {
|
|
9923
|
+
method: "PATCH",
|
|
9924
|
+
body: JSON.stringify(body),
|
|
9925
|
+
headers
|
|
9926
|
+
});
|
|
9927
|
+
});
|
|
9928
|
+
if (response.status != 204) {
|
|
9929
|
+
const message = await response.text();
|
|
9930
|
+
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
9931
|
+
}
|
|
9932
|
+
if (this._pipeline) {
|
|
9933
|
+
this._pipeline.postTransform = postTransform;
|
|
9934
|
+
}
|
|
9935
|
+
}
|
|
9899
9936
|
popId() {
|
|
9900
9937
|
return this._options.popId || null;
|
|
9901
9938
|
}
|
|
@@ -10368,10 +10405,19 @@ var Endpoint = class {
|
|
|
10368
10405
|
} else {
|
|
10369
10406
|
pipeline = "identity";
|
|
10370
10407
|
}
|
|
10408
|
+
let postTransform;
|
|
10409
|
+
if (this._pipeline && this._pipeline.postTransform) {
|
|
10410
|
+
postTransform = this._pipeline.postTransform;
|
|
10411
|
+
} else {
|
|
10412
|
+
postTransform = null;
|
|
10413
|
+
}
|
|
10371
10414
|
const body = {
|
|
10372
10415
|
"inferPipelineDef": {
|
|
10373
10416
|
"pipeline": pipeline
|
|
10374
10417
|
},
|
|
10418
|
+
"postTransformDef": {
|
|
10419
|
+
"transform": postTransform
|
|
10420
|
+
},
|
|
10375
10421
|
"source": {
|
|
10376
10422
|
"sourceType": "NONE"
|
|
10377
10423
|
},
|