@eyepop.ai/eyepop 1.16.0 → 1.17.1

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.
@@ -17,13 +17,6 @@ interface Box {
17
17
  readonly topLeft: Point2d;
18
18
  readonly bottomRight: Point2d;
19
19
  }
20
- interface Roi {
21
- readonly points?: Point2d[];
22
- readonly boxes?: Box[];
23
- }
24
- interface SourceParams {
25
- readonly roi?: Roi;
26
- }
27
20
  interface StreamTime {
28
21
  timestamp?: number;
29
22
  seconds?: number;
@@ -154,7 +147,9 @@ declare enum ModelFormat {
154
147
  ONNX = "ONNX",
155
148
  TorchScript = "TorchScript",
156
149
  TorchScriptCpu = "TorchScriptCpu",
157
- TorchScriptCuda = "TorchScriptCuda"
150
+ TorchScriptCuda = "TorchScriptCuda",
151
+ PyTorch = "PyTorch",
152
+ ModelLess = "ModelLess"
158
153
  }
159
154
  declare enum ModelPrecisionType {
160
155
  float32 = "float32",
@@ -200,6 +195,7 @@ interface PopForward {
200
195
  }
201
196
  interface BaseComponent {
202
197
  type: PopComponentType;
198
+ id?: number;
203
199
  forward?: PopForward;
204
200
  }
205
201
  interface ForwardComponent extends BaseComponent {
@@ -215,13 +211,18 @@ declare enum InferenceType {
215
211
  SEGMENTATION = "segmentation"
216
212
  }
217
213
  interface InferenceComponent extends BaseComponent {
218
- inferenceTypes: InferenceType[];
214
+ inferenceTypes?: InferenceType[];
219
215
  hidden?: boolean;
220
216
  modelUuid?: string;
221
217
  model?: string;
218
+ abilityUuid?: string;
219
+ ability?: string;
222
220
  categoryName?: string;
223
221
  confidenceThreshold?: number;
224
222
  targetFps?: string;
223
+ params?: {
224
+ [index: string]: any;
225
+ };
225
226
  }
226
227
  interface TracingComponent extends BaseComponent {
227
228
  reidModelUuid?: string;
@@ -254,6 +255,12 @@ interface Pop {
254
255
  components: PopComponent[];
255
256
  postTransform?: string;
256
257
  }
258
+ interface ComponentParams {
259
+ componentId: number;
260
+ values: {
261
+ [index: string]: any;
262
+ };
263
+ }
257
264
 
258
265
  interface Auth0Options {
259
266
  domain: string;
@@ -469,7 +476,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
469
476
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
470
477
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
471
478
  liveEgress(ingressId: string): Promise<LiveMedia>;
472
- process(source: Source, params?: SourceParams): Promise<ResultStream>;
479
+ process(source: Source, params?: ComponentParams[]): Promise<ResultStream>;
473
480
  private startIngressWs;
474
481
  private uploadFile;
475
482
  private uploadStream;
@@ -882,13 +889,13 @@ declare function readableStreamFromString(s: string): ReadableStream<Uint8Array>
882
889
 
883
890
  declare class AbstractJob implements ResultStream {
884
891
  protected _getSession: () => Promise<WorkerSession>;
885
- protected _params: SourceParams | null;
892
+ protected _params: ComponentParams[] | null;
886
893
  protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
887
894
  protected _controller: AbortController;
888
895
  protected _client: HttpClient;
889
896
  protected _requestLogger: Logger;
890
897
  [Symbol.asyncIterator](): AsyncIterator<Prediction>;
891
- protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
898
+ protected constructor(params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
892
899
  protected startJob(): Promise<Response>;
893
900
  protected onEvent(event: StreamEvent): Promise<void>;
894
901
  static n: number;
@@ -902,19 +909,19 @@ declare class UploadJob extends AbstractJob {
902
909
  private readonly _needsFullDuplex;
903
910
  private readonly _videoMode;
904
911
  get [Symbol.toStringTag](): string;
905
- constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
912
+ constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
906
913
  protected onEvent(event: StreamEvent): Promise<void>;
907
914
  protected startJob(): Promise<Response>;
908
915
  }
909
916
  declare class LoadFromJob extends AbstractJob {
910
917
  private readonly _location;
911
- constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
918
+ constructor(location: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
912
919
  get [Symbol.toStringTag](): string;
913
920
  protected startJob(): Promise<Response>;
914
921
  }
915
922
  declare class LoadLiveIngressJob extends AbstractJob {
916
923
  private readonly _ingressId;
917
- constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
924
+ constructor(ingressId: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
918
925
  get [Symbol.toStringTag](): string;
919
926
  protected startJob(): Promise<Response>;
920
927
  }
@@ -935,7 +942,7 @@ declare abstract class WebrtcBase {
935
942
  protected _eTag: string;
936
943
  protected _queuedCandidates: RTCIceCandidate[];
937
944
  protected _offerData: OfferData | null;
938
- constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
945
+ protected constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
939
946
  close(): Promise<void>;
940
947
  ingressId(): string;
941
948
  protected gresUrl(session: WorkerSession, location?: string | null): URL;
@@ -982,4 +989,4 @@ declare namespace EyePop {
982
989
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
983
990
  }
984
991
 
985
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
992
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
@@ -17,13 +17,6 @@ interface Box {
17
17
  readonly topLeft: Point2d;
18
18
  readonly bottomRight: Point2d;
19
19
  }
20
- interface Roi {
21
- readonly points?: Point2d[];
22
- readonly boxes?: Box[];
23
- }
24
- interface SourceParams {
25
- readonly roi?: Roi;
26
- }
27
20
  interface StreamTime {
28
21
  timestamp?: number;
29
22
  seconds?: number;
@@ -154,7 +147,9 @@ declare enum ModelFormat {
154
147
  ONNX = "ONNX",
155
148
  TorchScript = "TorchScript",
156
149
  TorchScriptCpu = "TorchScriptCpu",
157
- TorchScriptCuda = "TorchScriptCuda"
150
+ TorchScriptCuda = "TorchScriptCuda",
151
+ PyTorch = "PyTorch",
152
+ ModelLess = "ModelLess"
158
153
  }
159
154
  declare enum ModelPrecisionType {
160
155
  float32 = "float32",
@@ -200,6 +195,7 @@ interface PopForward {
200
195
  }
201
196
  interface BaseComponent {
202
197
  type: PopComponentType;
198
+ id?: number;
203
199
  forward?: PopForward;
204
200
  }
205
201
  interface ForwardComponent extends BaseComponent {
@@ -215,13 +211,18 @@ declare enum InferenceType {
215
211
  SEGMENTATION = "segmentation"
216
212
  }
217
213
  interface InferenceComponent extends BaseComponent {
218
- inferenceTypes: InferenceType[];
214
+ inferenceTypes?: InferenceType[];
219
215
  hidden?: boolean;
220
216
  modelUuid?: string;
221
217
  model?: string;
218
+ abilityUuid?: string;
219
+ ability?: string;
222
220
  categoryName?: string;
223
221
  confidenceThreshold?: number;
224
222
  targetFps?: string;
223
+ params?: {
224
+ [index: string]: any;
225
+ };
225
226
  }
226
227
  interface TracingComponent extends BaseComponent {
227
228
  reidModelUuid?: string;
@@ -254,6 +255,12 @@ interface Pop {
254
255
  components: PopComponent[];
255
256
  postTransform?: string;
256
257
  }
258
+ interface ComponentParams {
259
+ componentId: number;
260
+ values: {
261
+ [index: string]: any;
262
+ };
263
+ }
257
264
 
258
265
  interface Auth0Options {
259
266
  domain: string;
@@ -469,7 +476,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
469
476
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
470
477
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
471
478
  liveEgress(ingressId: string): Promise<LiveMedia>;
472
- process(source: Source, params?: SourceParams): Promise<ResultStream>;
479
+ process(source: Source, params?: ComponentParams[]): Promise<ResultStream>;
473
480
  private startIngressWs;
474
481
  private uploadFile;
475
482
  private uploadStream;
@@ -882,13 +889,13 @@ declare function readableStreamFromString(s: string): ReadableStream<Uint8Array>
882
889
 
883
890
  declare class AbstractJob implements ResultStream {
884
891
  protected _getSession: () => Promise<WorkerSession>;
885
- protected _params: SourceParams | null;
892
+ protected _params: ComponentParams[] | null;
886
893
  protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
887
894
  protected _controller: AbortController;
888
895
  protected _client: HttpClient;
889
896
  protected _requestLogger: Logger;
890
897
  [Symbol.asyncIterator](): AsyncIterator<Prediction>;
891
- protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
898
+ protected constructor(params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
892
899
  protected startJob(): Promise<Response>;
893
900
  protected onEvent(event: StreamEvent): Promise<void>;
894
901
  static n: number;
@@ -902,19 +909,19 @@ declare class UploadJob extends AbstractJob {
902
909
  private readonly _needsFullDuplex;
903
910
  private readonly _videoMode;
904
911
  get [Symbol.toStringTag](): string;
905
- constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
912
+ constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
906
913
  protected onEvent(event: StreamEvent): Promise<void>;
907
914
  protected startJob(): Promise<Response>;
908
915
  }
909
916
  declare class LoadFromJob extends AbstractJob {
910
917
  private readonly _location;
911
- constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
918
+ constructor(location: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
912
919
  get [Symbol.toStringTag](): string;
913
920
  protected startJob(): Promise<Response>;
914
921
  }
915
922
  declare class LoadLiveIngressJob extends AbstractJob {
916
923
  private readonly _ingressId;
917
- constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
924
+ constructor(ingressId: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
918
925
  get [Symbol.toStringTag](): string;
919
926
  protected startJob(): Promise<Response>;
920
927
  }
@@ -935,7 +942,7 @@ declare abstract class WebrtcBase {
935
942
  protected _eTag: string;
936
943
  protected _queuedCandidates: RTCIceCandidate[];
937
944
  protected _offerData: OfferData | null;
938
- constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
945
+ protected constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
939
946
  close(): Promise<void>;
940
947
  ingressId(): string;
941
948
  protected gresUrl(session: WorkerSession, location?: string | null): URL;
@@ -982,4 +989,4 @@ declare namespace EyePop {
982
989
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
983
990
  }
984
991
 
985
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
992
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type IngressEvent, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
@@ -8905,6 +8905,8 @@ var ModelFormat = /* @__PURE__ */ ((ModelFormat2) => {
8905
8905
  ModelFormat2["TorchScript"] = "TorchScript";
8906
8906
  ModelFormat2["TorchScriptCpu"] = "TorchScriptCpu";
8907
8907
  ModelFormat2["TorchScriptCuda"] = "TorchScriptCuda";
8908
+ ModelFormat2["PyTorch"] = "PyTorch";
8909
+ ModelFormat2["ModelLess"] = "ModelLess";
8908
8910
  return ModelFormat2;
8909
8911
  })(ModelFormat || {});
8910
8912
  var ModelPrecisionType = /* @__PURE__ */ ((ModelPrecisionType2) => {
@@ -9322,7 +9324,6 @@ var WebrtcBase = class _WebrtcBase {
9322
9324
  if (!this._offerData) {
9323
9325
  throw new Error("sendLocalCandidates no offerData");
9324
9326
  }
9325
- let urlPath = void 0;
9326
9327
  const session = await this._getSession();
9327
9328
  const ingressUrl = this.gresUrl(session, this._location);
9328
9329
  const headers = {