@eyepop.ai/eyepop 1.16.0 → 1.17.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.
@@ -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,10 +211,12 @@ 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;
@@ -254,6 +252,12 @@ interface Pop {
254
252
  components: PopComponent[];
255
253
  postTransform?: string;
256
254
  }
255
+ interface ComponentParams {
256
+ componentId: number;
257
+ values: {
258
+ [index: string]: any;
259
+ };
260
+ }
257
261
 
258
262
  interface Auth0Options {
259
263
  domain: string;
@@ -469,7 +473,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
469
473
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
470
474
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
471
475
  liveEgress(ingressId: string): Promise<LiveMedia>;
472
- process(source: Source, params?: SourceParams): Promise<ResultStream>;
476
+ process(source: Source, params?: ComponentParams[]): Promise<ResultStream>;
473
477
  private startIngressWs;
474
478
  private uploadFile;
475
479
  private uploadStream;
@@ -882,13 +886,13 @@ declare function readableStreamFromString(s: string): ReadableStream<Uint8Array>
882
886
 
883
887
  declare class AbstractJob implements ResultStream {
884
888
  protected _getSession: () => Promise<WorkerSession>;
885
- protected _params: SourceParams | null;
889
+ protected _params: ComponentParams[] | null;
886
890
  protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
887
891
  protected _controller: AbortController;
888
892
  protected _client: HttpClient;
889
893
  protected _requestLogger: Logger;
890
894
  [Symbol.asyncIterator](): AsyncIterator<Prediction>;
891
- protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
895
+ protected constructor(params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
892
896
  protected startJob(): Promise<Response>;
893
897
  protected onEvent(event: StreamEvent): Promise<void>;
894
898
  static n: number;
@@ -902,19 +906,19 @@ declare class UploadJob extends AbstractJob {
902
906
  private readonly _needsFullDuplex;
903
907
  private readonly _videoMode;
904
908
  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);
909
+ 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
910
  protected onEvent(event: StreamEvent): Promise<void>;
907
911
  protected startJob(): Promise<Response>;
908
912
  }
909
913
  declare class LoadFromJob extends AbstractJob {
910
914
  private readonly _location;
911
- constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
915
+ constructor(location: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
912
916
  get [Symbol.toStringTag](): string;
913
917
  protected startJob(): Promise<Response>;
914
918
  }
915
919
  declare class LoadLiveIngressJob extends AbstractJob {
916
920
  private readonly _ingressId;
917
- constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
921
+ constructor(ingressId: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
918
922
  get [Symbol.toStringTag](): string;
919
923
  protected startJob(): Promise<Response>;
920
924
  }
@@ -935,7 +939,7 @@ declare abstract class WebrtcBase {
935
939
  protected _eTag: string;
936
940
  protected _queuedCandidates: RTCIceCandidate[];
937
941
  protected _offerData: OfferData | null;
938
- constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
942
+ protected constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
939
943
  close(): Promise<void>;
940
944
  ingressId(): string;
941
945
  protected gresUrl(session: WorkerSession, location?: string | null): URL;
@@ -982,4 +986,4 @@ declare namespace EyePop {
982
986
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
983
987
  }
984
988
 
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 };
989
+ 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,10 +211,12 @@ 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;
@@ -254,6 +252,12 @@ interface Pop {
254
252
  components: PopComponent[];
255
253
  postTransform?: string;
256
254
  }
255
+ interface ComponentParams {
256
+ componentId: number;
257
+ values: {
258
+ [index: string]: any;
259
+ };
260
+ }
257
261
 
258
262
  interface Auth0Options {
259
263
  domain: string;
@@ -469,7 +473,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
469
473
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
470
474
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
471
475
  liveEgress(ingressId: string): Promise<LiveMedia>;
472
- process(source: Source, params?: SourceParams): Promise<ResultStream>;
476
+ process(source: Source, params?: ComponentParams[]): Promise<ResultStream>;
473
477
  private startIngressWs;
474
478
  private uploadFile;
475
479
  private uploadStream;
@@ -882,13 +886,13 @@ declare function readableStreamFromString(s: string): ReadableStream<Uint8Array>
882
886
 
883
887
  declare class AbstractJob implements ResultStream {
884
888
  protected _getSession: () => Promise<WorkerSession>;
885
- protected _params: SourceParams | null;
889
+ protected _params: ComponentParams[] | null;
886
890
  protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
887
891
  protected _controller: AbortController;
888
892
  protected _client: HttpClient;
889
893
  protected _requestLogger: Logger;
890
894
  [Symbol.asyncIterator](): AsyncIterator<Prediction>;
891
- protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
895
+ protected constructor(params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
892
896
  protected startJob(): Promise<Response>;
893
897
  protected onEvent(event: StreamEvent): Promise<void>;
894
898
  static n: number;
@@ -902,19 +906,19 @@ declare class UploadJob extends AbstractJob {
902
906
  private readonly _needsFullDuplex;
903
907
  private readonly _videoMode;
904
908
  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);
909
+ 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
910
  protected onEvent(event: StreamEvent): Promise<void>;
907
911
  protected startJob(): Promise<Response>;
908
912
  }
909
913
  declare class LoadFromJob extends AbstractJob {
910
914
  private readonly _location;
911
- constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
915
+ constructor(location: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
912
916
  get [Symbol.toStringTag](): string;
913
917
  protected startJob(): Promise<Response>;
914
918
  }
915
919
  declare class LoadLiveIngressJob extends AbstractJob {
916
920
  private readonly _ingressId;
917
- constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
921
+ constructor(ingressId: string, params: ComponentParams[] | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
918
922
  get [Symbol.toStringTag](): string;
919
923
  protected startJob(): Promise<Response>;
920
924
  }
@@ -935,7 +939,7 @@ declare abstract class WebrtcBase {
935
939
  protected _eTag: string;
936
940
  protected _queuedCandidates: RTCIceCandidate[];
937
941
  protected _offerData: OfferData | null;
938
- constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
942
+ protected constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
939
943
  close(): Promise<void>;
940
944
  ingressId(): string;
941
945
  protected gresUrl(session: WorkerSession, location?: string | null): URL;
@@ -982,4 +986,4 @@ declare namespace EyePop {
982
986
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
983
987
  }
984
988
 
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 };
989
+ 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 = {