@eyepop.ai/eyepop 3.7.2 → 3.9.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.
@@ -67,16 +67,16 @@ interface Prediction extends StreamTime {
67
67
  keyPoints?: Array<PredictedKeyPoints>;
68
68
  }
69
69
  interface PredictedClass {
70
- id: number;
70
+ id?: number;
71
71
  confidence: number;
72
72
  classLabel: string;
73
- category: string;
73
+ category?: string;
74
74
  }
75
75
  interface PredictedText {
76
- id: number;
76
+ id?: number;
77
77
  confidence: number;
78
78
  text: string;
79
- category: string;
79
+ category?: string;
80
80
  }
81
81
  interface Contour {
82
82
  points: Array<Point2d>;
@@ -94,7 +94,7 @@ interface PredictedObject extends PredictedClass {
94
94
  y: number;
95
95
  width: number;
96
96
  height: number;
97
- orientation: number;
97
+ orientation?: number;
98
98
  outline: Array<Point2d> | undefined;
99
99
  contours: Array<Contour> | undefined;
100
100
  mask: Mask | undefined;
@@ -500,10 +500,16 @@ interface DataOptions extends Options {
500
500
  useCookie?: boolean | undefined;
501
501
  }
502
502
 
503
+ declare enum DataApiType {
504
+ dataset = "dataset",
505
+ vlm = "vlm"
506
+ }
503
507
  interface DataSession extends Session {
504
508
  readonly accountId: string;
505
- readonly baseUrl: string | undefined;
509
+ readonly datasetApiUrl: string | undefined;
510
+ readonly vlmApiUrl: string | undefined;
506
511
  }
512
+ declare function getBaseUrl(session: DataSession, dataApiType: DataApiType): string;
507
513
  interface DatasetVersionAssetStats {
508
514
  total?: number;
509
515
  accepted?: number;
@@ -562,6 +568,39 @@ interface DatasetUpdate {
562
568
  interface DatasetHeroAssetUpdate {
563
569
  uuid: string;
564
570
  }
571
+ declare enum AutoAnnotateStatus {
572
+ error = "error",
573
+ requested = "requested",
574
+ in_progress = "in_progress",
575
+ completed = "completed"
576
+ }
577
+ interface DatasetAutoAnnotateCreate {
578
+ auto_annotate: string;
579
+ auto_annotate_params?: Map<string, any>;
580
+ source_model_uuid?: string;
581
+ status?: AutoAnnotateStatus;
582
+ status_message?: string;
583
+ source?: string;
584
+ metrics?: Map<string, any>;
585
+ }
586
+ interface DatasetAutoAnnotateUpdate {
587
+ status?: AutoAnnotateStatus;
588
+ status_message?: string;
589
+ metrics?: Map<string, any>;
590
+ }
591
+ interface DatasetAutoAnnotate {
592
+ created_at?: Date;
593
+ updated_at?: Date;
594
+ dataset_uuid: string;
595
+ dataset_version: number;
596
+ source_model_uuid?: string;
597
+ auto_annotate?: string;
598
+ auto_annotate_params?: Map<string, any>;
599
+ status?: AutoAnnotateStatus;
600
+ status_message?: string;
601
+ source?: string;
602
+ metrics?: Map<string, any>;
603
+ }
565
604
  interface AssetImport {
566
605
  url: string;
567
606
  ground_truth?: Prediction;
@@ -605,9 +644,8 @@ interface Annotation {
605
644
  type: AnnotationType;
606
645
  user_review: UserReview;
607
646
  approved_threshold?: number;
608
- source_model_uuid?: string;
609
647
  auto_annotate?: string;
610
- auto_annotate_params?: AutoAnnotateParams;
648
+ source?: string;
611
649
  uncertainty_score?: number;
612
650
  predictions: Prediction[];
613
651
  }
@@ -640,7 +678,9 @@ interface Asset {
640
678
  annotations: Annotation[];
641
679
  }
642
680
  declare enum ModelType {
643
- epdet_b1 = "epdet_b1"
681
+ epdet_b1 = "epdet_b1",
682
+ imported = "imported",
683
+ vlm_ability = "vlm_ability"
644
684
  }
645
685
  declare enum ModelTask {
646
686
  object_detection = "object_detection",
@@ -831,9 +871,165 @@ interface DownloadResponse {
831
871
  url: string;
832
872
  url_type: AssetUrlType;
833
873
  }
874
+ /** Experimental VLM API */
875
+ interface InferRuntimeConfig {
876
+ max_new_tokens?: number;
877
+ image_size?: number;
878
+ fps?: number;
879
+ max_frames?: number;
880
+ min_frames?: number;
881
+ max_aspect_ratio?: number;
882
+ context_length?: number;
883
+ }
884
+ interface TransformInto {
885
+ classes?: string[];
886
+ }
887
+ interface InferRequest {
888
+ worker_release?: string;
889
+ text_prompt?: string;
890
+ config: InferRuntimeConfig;
891
+ refresh?: boolean;
892
+ transform_into?: TransformInto;
893
+ }
894
+ interface EvaluateFilter {
895
+ partitions?: string[];
896
+ ground_truth_classes?: string[];
897
+ }
898
+ interface EvaluateRequest {
899
+ ability_uuid?: string;
900
+ infer?: InferRequest;
901
+ dataset_uuid: string;
902
+ filter?: EvaluateFilter;
903
+ video_chunk_length_ns?: number;
904
+ video_chunk_overlap?: number;
905
+ }
906
+ declare enum EvaluationStatus {
907
+ success = "success",
908
+ failed = "failed"
909
+ }
910
+ interface EvaluateRunInfo {
911
+ num_images: number;
912
+ num_ground_truth_images: number;
913
+ num_videos: number;
914
+ num_ground_truth_videos: number;
915
+ total_tokens: number;
916
+ visual_tokens: number;
917
+ text_tokens: number;
918
+ output_tokens: number;
919
+ }
920
+ interface EvaluateResponse {
921
+ dataset_uuid: string;
922
+ dataset_version: number;
923
+ status: EvaluationStatus;
924
+ status_message?: string;
925
+ source: string;
926
+ metrics?: Map<string, any>;
927
+ run_info: EvaluateRunInfo;
928
+ }
929
+ interface InferRunInfo {
930
+ fps?: number;
931
+ image_size?: number;
932
+ total_tokens?: number;
933
+ visual_tokens?: number;
934
+ text_tokens?: number;
935
+ output_tokens?: number;
936
+ aspect_ratio?: number;
937
+ }
938
+ declare enum VlmAbilityStatus {
939
+ draft = "draft",
940
+ published = "published"
941
+ }
942
+ interface AbilityAliasEntry {
943
+ alias: string;
944
+ tag: string;
945
+ }
946
+ interface VlmAbilityCreate {
947
+ name: string;
948
+ description: string;
949
+ worker_release: string;
950
+ text_prompt: string;
951
+ transform_into: TransformInto;
952
+ config: InferRuntimeConfig;
953
+ is_public: boolean;
954
+ }
955
+ interface VlmAbilityUpdate {
956
+ name?: string;
957
+ description?: string;
958
+ worker_release?: string;
959
+ text_prompt?: string;
960
+ transform_into?: TransformInto;
961
+ config?: InferRuntimeConfig;
962
+ is_public?: boolean;
963
+ }
964
+ interface VlmAbility {
965
+ uuid: string;
966
+ created_at?: Date;
967
+ updated_at?: Date;
968
+ account_uuid: string;
969
+ status: VlmAbilityStatus;
970
+ is_public: boolean;
971
+ name: string;
972
+ description: string;
973
+ vlm_ability_group_uuid?: string;
974
+ worker_release: string;
975
+ text_prompt: string;
976
+ transform_into: TransformInto;
977
+ config: InferRuntimeConfig;
978
+ alias_entries?: AbilityAliasEntry[];
979
+ }
980
+ interface VlmAbilityGroupCreate {
981
+ name: string;
982
+ description: string;
983
+ default_alias_name?: string;
984
+ default_dataset_uuid?: string;
985
+ }
986
+ interface VlmAbilityGroupUpdate {
987
+ name: string;
988
+ description: string;
989
+ default_alias_name?: string;
990
+ default_dataset_uuid?: string;
991
+ }
992
+ interface VlmAbilityGroup {
993
+ uuid: string;
994
+ created_at?: Date;
995
+ updated_at?: Date;
996
+ account_uuid: string;
997
+ name: string;
998
+ description: string;
999
+ default_alias_name?: string;
1000
+ default_dataset_uuid?: string;
1001
+ }
1002
+
1003
+ type VlmFetch = (path: string, options: RequestInit) => Promise<any>;
1004
+ declare class InferAssetJob implements ResultStream {
1005
+ protected _vlmFetch: VlmFetch;
1006
+ protected _assetUrl: string;
1007
+ protected _inferRequest: InferRequest;
1008
+ protected _response: Promise<Prediction[]> | null;
1009
+ protected _runInfo: InferRunInfo | null;
1010
+ protected _controller: AbortController;
1011
+ protected _requestLogger: Logger;
1012
+ [Symbol.asyncIterator](): AsyncIterator<Prediction>;
1013
+ constructor(assetUrl: string, inferRequest: InferRequest, vlmFetch: VlmFetch, requestLogger: Logger);
1014
+ start(done: () => void): InferAssetJob;
1015
+ cancel(): void;
1016
+ }
1017
+ declare class EvaluateDatasetJob {
1018
+ protected _vlmFetch: VlmFetch;
1019
+ protected _evaluateRequest: EvaluateRequest;
1020
+ protected _workerRelease: string | null;
1021
+ protected _response: Promise<EvaluateResponse> | null;
1022
+ protected _controller: AbortController;
1023
+ protected _requestLogger: Logger;
1024
+ response(): Promise<EvaluateResponse>;
1025
+ constructor(evaluateRequest: EvaluateRequest, workerRelease: string | null, vlmFetch: VlmFetch, requestLogger: Logger);
1026
+ start(done: () => void): EvaluateDatasetJob;
1027
+ cancel(): void;
1028
+ }
834
1029
 
835
1030
  declare class DataEndpoint extends Endpoint<DataEndpoint> {
836
- private _baseUrl;
1031
+ private datasetApiUrl;
1032
+ private vlmApiUrl;
837
1033
  private _accountId;
838
1034
  private _ws;
839
1035
  private _ws_current_reconnect_delay;
@@ -857,6 +1053,9 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
857
1053
  autoAnnotateDatasetVersion(dataset_uuid: string, dataset_version?: number, max_assets?: number): Promise<void>;
858
1054
  deleteDatasetVersion(dataset_uuid: string, dataset_version: number): Promise<Dataset>;
859
1055
  deleteAnnotations(dataset_uuid: string, dataset_version: number, user_reviews?: UserReview[]): Promise<void>;
1056
+ createDatasetAutoAnnotate(create: DatasetAutoAnnotateCreate, dataset_uuid: string, dataset_version?: number): Promise<void>;
1057
+ updateDatasetAutoAnnotate(update: DatasetAutoAnnotateUpdate, dataset_uuid: string, auto_annotate: string, source: string, dataset_version?: number): Promise<void>;
1058
+ listDatasetAutoAnnotates(dataset_uuid: string, auto_annotate?: string, source?: string, dataset_version?: number): Promise<DatasetAutoAnnotate[]>;
860
1059
  uploadAsset(dataset_uuid: string, dataset_version: number | undefined, blob: Blob, external_id?: string | undefined): Promise<Asset>;
861
1060
  importAsset(dataset_uuid: string, dataset_version: number | undefined, asset_import: AssetImport, external_id?: string | undefined): Promise<Asset>;
862
1061
  listAssets(dataset_uuid: string, dataset_version?: number, include_annotations?: boolean, top_k?: number): Promise<Asset[]>;
@@ -866,6 +1065,8 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
866
1065
  updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, predictions?: Prediction[]): Promise<void>;
867
1066
  deleteAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
868
1067
  updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview, approved_threshold?: number): Promise<void>;
1068
+ addAssetAnnotation(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, predictions?: Prediction[], auto_annotate?: string, source?: string, user_review?: UserReview, approved_threshold?: number): Promise<void>;
1069
+ updateAssetAnnotationApproval(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, auto_annotate?: string, source?: string, user_review?: UserReview, approved_threshold?: number): Promise<void>;
869
1070
  downloadAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode, start_timestamp?: number, end_timestamp?: number, url_type?: AssetUrlType): Promise<Blob | DownloadResponse>;
870
1071
  previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
871
1072
  listModels(): Promise<Model[]>;
@@ -887,7 +1088,23 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
887
1088
  startWorkflow(account_uuid: string, template_name: string, workflow: CreateWorkflow): Promise<Workflow>;
888
1089
  getWorkflow(workflow_id: string, account_uuid: string): Promise<ListWorkFlowItem>;
889
1090
  listWorkflows(account_uuid: string, dataset_uuids?: string[], model_uuids?: string[], phases?: WorkflowPhase[]): Promise<ListWorkFlowItem[]>;
1091
+ inferAsset(asset_uuid: string, infer_request: InferRequest, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode, start_timestamp?: number, end_timestamp?: number): Promise<InferAssetJob>;
1092
+ evaluateDataset(evaluate_request: EvaluateRequest, worker_release?: string): Promise<EvaluateDatasetJob>;
1093
+ private jobDone;
890
1094
  private dispatchChangeEvent;
1095
+ listVlmAbilityGroups(): Promise<VlmAbilityGroup[]>;
1096
+ createVlmAbilityGroup(create: VlmAbilityGroupCreate): Promise<VlmAbilityGroup>;
1097
+ getVlmAbilityGroup(vlm_ability_group_uuid: string): Promise<VlmAbilityGroup>;
1098
+ deleteVlmAbilityGroup(vlm_ability_group_uuid: string): Promise<void>;
1099
+ updateVlmAbilityGroup(vlm_ability_group_uuid: string, update: VlmAbilityGroupUpdate): Promise<VlmAbilityGroup>;
1100
+ listVlmAbilities(): Promise<VlmAbility[]>;
1101
+ createVlmAbility(create: VlmAbilityCreate, vlm_ability_group_uuid?: string): Promise<VlmAbility>;
1102
+ getVlmAbility(vlm_ability_uuid: string): Promise<VlmAbility>;
1103
+ deleteVlmAbility(vlm_ability_uuid: string): Promise<void>;
1104
+ updateVlmAbility(vlm_ability_uuid: string, update: VlmAbilityUpdate): Promise<VlmAbility>;
1105
+ publishVlmAbility(vlm_ability_uuid: string, alias_name?: string, tag_name?: string): Promise<VlmAbility>;
1106
+ addVlmAbilityAlias(vlm_ability_uuid: string, alias_name: string, tag_name?: string): Promise<VlmAbility>;
1107
+ removeVlmAbilityAlias(vlm_ability_uuid: string, alias_name: string, tag_name: string): Promise<VlmAbility>;
891
1108
  }
892
1109
 
893
1110
  type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
@@ -1043,4 +1260,4 @@ declare namespace EyePop {
1043
1260
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1044
1261
  }
1045
1262
 
1046
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, AssetUrlType, type AssetUuidSource, 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, DEFAULT_PREDICTION_VERSION, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type DownloadResponse, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromJob, LoadLiveIngressJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, MotionModel, 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, PredictionVersion, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, type TrackingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
1263
+ export { type AbilityAliasEntry, AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DEFAULT_PREDICTION_VERSION, DataApiType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetAutoAnnotate, type DatasetAutoAnnotateCreate, type DatasetAutoAnnotateUpdate, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type DownloadResponse, Endpoint, EndpointState, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromJob, LoadLiveIngressJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, MotionModel, 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, PredictionVersion, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, type VlmAbility, type VlmAbilityCreate, type VlmAbilityGroup, type VlmAbilityGroupCreate, type VlmAbilityGroupUpdate, VlmAbilityStatus, type VlmAbilityUpdate, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, getBaseUrl, readableStreamFromString };
@@ -67,16 +67,16 @@ interface Prediction extends StreamTime {
67
67
  keyPoints?: Array<PredictedKeyPoints>;
68
68
  }
69
69
  interface PredictedClass {
70
- id: number;
70
+ id?: number;
71
71
  confidence: number;
72
72
  classLabel: string;
73
- category: string;
73
+ category?: string;
74
74
  }
75
75
  interface PredictedText {
76
- id: number;
76
+ id?: number;
77
77
  confidence: number;
78
78
  text: string;
79
- category: string;
79
+ category?: string;
80
80
  }
81
81
  interface Contour {
82
82
  points: Array<Point2d>;
@@ -94,7 +94,7 @@ interface PredictedObject extends PredictedClass {
94
94
  y: number;
95
95
  width: number;
96
96
  height: number;
97
- orientation: number;
97
+ orientation?: number;
98
98
  outline: Array<Point2d> | undefined;
99
99
  contours: Array<Contour> | undefined;
100
100
  mask: Mask | undefined;
@@ -500,10 +500,16 @@ interface DataOptions extends Options {
500
500
  useCookie?: boolean | undefined;
501
501
  }
502
502
 
503
+ declare enum DataApiType {
504
+ dataset = "dataset",
505
+ vlm = "vlm"
506
+ }
503
507
  interface DataSession extends Session {
504
508
  readonly accountId: string;
505
- readonly baseUrl: string | undefined;
509
+ readonly datasetApiUrl: string | undefined;
510
+ readonly vlmApiUrl: string | undefined;
506
511
  }
512
+ declare function getBaseUrl(session: DataSession, dataApiType: DataApiType): string;
507
513
  interface DatasetVersionAssetStats {
508
514
  total?: number;
509
515
  accepted?: number;
@@ -562,6 +568,39 @@ interface DatasetUpdate {
562
568
  interface DatasetHeroAssetUpdate {
563
569
  uuid: string;
564
570
  }
571
+ declare enum AutoAnnotateStatus {
572
+ error = "error",
573
+ requested = "requested",
574
+ in_progress = "in_progress",
575
+ completed = "completed"
576
+ }
577
+ interface DatasetAutoAnnotateCreate {
578
+ auto_annotate: string;
579
+ auto_annotate_params?: Map<string, any>;
580
+ source_model_uuid?: string;
581
+ status?: AutoAnnotateStatus;
582
+ status_message?: string;
583
+ source?: string;
584
+ metrics?: Map<string, any>;
585
+ }
586
+ interface DatasetAutoAnnotateUpdate {
587
+ status?: AutoAnnotateStatus;
588
+ status_message?: string;
589
+ metrics?: Map<string, any>;
590
+ }
591
+ interface DatasetAutoAnnotate {
592
+ created_at?: Date;
593
+ updated_at?: Date;
594
+ dataset_uuid: string;
595
+ dataset_version: number;
596
+ source_model_uuid?: string;
597
+ auto_annotate?: string;
598
+ auto_annotate_params?: Map<string, any>;
599
+ status?: AutoAnnotateStatus;
600
+ status_message?: string;
601
+ source?: string;
602
+ metrics?: Map<string, any>;
603
+ }
565
604
  interface AssetImport {
566
605
  url: string;
567
606
  ground_truth?: Prediction;
@@ -605,9 +644,8 @@ interface Annotation {
605
644
  type: AnnotationType;
606
645
  user_review: UserReview;
607
646
  approved_threshold?: number;
608
- source_model_uuid?: string;
609
647
  auto_annotate?: string;
610
- auto_annotate_params?: AutoAnnotateParams;
648
+ source?: string;
611
649
  uncertainty_score?: number;
612
650
  predictions: Prediction[];
613
651
  }
@@ -640,7 +678,9 @@ interface Asset {
640
678
  annotations: Annotation[];
641
679
  }
642
680
  declare enum ModelType {
643
- epdet_b1 = "epdet_b1"
681
+ epdet_b1 = "epdet_b1",
682
+ imported = "imported",
683
+ vlm_ability = "vlm_ability"
644
684
  }
645
685
  declare enum ModelTask {
646
686
  object_detection = "object_detection",
@@ -831,9 +871,165 @@ interface DownloadResponse {
831
871
  url: string;
832
872
  url_type: AssetUrlType;
833
873
  }
874
+ /** Experimental VLM API */
875
+ interface InferRuntimeConfig {
876
+ max_new_tokens?: number;
877
+ image_size?: number;
878
+ fps?: number;
879
+ max_frames?: number;
880
+ min_frames?: number;
881
+ max_aspect_ratio?: number;
882
+ context_length?: number;
883
+ }
884
+ interface TransformInto {
885
+ classes?: string[];
886
+ }
887
+ interface InferRequest {
888
+ worker_release?: string;
889
+ text_prompt?: string;
890
+ config: InferRuntimeConfig;
891
+ refresh?: boolean;
892
+ transform_into?: TransformInto;
893
+ }
894
+ interface EvaluateFilter {
895
+ partitions?: string[];
896
+ ground_truth_classes?: string[];
897
+ }
898
+ interface EvaluateRequest {
899
+ ability_uuid?: string;
900
+ infer?: InferRequest;
901
+ dataset_uuid: string;
902
+ filter?: EvaluateFilter;
903
+ video_chunk_length_ns?: number;
904
+ video_chunk_overlap?: number;
905
+ }
906
+ declare enum EvaluationStatus {
907
+ success = "success",
908
+ failed = "failed"
909
+ }
910
+ interface EvaluateRunInfo {
911
+ num_images: number;
912
+ num_ground_truth_images: number;
913
+ num_videos: number;
914
+ num_ground_truth_videos: number;
915
+ total_tokens: number;
916
+ visual_tokens: number;
917
+ text_tokens: number;
918
+ output_tokens: number;
919
+ }
920
+ interface EvaluateResponse {
921
+ dataset_uuid: string;
922
+ dataset_version: number;
923
+ status: EvaluationStatus;
924
+ status_message?: string;
925
+ source: string;
926
+ metrics?: Map<string, any>;
927
+ run_info: EvaluateRunInfo;
928
+ }
929
+ interface InferRunInfo {
930
+ fps?: number;
931
+ image_size?: number;
932
+ total_tokens?: number;
933
+ visual_tokens?: number;
934
+ text_tokens?: number;
935
+ output_tokens?: number;
936
+ aspect_ratio?: number;
937
+ }
938
+ declare enum VlmAbilityStatus {
939
+ draft = "draft",
940
+ published = "published"
941
+ }
942
+ interface AbilityAliasEntry {
943
+ alias: string;
944
+ tag: string;
945
+ }
946
+ interface VlmAbilityCreate {
947
+ name: string;
948
+ description: string;
949
+ worker_release: string;
950
+ text_prompt: string;
951
+ transform_into: TransformInto;
952
+ config: InferRuntimeConfig;
953
+ is_public: boolean;
954
+ }
955
+ interface VlmAbilityUpdate {
956
+ name?: string;
957
+ description?: string;
958
+ worker_release?: string;
959
+ text_prompt?: string;
960
+ transform_into?: TransformInto;
961
+ config?: InferRuntimeConfig;
962
+ is_public?: boolean;
963
+ }
964
+ interface VlmAbility {
965
+ uuid: string;
966
+ created_at?: Date;
967
+ updated_at?: Date;
968
+ account_uuid: string;
969
+ status: VlmAbilityStatus;
970
+ is_public: boolean;
971
+ name: string;
972
+ description: string;
973
+ vlm_ability_group_uuid?: string;
974
+ worker_release: string;
975
+ text_prompt: string;
976
+ transform_into: TransformInto;
977
+ config: InferRuntimeConfig;
978
+ alias_entries?: AbilityAliasEntry[];
979
+ }
980
+ interface VlmAbilityGroupCreate {
981
+ name: string;
982
+ description: string;
983
+ default_alias_name?: string;
984
+ default_dataset_uuid?: string;
985
+ }
986
+ interface VlmAbilityGroupUpdate {
987
+ name: string;
988
+ description: string;
989
+ default_alias_name?: string;
990
+ default_dataset_uuid?: string;
991
+ }
992
+ interface VlmAbilityGroup {
993
+ uuid: string;
994
+ created_at?: Date;
995
+ updated_at?: Date;
996
+ account_uuid: string;
997
+ name: string;
998
+ description: string;
999
+ default_alias_name?: string;
1000
+ default_dataset_uuid?: string;
1001
+ }
1002
+
1003
+ type VlmFetch = (path: string, options: RequestInit) => Promise<any>;
1004
+ declare class InferAssetJob implements ResultStream {
1005
+ protected _vlmFetch: VlmFetch;
1006
+ protected _assetUrl: string;
1007
+ protected _inferRequest: InferRequest;
1008
+ protected _response: Promise<Prediction[]> | null;
1009
+ protected _runInfo: InferRunInfo | null;
1010
+ protected _controller: AbortController;
1011
+ protected _requestLogger: Logger;
1012
+ [Symbol.asyncIterator](): AsyncIterator<Prediction>;
1013
+ constructor(assetUrl: string, inferRequest: InferRequest, vlmFetch: VlmFetch, requestLogger: Logger);
1014
+ start(done: () => void): InferAssetJob;
1015
+ cancel(): void;
1016
+ }
1017
+ declare class EvaluateDatasetJob {
1018
+ protected _vlmFetch: VlmFetch;
1019
+ protected _evaluateRequest: EvaluateRequest;
1020
+ protected _workerRelease: string | null;
1021
+ protected _response: Promise<EvaluateResponse> | null;
1022
+ protected _controller: AbortController;
1023
+ protected _requestLogger: Logger;
1024
+ response(): Promise<EvaluateResponse>;
1025
+ constructor(evaluateRequest: EvaluateRequest, workerRelease: string | null, vlmFetch: VlmFetch, requestLogger: Logger);
1026
+ start(done: () => void): EvaluateDatasetJob;
1027
+ cancel(): void;
1028
+ }
834
1029
 
835
1030
  declare class DataEndpoint extends Endpoint<DataEndpoint> {
836
- private _baseUrl;
1031
+ private datasetApiUrl;
1032
+ private vlmApiUrl;
837
1033
  private _accountId;
838
1034
  private _ws;
839
1035
  private _ws_current_reconnect_delay;
@@ -857,6 +1053,9 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
857
1053
  autoAnnotateDatasetVersion(dataset_uuid: string, dataset_version?: number, max_assets?: number): Promise<void>;
858
1054
  deleteDatasetVersion(dataset_uuid: string, dataset_version: number): Promise<Dataset>;
859
1055
  deleteAnnotations(dataset_uuid: string, dataset_version: number, user_reviews?: UserReview[]): Promise<void>;
1056
+ createDatasetAutoAnnotate(create: DatasetAutoAnnotateCreate, dataset_uuid: string, dataset_version?: number): Promise<void>;
1057
+ updateDatasetAutoAnnotate(update: DatasetAutoAnnotateUpdate, dataset_uuid: string, auto_annotate: string, source: string, dataset_version?: number): Promise<void>;
1058
+ listDatasetAutoAnnotates(dataset_uuid: string, auto_annotate?: string, source?: string, dataset_version?: number): Promise<DatasetAutoAnnotate[]>;
860
1059
  uploadAsset(dataset_uuid: string, dataset_version: number | undefined, blob: Blob, external_id?: string | undefined): Promise<Asset>;
861
1060
  importAsset(dataset_uuid: string, dataset_version: number | undefined, asset_import: AssetImport, external_id?: string | undefined): Promise<Asset>;
862
1061
  listAssets(dataset_uuid: string, dataset_version?: number, include_annotations?: boolean, top_k?: number): Promise<Asset[]>;
@@ -866,6 +1065,8 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
866
1065
  updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, predictions?: Prediction[]): Promise<void>;
867
1066
  deleteAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
868
1067
  updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview, approved_threshold?: number): Promise<void>;
1068
+ addAssetAnnotation(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, predictions?: Prediction[], auto_annotate?: string, source?: string, user_review?: UserReview, approved_threshold?: number): Promise<void>;
1069
+ updateAssetAnnotationApproval(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, auto_annotate?: string, source?: string, user_review?: UserReview, approved_threshold?: number): Promise<void>;
869
1070
  downloadAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode, start_timestamp?: number, end_timestamp?: number, url_type?: AssetUrlType): Promise<Blob | DownloadResponse>;
870
1071
  previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
871
1072
  listModels(): Promise<Model[]>;
@@ -887,7 +1088,23 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
887
1088
  startWorkflow(account_uuid: string, template_name: string, workflow: CreateWorkflow): Promise<Workflow>;
888
1089
  getWorkflow(workflow_id: string, account_uuid: string): Promise<ListWorkFlowItem>;
889
1090
  listWorkflows(account_uuid: string, dataset_uuids?: string[], model_uuids?: string[], phases?: WorkflowPhase[]): Promise<ListWorkFlowItem[]>;
1091
+ inferAsset(asset_uuid: string, infer_request: InferRequest, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode, start_timestamp?: number, end_timestamp?: number): Promise<InferAssetJob>;
1092
+ evaluateDataset(evaluate_request: EvaluateRequest, worker_release?: string): Promise<EvaluateDatasetJob>;
1093
+ private jobDone;
890
1094
  private dispatchChangeEvent;
1095
+ listVlmAbilityGroups(): Promise<VlmAbilityGroup[]>;
1096
+ createVlmAbilityGroup(create: VlmAbilityGroupCreate): Promise<VlmAbilityGroup>;
1097
+ getVlmAbilityGroup(vlm_ability_group_uuid: string): Promise<VlmAbilityGroup>;
1098
+ deleteVlmAbilityGroup(vlm_ability_group_uuid: string): Promise<void>;
1099
+ updateVlmAbilityGroup(vlm_ability_group_uuid: string, update: VlmAbilityGroupUpdate): Promise<VlmAbilityGroup>;
1100
+ listVlmAbilities(): Promise<VlmAbility[]>;
1101
+ createVlmAbility(create: VlmAbilityCreate, vlm_ability_group_uuid?: string): Promise<VlmAbility>;
1102
+ getVlmAbility(vlm_ability_uuid: string): Promise<VlmAbility>;
1103
+ deleteVlmAbility(vlm_ability_uuid: string): Promise<void>;
1104
+ updateVlmAbility(vlm_ability_uuid: string, update: VlmAbilityUpdate): Promise<VlmAbility>;
1105
+ publishVlmAbility(vlm_ability_uuid: string, alias_name?: string, tag_name?: string): Promise<VlmAbility>;
1106
+ addVlmAbilityAlias(vlm_ability_uuid: string, alias_name: string, tag_name?: string): Promise<VlmAbility>;
1107
+ removeVlmAbilityAlias(vlm_ability_uuid: string, alias_name: string, tag_name: string): Promise<VlmAbility>;
891
1108
  }
892
1109
 
893
1110
  type Bytes = string | ArrayBuffer | Uint8Array | Buffer | null | undefined;
@@ -1043,4 +1260,4 @@ declare namespace EyePop {
1043
1260
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
1044
1261
  }
1045
1262
 
1046
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, AssetUrlType, type AssetUuidSource, 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, DEFAULT_PREDICTION_VERSION, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type DownloadResponse, Endpoint, EndpointState, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromJob, LoadLiveIngressJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, MotionModel, 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, PredictionVersion, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, type TrackingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, readableStreamFromString };
1263
+ export { type AbilityAliasEntry, AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type ComponentParams, type Contour, type ContourFinderComponent, ContourType, type CreateWorkflow, type CreateWorkflowConfig, DEFAULT_PREDICTION_VERSION, DataApiType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetAutoAnnotate, type DatasetAutoAnnotateCreate, type DatasetAutoAnnotateUpdate, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, type DownloadResponse, Endpoint, EndpointState, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromJob, LoadLiveIngressJob, LoadMediaStreamJob, type LocalAuth, type Mask, type MediaStreamSource, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, MotionModel, 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, PredictionVersion, type QcAiHubExportParams, type ResultStream, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, Stream, type StreamEvent, type StreamSource, type StreamTime, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, type VlmAbility, type VlmAbilityCreate, type VlmAbilityGroup, type VlmAbilityGroupCreate, type VlmAbilityGroupUpdate, VlmAbilityStatus, type VlmAbilityUpdate, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, getBaseUrl, readableStreamFromString };