@eyepop.ai/eyepop 1.0.0 → 1.0.2

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.
@@ -451,19 +451,27 @@ interface DataSession extends Session {
451
451
  readonly accountId: string;
452
452
  readonly baseUrl: string | undefined;
453
453
  }
454
+ interface DatasetVersionAssetStats {
455
+ total?: number;
456
+ annotated?: number;
457
+ auto_annotated?: number;
458
+ auto_annotated_approved?: number;
459
+ ground_truth_annotated?: number;
460
+ }
454
461
  interface DatasetVersion {
455
462
  version: number;
456
463
  modifiable: boolean;
457
464
  created_at: Date;
458
465
  updated_at: Date;
459
- asset_count: number;
460
466
  hero_asset_uuid?: string;
467
+ asset_stats?: DatasetVersionAssetStats;
461
468
  }
462
469
  interface Dataset {
463
470
  uuid: string;
464
471
  name: string;
465
472
  description?: string;
466
473
  auto_annotates: string[];
474
+ auto_annotate_params?: AutoAnnotateParams;
467
475
  tags: string[];
468
476
  account_uuid: string;
469
477
  created_at: Date;
@@ -475,12 +483,14 @@ interface DatasetCreate {
475
483
  description?: string;
476
484
  tags?: string[];
477
485
  auto_annotates?: string[];
486
+ auto_annotate_params?: AutoAnnotateParams;
478
487
  }
479
488
  interface DatasetUpdate {
480
489
  name: string;
481
490
  description?: string;
482
491
  tags?: string[];
483
492
  auto_annotates?: string[];
493
+ auto_annotate_params?: AutoAnnotateParams;
484
494
  }
485
495
  declare enum AssetStatus {
486
496
  rejected = "rejected",
@@ -500,10 +510,16 @@ declare enum UserReview {
500
510
  rejected = "rejected",
501
511
  unknown = "unknown"
502
512
  }
513
+ interface AutoAnnotateParams {
514
+ candidate_labels?: string[];
515
+ prompt?: string;
516
+ confidence_threshold?: number;
517
+ }
503
518
  interface Annotation {
504
519
  type: AnnotationType;
505
520
  user_review: UserReview;
506
521
  auto_annotate?: string;
522
+ auto_annotate_params?: AutoAnnotateParams;
507
523
  uncertainty_score?: number;
508
524
  annotation: Prediction;
509
525
  }
@@ -612,6 +628,7 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
612
628
  updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, prediction?: Prediction$1): Promise<void>;
613
629
  updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview): Promise<void>;
614
630
  downloadAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode): Promise<Blob>;
631
+ previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
615
632
  listModels(): Promise<Model[]>;
616
633
  createModel(dataset_uuid: string, dataset_version: number, data: ModelCreate): Promise<Model>;
617
634
  getModel(model_uuid: string): Promise<Model>;
@@ -746,4 +763,4 @@ declare namespace EyePop {
746
763
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
747
764
  }
748
765
 
749
- export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
766
+ export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -451,19 +451,27 @@ interface DataSession extends Session {
451
451
  readonly accountId: string;
452
452
  readonly baseUrl: string | undefined;
453
453
  }
454
+ interface DatasetVersionAssetStats {
455
+ total?: number;
456
+ annotated?: number;
457
+ auto_annotated?: number;
458
+ auto_annotated_approved?: number;
459
+ ground_truth_annotated?: number;
460
+ }
454
461
  interface DatasetVersion {
455
462
  version: number;
456
463
  modifiable: boolean;
457
464
  created_at: Date;
458
465
  updated_at: Date;
459
- asset_count: number;
460
466
  hero_asset_uuid?: string;
467
+ asset_stats?: DatasetVersionAssetStats;
461
468
  }
462
469
  interface Dataset {
463
470
  uuid: string;
464
471
  name: string;
465
472
  description?: string;
466
473
  auto_annotates: string[];
474
+ auto_annotate_params?: AutoAnnotateParams;
467
475
  tags: string[];
468
476
  account_uuid: string;
469
477
  created_at: Date;
@@ -475,12 +483,14 @@ interface DatasetCreate {
475
483
  description?: string;
476
484
  tags?: string[];
477
485
  auto_annotates?: string[];
486
+ auto_annotate_params?: AutoAnnotateParams;
478
487
  }
479
488
  interface DatasetUpdate {
480
489
  name: string;
481
490
  description?: string;
482
491
  tags?: string[];
483
492
  auto_annotates?: string[];
493
+ auto_annotate_params?: AutoAnnotateParams;
484
494
  }
485
495
  declare enum AssetStatus {
486
496
  rejected = "rejected",
@@ -500,10 +510,16 @@ declare enum UserReview {
500
510
  rejected = "rejected",
501
511
  unknown = "unknown"
502
512
  }
513
+ interface AutoAnnotateParams {
514
+ candidate_labels?: string[];
515
+ prompt?: string;
516
+ confidence_threshold?: number;
517
+ }
503
518
  interface Annotation {
504
519
  type: AnnotationType;
505
520
  user_review: UserReview;
506
521
  auto_annotate?: string;
522
+ auto_annotate_params?: AutoAnnotateParams;
507
523
  uncertainty_score?: number;
508
524
  annotation: Prediction;
509
525
  }
@@ -612,6 +628,7 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
612
628
  updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, prediction?: Prediction$1): Promise<void>;
613
629
  updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview): Promise<void>;
614
630
  downloadAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode): Promise<Blob>;
631
+ previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
615
632
  listModels(): Promise<Model[]>;
616
633
  createModel(dataset_uuid: string, dataset_version: number, data: ModelCreate): Promise<Model>;
617
634
  getModel(model_uuid: string): Promise<Model>;
@@ -746,4 +763,4 @@ declare namespace EyePop {
746
763
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
747
764
  }
748
765
 
749
- export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
766
+ export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -10940,7 +10940,7 @@ var DataEndpoint = class extends Endpoint {
10940
10940
  const client = this._client;
10941
10941
  const baseUrl = this._baseUrl;
10942
10942
  if (!baseUrl || !client) {
10943
- return Promise.reject("endpoint not connected, use connect() before changePopComp()");
10943
+ return Promise.reject("endpoint not connected");
10944
10944
  }
10945
10945
  let response = await this.fetchWithRetry(async () => {
10946
10946
  const session = await this.session();
@@ -11082,6 +11082,12 @@ var DataEndpoint = class extends Endpoint {
11082
11082
  method: "GET"
11083
11083
  });
11084
11084
  }
11085
+ async previewAutoAnnotateAsset(asset_uuid, auto_annotate, auto_annotate_params) {
11086
+ return this.request(`/assets/${asset_uuid}/preview_auto_annotate?auto_annotate=${auto_annotate}`, {
11087
+ method: "POST",
11088
+ body: auto_annotate_params ? JSON.stringify(auto_annotate_params) : null
11089
+ });
11090
+ }
11085
11091
  // Model methods
11086
11092
  async listModels() {
11087
11093
  return this.request(`/models?account_uuid=${this._accountId}`, {