@eyepop.ai/eyepop 3.7.2 → 3.8.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.
- package/dist/eyepop.index.d.mts +141 -10
- package/dist/eyepop.index.d.ts +141 -10
- package/dist/eyepop.index.js +325 -30
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +321 -30
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +1 -1
package/dist/eyepop.index.d.mts
CHANGED
|
@@ -67,16 +67,16 @@ interface Prediction extends StreamTime {
|
|
|
67
67
|
keyPoints?: Array<PredictedKeyPoints>;
|
|
68
68
|
}
|
|
69
69
|
interface PredictedClass {
|
|
70
|
-
id
|
|
70
|
+
id?: number;
|
|
71
71
|
confidence: number;
|
|
72
72
|
classLabel: string;
|
|
73
|
-
category
|
|
73
|
+
category?: string;
|
|
74
74
|
}
|
|
75
75
|
interface PredictedText {
|
|
76
|
-
id
|
|
76
|
+
id?: number;
|
|
77
77
|
confidence: number;
|
|
78
78
|
text: string;
|
|
79
|
-
category
|
|
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
|
|
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
|
|
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
|
-
|
|
648
|
+
source?: string;
|
|
611
649
|
uncertainty_score?: number;
|
|
612
650
|
predictions: Prediction[];
|
|
613
651
|
}
|
|
@@ -831,9 +869,94 @@ interface DownloadResponse {
|
|
|
831
869
|
url: string;
|
|
832
870
|
url_type: AssetUrlType;
|
|
833
871
|
}
|
|
872
|
+
/** Experimental VLM API */
|
|
873
|
+
interface InferRuntimeConfig {
|
|
874
|
+
max_new_tokens?: number;
|
|
875
|
+
image_size?: number;
|
|
876
|
+
fps?: number;
|
|
877
|
+
max_frames?: number;
|
|
878
|
+
min_frames?: number;
|
|
879
|
+
max_aspect_ratio?: number;
|
|
880
|
+
context_length?: number;
|
|
881
|
+
}
|
|
882
|
+
interface TransformInto {
|
|
883
|
+
classes?: string[];
|
|
884
|
+
}
|
|
885
|
+
interface InferRequest {
|
|
886
|
+
worker_release?: string;
|
|
887
|
+
text_prompt?: string;
|
|
888
|
+
config: InferRuntimeConfig;
|
|
889
|
+
refresh?: boolean;
|
|
890
|
+
transform_into?: TransformInto;
|
|
891
|
+
}
|
|
892
|
+
interface EvaluateRequest {
|
|
893
|
+
infer: InferRequest;
|
|
894
|
+
dataset_uuid: string;
|
|
895
|
+
video_chunk_length_ns?: number;
|
|
896
|
+
video_chunk_overlap?: number;
|
|
897
|
+
}
|
|
898
|
+
declare enum EvaluationStatus {
|
|
899
|
+
success = "success",
|
|
900
|
+
failed = "failed"
|
|
901
|
+
}
|
|
902
|
+
interface EvaluateRunInfo {
|
|
903
|
+
num_images: number;
|
|
904
|
+
num_ground_truth_images: number;
|
|
905
|
+
num_videos: number;
|
|
906
|
+
num_ground_truth_videos: number;
|
|
907
|
+
total_tokens: number;
|
|
908
|
+
visual_tokens: number;
|
|
909
|
+
text_tokens: number;
|
|
910
|
+
output_tokens: number;
|
|
911
|
+
}
|
|
912
|
+
interface EvaluateResponse {
|
|
913
|
+
dataset_uuid: string;
|
|
914
|
+
dataset_version: number;
|
|
915
|
+
status: EvaluationStatus;
|
|
916
|
+
status_message?: string;
|
|
917
|
+
metrics?: Map<string, any>;
|
|
918
|
+
run_info: EvaluateRunInfo;
|
|
919
|
+
}
|
|
920
|
+
interface InferRunInfo {
|
|
921
|
+
fps?: number;
|
|
922
|
+
image_size?: number;
|
|
923
|
+
total_tokens?: number;
|
|
924
|
+
visual_tokens?: number;
|
|
925
|
+
text_tokens?: number;
|
|
926
|
+
output_tokens?: number;
|
|
927
|
+
aspect_ratio?: number;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
type VlmFetch = (path: string, options: RequestInit) => Promise<any>;
|
|
931
|
+
declare class InferAssetJob implements ResultStream {
|
|
932
|
+
protected _vlmFetch: VlmFetch;
|
|
933
|
+
protected _assetUrl: string;
|
|
934
|
+
protected _inferRequest: InferRequest;
|
|
935
|
+
protected _response: Promise<Prediction[]> | null;
|
|
936
|
+
protected _runInfo: InferRunInfo | null;
|
|
937
|
+
protected _controller: AbortController;
|
|
938
|
+
protected _requestLogger: Logger;
|
|
939
|
+
[Symbol.asyncIterator](): AsyncIterator<Prediction>;
|
|
940
|
+
constructor(assetUrl: string, inferRequest: InferRequest, vlmFetch: VlmFetch, requestLogger: Logger);
|
|
941
|
+
start(done: () => void): InferAssetJob;
|
|
942
|
+
cancel(): void;
|
|
943
|
+
}
|
|
944
|
+
declare class EvaluateDatasetJob {
|
|
945
|
+
protected _vlmFetch: VlmFetch;
|
|
946
|
+
protected _evaluateRequest: EvaluateRequest;
|
|
947
|
+
protected _workerRelease: string | null;
|
|
948
|
+
protected _response: Promise<EvaluateResponse> | null;
|
|
949
|
+
protected _controller: AbortController;
|
|
950
|
+
protected _requestLogger: Logger;
|
|
951
|
+
response(): Promise<EvaluateResponse>;
|
|
952
|
+
constructor(evaluateRequest: EvaluateRequest, workerRelease: string | null, vlmFetch: VlmFetch, requestLogger: Logger);
|
|
953
|
+
start(done: () => void): EvaluateDatasetJob;
|
|
954
|
+
cancel(): void;
|
|
955
|
+
}
|
|
834
956
|
|
|
835
957
|
declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
836
|
-
private
|
|
958
|
+
private datasetApiUrl;
|
|
959
|
+
private vlmApiUrl;
|
|
837
960
|
private _accountId;
|
|
838
961
|
private _ws;
|
|
839
962
|
private _ws_current_reconnect_delay;
|
|
@@ -857,6 +980,9 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
857
980
|
autoAnnotateDatasetVersion(dataset_uuid: string, dataset_version?: number, max_assets?: number): Promise<void>;
|
|
858
981
|
deleteDatasetVersion(dataset_uuid: string, dataset_version: number): Promise<Dataset>;
|
|
859
982
|
deleteAnnotations(dataset_uuid: string, dataset_version: number, user_reviews?: UserReview[]): Promise<void>;
|
|
983
|
+
createDatasetAutoAnnotate(create: DatasetAutoAnnotateCreate, dataset_uuid: string, dataset_version?: number): Promise<void>;
|
|
984
|
+
updateDatasetAutoAnnotate(update: DatasetAutoAnnotateUpdate, dataset_uuid: string, auto_annotate: string, source: string, dataset_version?: number): Promise<void>;
|
|
985
|
+
listDatasetAutoAnnotates(dataset_uuid: string, auto_annotate?: string, source?: string, dataset_version?: number): Promise<DatasetAutoAnnotate[]>;
|
|
860
986
|
uploadAsset(dataset_uuid: string, dataset_version: number | undefined, blob: Blob, external_id?: string | undefined): Promise<Asset>;
|
|
861
987
|
importAsset(dataset_uuid: string, dataset_version: number | undefined, asset_import: AssetImport, external_id?: string | undefined): Promise<Asset>;
|
|
862
988
|
listAssets(dataset_uuid: string, dataset_version?: number, include_annotations?: boolean, top_k?: number): Promise<Asset[]>;
|
|
@@ -866,6 +992,8 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
866
992
|
updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, predictions?: Prediction[]): Promise<void>;
|
|
867
993
|
deleteAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
|
|
868
994
|
updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview, approved_threshold?: number): Promise<void>;
|
|
995
|
+
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>;
|
|
996
|
+
updateAssetAnnotationApproval(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, auto_annotate?: string, source?: string, user_review?: UserReview, approved_threshold?: number): Promise<void>;
|
|
869
997
|
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
998
|
previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
|
|
871
999
|
listModels(): Promise<Model[]>;
|
|
@@ -887,6 +1015,9 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
887
1015
|
startWorkflow(account_uuid: string, template_name: string, workflow: CreateWorkflow): Promise<Workflow>;
|
|
888
1016
|
getWorkflow(workflow_id: string, account_uuid: string): Promise<ListWorkFlowItem>;
|
|
889
1017
|
listWorkflows(account_uuid: string, dataset_uuids?: string[], model_uuids?: string[], phases?: WorkflowPhase[]): Promise<ListWorkFlowItem[]>;
|
|
1018
|
+
inferAsset(asset_uuid: string, infer_request: InferRequest, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode, start_timestamp?: number, end_timestamp?: number): Promise<InferAssetJob>;
|
|
1019
|
+
evaluateDataset(evaluate_request: EvaluateRequest, worker_release?: string): Promise<EvaluateDatasetJob>;
|
|
1020
|
+
private jobDone;
|
|
890
1021
|
private dispatchChangeEvent;
|
|
891
1022
|
}
|
|
892
1023
|
|
|
@@ -1043,4 +1174,4 @@ declare namespace EyePop {
|
|
|
1043
1174
|
function dataEndpoint(opts?: DataOptions): DataEndpoint;
|
|
1044
1175
|
}
|
|
1045
1176
|
|
|
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 };
|
|
1177
|
+
export { 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 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, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, getBaseUrl, readableStreamFromString };
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -67,16 +67,16 @@ interface Prediction extends StreamTime {
|
|
|
67
67
|
keyPoints?: Array<PredictedKeyPoints>;
|
|
68
68
|
}
|
|
69
69
|
interface PredictedClass {
|
|
70
|
-
id
|
|
70
|
+
id?: number;
|
|
71
71
|
confidence: number;
|
|
72
72
|
classLabel: string;
|
|
73
|
-
category
|
|
73
|
+
category?: string;
|
|
74
74
|
}
|
|
75
75
|
interface PredictedText {
|
|
76
|
-
id
|
|
76
|
+
id?: number;
|
|
77
77
|
confidence: number;
|
|
78
78
|
text: string;
|
|
79
|
-
category
|
|
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
|
|
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
|
|
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
|
-
|
|
648
|
+
source?: string;
|
|
611
649
|
uncertainty_score?: number;
|
|
612
650
|
predictions: Prediction[];
|
|
613
651
|
}
|
|
@@ -831,9 +869,94 @@ interface DownloadResponse {
|
|
|
831
869
|
url: string;
|
|
832
870
|
url_type: AssetUrlType;
|
|
833
871
|
}
|
|
872
|
+
/** Experimental VLM API */
|
|
873
|
+
interface InferRuntimeConfig {
|
|
874
|
+
max_new_tokens?: number;
|
|
875
|
+
image_size?: number;
|
|
876
|
+
fps?: number;
|
|
877
|
+
max_frames?: number;
|
|
878
|
+
min_frames?: number;
|
|
879
|
+
max_aspect_ratio?: number;
|
|
880
|
+
context_length?: number;
|
|
881
|
+
}
|
|
882
|
+
interface TransformInto {
|
|
883
|
+
classes?: string[];
|
|
884
|
+
}
|
|
885
|
+
interface InferRequest {
|
|
886
|
+
worker_release?: string;
|
|
887
|
+
text_prompt?: string;
|
|
888
|
+
config: InferRuntimeConfig;
|
|
889
|
+
refresh?: boolean;
|
|
890
|
+
transform_into?: TransformInto;
|
|
891
|
+
}
|
|
892
|
+
interface EvaluateRequest {
|
|
893
|
+
infer: InferRequest;
|
|
894
|
+
dataset_uuid: string;
|
|
895
|
+
video_chunk_length_ns?: number;
|
|
896
|
+
video_chunk_overlap?: number;
|
|
897
|
+
}
|
|
898
|
+
declare enum EvaluationStatus {
|
|
899
|
+
success = "success",
|
|
900
|
+
failed = "failed"
|
|
901
|
+
}
|
|
902
|
+
interface EvaluateRunInfo {
|
|
903
|
+
num_images: number;
|
|
904
|
+
num_ground_truth_images: number;
|
|
905
|
+
num_videos: number;
|
|
906
|
+
num_ground_truth_videos: number;
|
|
907
|
+
total_tokens: number;
|
|
908
|
+
visual_tokens: number;
|
|
909
|
+
text_tokens: number;
|
|
910
|
+
output_tokens: number;
|
|
911
|
+
}
|
|
912
|
+
interface EvaluateResponse {
|
|
913
|
+
dataset_uuid: string;
|
|
914
|
+
dataset_version: number;
|
|
915
|
+
status: EvaluationStatus;
|
|
916
|
+
status_message?: string;
|
|
917
|
+
metrics?: Map<string, any>;
|
|
918
|
+
run_info: EvaluateRunInfo;
|
|
919
|
+
}
|
|
920
|
+
interface InferRunInfo {
|
|
921
|
+
fps?: number;
|
|
922
|
+
image_size?: number;
|
|
923
|
+
total_tokens?: number;
|
|
924
|
+
visual_tokens?: number;
|
|
925
|
+
text_tokens?: number;
|
|
926
|
+
output_tokens?: number;
|
|
927
|
+
aspect_ratio?: number;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
type VlmFetch = (path: string, options: RequestInit) => Promise<any>;
|
|
931
|
+
declare class InferAssetJob implements ResultStream {
|
|
932
|
+
protected _vlmFetch: VlmFetch;
|
|
933
|
+
protected _assetUrl: string;
|
|
934
|
+
protected _inferRequest: InferRequest;
|
|
935
|
+
protected _response: Promise<Prediction[]> | null;
|
|
936
|
+
protected _runInfo: InferRunInfo | null;
|
|
937
|
+
protected _controller: AbortController;
|
|
938
|
+
protected _requestLogger: Logger;
|
|
939
|
+
[Symbol.asyncIterator](): AsyncIterator<Prediction>;
|
|
940
|
+
constructor(assetUrl: string, inferRequest: InferRequest, vlmFetch: VlmFetch, requestLogger: Logger);
|
|
941
|
+
start(done: () => void): InferAssetJob;
|
|
942
|
+
cancel(): void;
|
|
943
|
+
}
|
|
944
|
+
declare class EvaluateDatasetJob {
|
|
945
|
+
protected _vlmFetch: VlmFetch;
|
|
946
|
+
protected _evaluateRequest: EvaluateRequest;
|
|
947
|
+
protected _workerRelease: string | null;
|
|
948
|
+
protected _response: Promise<EvaluateResponse> | null;
|
|
949
|
+
protected _controller: AbortController;
|
|
950
|
+
protected _requestLogger: Logger;
|
|
951
|
+
response(): Promise<EvaluateResponse>;
|
|
952
|
+
constructor(evaluateRequest: EvaluateRequest, workerRelease: string | null, vlmFetch: VlmFetch, requestLogger: Logger);
|
|
953
|
+
start(done: () => void): EvaluateDatasetJob;
|
|
954
|
+
cancel(): void;
|
|
955
|
+
}
|
|
834
956
|
|
|
835
957
|
declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
836
|
-
private
|
|
958
|
+
private datasetApiUrl;
|
|
959
|
+
private vlmApiUrl;
|
|
837
960
|
private _accountId;
|
|
838
961
|
private _ws;
|
|
839
962
|
private _ws_current_reconnect_delay;
|
|
@@ -857,6 +980,9 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
857
980
|
autoAnnotateDatasetVersion(dataset_uuid: string, dataset_version?: number, max_assets?: number): Promise<void>;
|
|
858
981
|
deleteDatasetVersion(dataset_uuid: string, dataset_version: number): Promise<Dataset>;
|
|
859
982
|
deleteAnnotations(dataset_uuid: string, dataset_version: number, user_reviews?: UserReview[]): Promise<void>;
|
|
983
|
+
createDatasetAutoAnnotate(create: DatasetAutoAnnotateCreate, dataset_uuid: string, dataset_version?: number): Promise<void>;
|
|
984
|
+
updateDatasetAutoAnnotate(update: DatasetAutoAnnotateUpdate, dataset_uuid: string, auto_annotate: string, source: string, dataset_version?: number): Promise<void>;
|
|
985
|
+
listDatasetAutoAnnotates(dataset_uuid: string, auto_annotate?: string, source?: string, dataset_version?: number): Promise<DatasetAutoAnnotate[]>;
|
|
860
986
|
uploadAsset(dataset_uuid: string, dataset_version: number | undefined, blob: Blob, external_id?: string | undefined): Promise<Asset>;
|
|
861
987
|
importAsset(dataset_uuid: string, dataset_version: number | undefined, asset_import: AssetImport, external_id?: string | undefined): Promise<Asset>;
|
|
862
988
|
listAssets(dataset_uuid: string, dataset_version?: number, include_annotations?: boolean, top_k?: number): Promise<Asset[]>;
|
|
@@ -866,6 +992,8 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
866
992
|
updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, predictions?: Prediction[]): Promise<void>;
|
|
867
993
|
deleteAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
|
|
868
994
|
updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview, approved_threshold?: number): Promise<void>;
|
|
995
|
+
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>;
|
|
996
|
+
updateAssetAnnotationApproval(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, auto_annotate?: string, source?: string, user_review?: UserReview, approved_threshold?: number): Promise<void>;
|
|
869
997
|
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
998
|
previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
|
|
871
999
|
listModels(): Promise<Model[]>;
|
|
@@ -887,6 +1015,9 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
887
1015
|
startWorkflow(account_uuid: string, template_name: string, workflow: CreateWorkflow): Promise<Workflow>;
|
|
888
1016
|
getWorkflow(workflow_id: string, account_uuid: string): Promise<ListWorkFlowItem>;
|
|
889
1017
|
listWorkflows(account_uuid: string, dataset_uuids?: string[], model_uuids?: string[], phases?: WorkflowPhase[]): Promise<ListWorkFlowItem[]>;
|
|
1018
|
+
inferAsset(asset_uuid: string, infer_request: InferRequest, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode, start_timestamp?: number, end_timestamp?: number): Promise<InferAssetJob>;
|
|
1019
|
+
evaluateDataset(evaluate_request: EvaluateRequest, worker_release?: string): Promise<EvaluateDatasetJob>;
|
|
1020
|
+
private jobDone;
|
|
890
1021
|
private dispatchChangeEvent;
|
|
891
1022
|
}
|
|
892
1023
|
|
|
@@ -1043,4 +1174,4 @@ declare namespace EyePop {
|
|
|
1043
1174
|
function dataEndpoint(opts?: DataOptions): DataEndpoint;
|
|
1044
1175
|
}
|
|
1045
1176
|
|
|
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 };
|
|
1177
|
+
export { 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 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, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, type Workflow, WorkflowPhase, EyePop as default, getBaseUrl, readableStreamFromString };
|