@eyepop.ai/eyepop 3.21.0 → 3.23.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.
- package/dist/eyepop.index.d.mts +68 -9
- package/dist/eyepop.index.d.ts +68 -9
- package/dist/eyepop.index.js +99 -21
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +96 -21
- 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
|
@@ -73,6 +73,15 @@ interface Prediction extends StreamTime {
|
|
|
73
73
|
details?: Array<Record<string, any>>;
|
|
74
74
|
motions?: Array<PredictedMotion>;
|
|
75
75
|
depth?: Depth;
|
|
76
|
+
/**
|
|
77
|
+
* Set on a selected prediction: the results of a `select_crop` or
|
|
78
|
+
* `select_full` forward for one track. It arrives after later predictions,
|
|
79
|
+
* carries the `timestamp` of the past frame that was selected, and its
|
|
80
|
+
* selected object's `trackId` links it to that track's live predictions.
|
|
81
|
+
* It is not the stream's progress: skip it where frames are drawn or
|
|
82
|
+
* counted.
|
|
83
|
+
*/
|
|
84
|
+
selected?: boolean;
|
|
76
85
|
}
|
|
77
86
|
interface PredictedClass {
|
|
78
87
|
id?: number;
|
|
@@ -918,7 +927,13 @@ declare function validateCamera(camera: Camera): void;
|
|
|
918
927
|
|
|
919
928
|
declare enum PredictionVersion {
|
|
920
929
|
V1 = 1,
|
|
921
|
-
V2 = 2
|
|
930
|
+
V2 = 2,
|
|
931
|
+
/**
|
|
932
|
+
* Adds selected predictions: a `select_crop` or `select_full` forward
|
|
933
|
+
* reports each selection on a prediction of its own, `selected` set and
|
|
934
|
+
* timed by the past frame it selected. Nothing else differs from V2.
|
|
935
|
+
*/
|
|
936
|
+
V3 = 3
|
|
922
937
|
}
|
|
923
938
|
declare const DEFAULT_PREDICTION_VERSION: PredictionVersion;
|
|
924
939
|
interface WorkerSession extends Session {
|
|
@@ -981,7 +996,38 @@ declare enum PopComponentType {
|
|
|
981
996
|
declare enum ForwardOperatorType {
|
|
982
997
|
FULL = "full",
|
|
983
998
|
CROP = "crop",
|
|
984
|
-
CROP_WITH_FULL_FALLBACK = "crop_with_full_fallback"
|
|
999
|
+
CROP_WITH_FULL_FALLBACK = "crop_with_full_fallback",
|
|
1000
|
+
/**
|
|
1001
|
+
* `SELECT_CROP` and `SELECT_FULL` forward one past frame per track, the one
|
|
1002
|
+
* of its most relevant detection, and their targets' results arrive late as
|
|
1003
|
+
* selected predictions. Only a tracking component's forward can select.
|
|
1004
|
+
*/
|
|
1005
|
+
SELECT_CROP = "select_crop",
|
|
1006
|
+
SELECT_FULL = "select_full"
|
|
1007
|
+
}
|
|
1008
|
+
declare enum SelectMode {
|
|
1009
|
+
MOST_RELEVANT = "most_relevant"
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* How a `select_crop` or `select_full` forward picks one frame per track.
|
|
1013
|
+
*
|
|
1014
|
+
* `relevancyModel` (by alias) or `relevancyModelUuid` names an ability that
|
|
1015
|
+
* runs on every tracked object of every frame; a detection it finds nothing on
|
|
1016
|
+
* is never selected. Without one, relevance comes from the detection's box
|
|
1017
|
+
* alone.
|
|
1018
|
+
*
|
|
1019
|
+
* A track shorter than `minTrackLengthSeconds` is never selected. With
|
|
1020
|
+
* `intervalSeconds` the first selection comes that long after the track
|
|
1021
|
+
* starts, then at most one per interval and only when a more relevant
|
|
1022
|
+
* detection turned up; the track's end reports a final one if it improved
|
|
1023
|
+
* since. Without it, a track is selected once, when it ends.
|
|
1024
|
+
*/
|
|
1025
|
+
interface PopSelect {
|
|
1026
|
+
mode?: SelectMode;
|
|
1027
|
+
relevancyModelUuid?: string;
|
|
1028
|
+
relevancyModel?: string;
|
|
1029
|
+
minTrackLengthSeconds?: number;
|
|
1030
|
+
intervalSeconds?: number;
|
|
985
1031
|
}
|
|
986
1032
|
interface PopCrop {
|
|
987
1033
|
maxItems?: number;
|
|
@@ -992,7 +1038,9 @@ interface PopForwardOperator {
|
|
|
992
1038
|
type: ForwardOperatorType;
|
|
993
1039
|
includeClasses?: string[];
|
|
994
1040
|
crop?: PopCrop;
|
|
1041
|
+
select?: PopSelect;
|
|
995
1042
|
}
|
|
1043
|
+
declare function isSelectOperator(operator: PopForwardOperator | undefined): boolean;
|
|
996
1044
|
interface PopForward {
|
|
997
1045
|
operator?: PopForwardOperator;
|
|
998
1046
|
targets: PopComponent[];
|
|
@@ -1042,6 +1090,7 @@ interface InferenceComponent extends BaseComponent {
|
|
|
1042
1090
|
confidenceThreshold?: number;
|
|
1043
1091
|
topK?: number;
|
|
1044
1092
|
topKClasses?: number;
|
|
1093
|
+
classes?: string[];
|
|
1045
1094
|
targetFps?: string;
|
|
1046
1095
|
videoChunkLengthSeconds?: number;
|
|
1047
1096
|
videoChunkOverlap?: number;
|
|
@@ -1156,6 +1205,10 @@ interface Pop {
|
|
|
1156
1205
|
* these too, but as a 400 once the Pop is already in flight.
|
|
1157
1206
|
*/
|
|
1158
1207
|
declare function validatePop(pop: Pop): void;
|
|
1208
|
+
/**
|
|
1209
|
+
* Whether any forward of the Pop is a `select_crop` or `select_full`.
|
|
1210
|
+
*/
|
|
1211
|
+
declare function popSelects(pop: Pop | null | undefined): boolean;
|
|
1159
1212
|
interface MotionDetectConfig {
|
|
1160
1213
|
motionDetect: boolean;
|
|
1161
1214
|
motionSensitivity?: number;
|
|
@@ -1430,6 +1483,12 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
|
1430
1483
|
session(): Promise<WorkerSession>;
|
|
1431
1484
|
popName(): string | null;
|
|
1432
1485
|
pop(): Pop | null;
|
|
1486
|
+
/**
|
|
1487
|
+
* A select forward's results come only at V3. Only a Pop that selects asks
|
|
1488
|
+
* for it, so a worker too old to know V3 - which also rejects that Pop - is
|
|
1489
|
+
* never sent a version it would not accept.
|
|
1490
|
+
*/
|
|
1491
|
+
private predictionVersion;
|
|
1433
1492
|
changePop(pop: Pop): Promise<void>;
|
|
1434
1493
|
private _authenticationHeaders;
|
|
1435
1494
|
/**
|
|
@@ -1871,14 +1930,14 @@ declare class UploadJob extends AbstractJob {
|
|
|
1871
1930
|
private readonly _needsFullDuplex;
|
|
1872
1931
|
private readonly _videoMode;
|
|
1873
1932
|
get [Symbol.toStringTag](): string;
|
|
1874
|
-
constructor(stream: UploadBody, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, uploadBodyFactory?: () => Promise<UploadBody
|
|
1933
|
+
constructor(stream: UploadBody, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, uploadBodyFactory?: () => Promise<UploadBody>, version?: PredictionVersion);
|
|
1875
1934
|
private uploadBody;
|
|
1876
1935
|
protected onEvent(event: StreamEvent): Promise<void>;
|
|
1877
1936
|
protected startJob(): Promise<Response>;
|
|
1878
1937
|
}
|
|
1879
1938
|
declare class LoadFromJob extends AbstractJob {
|
|
1880
1939
|
private readonly _location;
|
|
1881
|
-
constructor(location: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1940
|
+
constructor(location: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1882
1941
|
get [Symbol.toStringTag](): string;
|
|
1883
1942
|
protected startJob(): Promise<Response>;
|
|
1884
1943
|
}
|
|
@@ -1889,24 +1948,24 @@ interface UploadSource {
|
|
|
1889
1948
|
declare class UploadGroupJob extends AbstractJob {
|
|
1890
1949
|
private readonly _sources;
|
|
1891
1950
|
get [Symbol.toStringTag](): string;
|
|
1892
|
-
constructor(sources: UploadSource[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1951
|
+
constructor(sources: UploadSource[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1893
1952
|
protected startJob(): Promise<Response>;
|
|
1894
1953
|
}
|
|
1895
1954
|
declare class LoadFromGroupJob extends AbstractJob {
|
|
1896
1955
|
private readonly _urls;
|
|
1897
1956
|
get [Symbol.toStringTag](): string;
|
|
1898
|
-
constructor(urls: string[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1957
|
+
constructor(urls: string[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1899
1958
|
protected startJob(): Promise<Response>;
|
|
1900
1959
|
}
|
|
1901
1960
|
declare class LoadFromAssetUuidJob extends AbstractJob {
|
|
1902
1961
|
private readonly _assetUuid;
|
|
1903
|
-
constructor(assetUuid: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1962
|
+
constructor(assetUuid: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1904
1963
|
get [Symbol.toStringTag](): string;
|
|
1905
1964
|
protected startJob(): Promise<Response>;
|
|
1906
1965
|
}
|
|
1907
1966
|
declare class LoadMediaStreamJob extends AbstractJob {
|
|
1908
1967
|
private readonly _mediaStream;
|
|
1909
|
-
constructor(mediaStream: MediaStream, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1968
|
+
constructor(mediaStream: MediaStream, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1910
1969
|
get [Symbol.toStringTag](): string;
|
|
1911
1970
|
protected startJob(): Promise<Response>;
|
|
1912
1971
|
}
|
|
@@ -1975,4 +2034,4 @@ declare namespace EyePop {
|
|
|
1975
2034
|
function dataEndpoint(opts?: DataOptions): DataEndpoint;
|
|
1976
2035
|
}
|
|
1977
2036
|
|
|
1978
|
-
export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, ComputeAccountMismatchError, ComputeApiError, type Contour, type ContourArea, 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 Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, 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, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResponseSchema, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, 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, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
|
|
2037
|
+
export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, ComputeAccountMismatchError, ComputeApiError, type Contour, type ContourArea, 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 Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, 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, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PopSelect, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResponseSchema, type ResultStream, type Roi, SelectMode, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, 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, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, isSelectOperator, popSelects, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -73,6 +73,15 @@ interface Prediction extends StreamTime {
|
|
|
73
73
|
details?: Array<Record<string, any>>;
|
|
74
74
|
motions?: Array<PredictedMotion>;
|
|
75
75
|
depth?: Depth;
|
|
76
|
+
/**
|
|
77
|
+
* Set on a selected prediction: the results of a `select_crop` or
|
|
78
|
+
* `select_full` forward for one track. It arrives after later predictions,
|
|
79
|
+
* carries the `timestamp` of the past frame that was selected, and its
|
|
80
|
+
* selected object's `trackId` links it to that track's live predictions.
|
|
81
|
+
* It is not the stream's progress: skip it where frames are drawn or
|
|
82
|
+
* counted.
|
|
83
|
+
*/
|
|
84
|
+
selected?: boolean;
|
|
76
85
|
}
|
|
77
86
|
interface PredictedClass {
|
|
78
87
|
id?: number;
|
|
@@ -918,7 +927,13 @@ declare function validateCamera(camera: Camera): void;
|
|
|
918
927
|
|
|
919
928
|
declare enum PredictionVersion {
|
|
920
929
|
V1 = 1,
|
|
921
|
-
V2 = 2
|
|
930
|
+
V2 = 2,
|
|
931
|
+
/**
|
|
932
|
+
* Adds selected predictions: a `select_crop` or `select_full` forward
|
|
933
|
+
* reports each selection on a prediction of its own, `selected` set and
|
|
934
|
+
* timed by the past frame it selected. Nothing else differs from V2.
|
|
935
|
+
*/
|
|
936
|
+
V3 = 3
|
|
922
937
|
}
|
|
923
938
|
declare const DEFAULT_PREDICTION_VERSION: PredictionVersion;
|
|
924
939
|
interface WorkerSession extends Session {
|
|
@@ -981,7 +996,38 @@ declare enum PopComponentType {
|
|
|
981
996
|
declare enum ForwardOperatorType {
|
|
982
997
|
FULL = "full",
|
|
983
998
|
CROP = "crop",
|
|
984
|
-
CROP_WITH_FULL_FALLBACK = "crop_with_full_fallback"
|
|
999
|
+
CROP_WITH_FULL_FALLBACK = "crop_with_full_fallback",
|
|
1000
|
+
/**
|
|
1001
|
+
* `SELECT_CROP` and `SELECT_FULL` forward one past frame per track, the one
|
|
1002
|
+
* of its most relevant detection, and their targets' results arrive late as
|
|
1003
|
+
* selected predictions. Only a tracking component's forward can select.
|
|
1004
|
+
*/
|
|
1005
|
+
SELECT_CROP = "select_crop",
|
|
1006
|
+
SELECT_FULL = "select_full"
|
|
1007
|
+
}
|
|
1008
|
+
declare enum SelectMode {
|
|
1009
|
+
MOST_RELEVANT = "most_relevant"
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* How a `select_crop` or `select_full` forward picks one frame per track.
|
|
1013
|
+
*
|
|
1014
|
+
* `relevancyModel` (by alias) or `relevancyModelUuid` names an ability that
|
|
1015
|
+
* runs on every tracked object of every frame; a detection it finds nothing on
|
|
1016
|
+
* is never selected. Without one, relevance comes from the detection's box
|
|
1017
|
+
* alone.
|
|
1018
|
+
*
|
|
1019
|
+
* A track shorter than `minTrackLengthSeconds` is never selected. With
|
|
1020
|
+
* `intervalSeconds` the first selection comes that long after the track
|
|
1021
|
+
* starts, then at most one per interval and only when a more relevant
|
|
1022
|
+
* detection turned up; the track's end reports a final one if it improved
|
|
1023
|
+
* since. Without it, a track is selected once, when it ends.
|
|
1024
|
+
*/
|
|
1025
|
+
interface PopSelect {
|
|
1026
|
+
mode?: SelectMode;
|
|
1027
|
+
relevancyModelUuid?: string;
|
|
1028
|
+
relevancyModel?: string;
|
|
1029
|
+
minTrackLengthSeconds?: number;
|
|
1030
|
+
intervalSeconds?: number;
|
|
985
1031
|
}
|
|
986
1032
|
interface PopCrop {
|
|
987
1033
|
maxItems?: number;
|
|
@@ -992,7 +1038,9 @@ interface PopForwardOperator {
|
|
|
992
1038
|
type: ForwardOperatorType;
|
|
993
1039
|
includeClasses?: string[];
|
|
994
1040
|
crop?: PopCrop;
|
|
1041
|
+
select?: PopSelect;
|
|
995
1042
|
}
|
|
1043
|
+
declare function isSelectOperator(operator: PopForwardOperator | undefined): boolean;
|
|
996
1044
|
interface PopForward {
|
|
997
1045
|
operator?: PopForwardOperator;
|
|
998
1046
|
targets: PopComponent[];
|
|
@@ -1042,6 +1090,7 @@ interface InferenceComponent extends BaseComponent {
|
|
|
1042
1090
|
confidenceThreshold?: number;
|
|
1043
1091
|
topK?: number;
|
|
1044
1092
|
topKClasses?: number;
|
|
1093
|
+
classes?: string[];
|
|
1045
1094
|
targetFps?: string;
|
|
1046
1095
|
videoChunkLengthSeconds?: number;
|
|
1047
1096
|
videoChunkOverlap?: number;
|
|
@@ -1156,6 +1205,10 @@ interface Pop {
|
|
|
1156
1205
|
* these too, but as a 400 once the Pop is already in flight.
|
|
1157
1206
|
*/
|
|
1158
1207
|
declare function validatePop(pop: Pop): void;
|
|
1208
|
+
/**
|
|
1209
|
+
* Whether any forward of the Pop is a `select_crop` or `select_full`.
|
|
1210
|
+
*/
|
|
1211
|
+
declare function popSelects(pop: Pop | null | undefined): boolean;
|
|
1159
1212
|
interface MotionDetectConfig {
|
|
1160
1213
|
motionDetect: boolean;
|
|
1161
1214
|
motionSensitivity?: number;
|
|
@@ -1430,6 +1483,12 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
|
1430
1483
|
session(): Promise<WorkerSession>;
|
|
1431
1484
|
popName(): string | null;
|
|
1432
1485
|
pop(): Pop | null;
|
|
1486
|
+
/**
|
|
1487
|
+
* A select forward's results come only at V3. Only a Pop that selects asks
|
|
1488
|
+
* for it, so a worker too old to know V3 - which also rejects that Pop - is
|
|
1489
|
+
* never sent a version it would not accept.
|
|
1490
|
+
*/
|
|
1491
|
+
private predictionVersion;
|
|
1433
1492
|
changePop(pop: Pop): Promise<void>;
|
|
1434
1493
|
private _authenticationHeaders;
|
|
1435
1494
|
/**
|
|
@@ -1871,14 +1930,14 @@ declare class UploadJob extends AbstractJob {
|
|
|
1871
1930
|
private readonly _needsFullDuplex;
|
|
1872
1931
|
private readonly _videoMode;
|
|
1873
1932
|
get [Symbol.toStringTag](): string;
|
|
1874
|
-
constructor(stream: UploadBody, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, uploadBodyFactory?: () => Promise<UploadBody
|
|
1933
|
+
constructor(stream: UploadBody, mimeType: string, size: number | undefined, videoMode: VideoMode | undefined, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, uploadBodyFactory?: () => Promise<UploadBody>, version?: PredictionVersion);
|
|
1875
1934
|
private uploadBody;
|
|
1876
1935
|
protected onEvent(event: StreamEvent): Promise<void>;
|
|
1877
1936
|
protected startJob(): Promise<Response>;
|
|
1878
1937
|
}
|
|
1879
1938
|
declare class LoadFromJob extends AbstractJob {
|
|
1880
1939
|
private readonly _location;
|
|
1881
|
-
constructor(location: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1940
|
+
constructor(location: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1882
1941
|
get [Symbol.toStringTag](): string;
|
|
1883
1942
|
protected startJob(): Promise<Response>;
|
|
1884
1943
|
}
|
|
@@ -1889,24 +1948,24 @@ interface UploadSource {
|
|
|
1889
1948
|
declare class UploadGroupJob extends AbstractJob {
|
|
1890
1949
|
private readonly _sources;
|
|
1891
1950
|
get [Symbol.toStringTag](): string;
|
|
1892
|
-
constructor(sources: UploadSource[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1951
|
+
constructor(sources: UploadSource[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1893
1952
|
protected startJob(): Promise<Response>;
|
|
1894
1953
|
}
|
|
1895
1954
|
declare class LoadFromGroupJob extends AbstractJob {
|
|
1896
1955
|
private readonly _urls;
|
|
1897
1956
|
get [Symbol.toStringTag](): string;
|
|
1898
|
-
constructor(urls: string[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1957
|
+
constructor(urls: string[], params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1899
1958
|
protected startJob(): Promise<Response>;
|
|
1900
1959
|
}
|
|
1901
1960
|
declare class LoadFromAssetUuidJob extends AbstractJob {
|
|
1902
1961
|
private readonly _assetUuid;
|
|
1903
|
-
constructor(assetUuid: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1962
|
+
constructor(assetUuid: string, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1904
1963
|
get [Symbol.toStringTag](): string;
|
|
1905
1964
|
protected startJob(): Promise<Response>;
|
|
1906
1965
|
}
|
|
1907
1966
|
declare class LoadMediaStreamJob extends AbstractJob {
|
|
1908
1967
|
private readonly _mediaStream;
|
|
1909
|
-
constructor(mediaStream: MediaStream, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
1968
|
+
constructor(mediaStream: MediaStream, params: ProcessParams, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger, version?: PredictionVersion);
|
|
1910
1969
|
get [Symbol.toStringTag](): string;
|
|
1911
1970
|
protected startJob(): Promise<Response>;
|
|
1912
1971
|
}
|
|
@@ -1975,4 +2034,4 @@ declare namespace EyePop {
|
|
|
1975
2034
|
function dataEndpoint(opts?: DataOptions): DataEndpoint;
|
|
1976
2035
|
}
|
|
1977
2036
|
|
|
1978
|
-
export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, ComputeAccountMismatchError, ComputeApiError, type Contour, type ContourArea, 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 Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, 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, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResponseSchema, type ResultStream, type Roi, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, 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, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
|
|
2037
|
+
export { type AbilityAliasEntry, AbstractJob, type AccessTokenAuth, type AliasResolution, type Annotation, AnnotationInclusionMode, AnnotationType, type ApiKeyAuth, type Area, AreaType, ArtifactType, type Asset, type AssetImport, AssetInclusionMode, AssetStatus, AssetUrlType, type AssetUuidSource, type Auth0Options, type Authentication, type AutoAnnotate, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateStatus, AutoAnnotateTask, type AutoPromptConfig, type AutoTask, type BaseArea, type BaseComponent, type BaseTask, type Box, type Camera, type CameraDistortion, type CameraExtrinsics, type CameraIntrinsics, type ChangeEvent, ChangeType, type ClassificationTask, type CloudBounds, type CloudBox, type ComponentFinderComponent, type ComponentParams, ComputeAccountMismatchError, ComputeApiError, type Contour, type ContourArea, 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 Depth, DepthMap, type DepthSemantic, type DownloadResponse, Endpoint, EndpointState, type EvaluateConfig, type EvaluateFilter, type EvaluateRequest, type EvaluateResponse, type EvaluateRunInfo, EvaluationStatus, ExportedBy, EyePop, EyePopDataWebSocketError, EyepopLineDecoder, type FileSource, type ForwardComponent, ForwardOperatorType, type HttpClient, type InferRequest, type InferRunInfo, type InferRuntimeConfig, type InferenceComponent, InferenceType, type ListWorkFlowItem, type ListWorkFlowItemMetadata, type ListWorkflowItemMetadataLabels, LoadFromAssetUuidJob, LoadFromGroupJob, LoadFromJob, 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, type MotionDetectConfig, MotionModel, type MultipartContent, type MultipartPart, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type PlatformSupport, type Point2d, type Point3d, PointCloud, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopDepthMap, type PopForward, type PopForwardOperator, type PopSelect, type PredictedClass, type PredictedEmbedding, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedMotion, type PredictedObject, type PredictedText, type Prediction, PredictionVersion, type ProcessParams, type ProcessRequest, QUATERNION_TOLERANCE, type QcAiHubExportParams, type Quaternion, type RectangleArea, type ResponseSchema, type ResultStream, type Roi, SelectMode, Semaphore, type Session, type SessionAuth, type Source, type SourceDefaults, Stream, type StreamEvent, type StreamSource, type StreamTime, TaskMode, TaskType, type TimeSpan, type TrackingComponent, TranscodeMode, type TransformInto, TransientPopId, UploadGroupJob, UploadJob, type UploadSource, type UrlSource, UserReview, type Vector3, type Vector3d, 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, accessTokenCredential, apiKeyCredential, cloudOfDepth, cloudOfObject, cloudsOfPrediction, decodeDepthMap, decodePointCloud, EyePop as default, encodeMultipartFormData, getBaseUrl, isSelectOperator, popSelects, randomMultipartBoundary, readableStreamFromString, resolveAuth, validateCamera, validatePop };
|
package/dist/eyepop.index.js
CHANGED
|
@@ -8699,6 +8699,7 @@ __export(index_exports, {
|
|
|
8699
8699
|
PopComponentType: () => PopComponentType,
|
|
8700
8700
|
PredictionVersion: () => PredictionVersion,
|
|
8701
8701
|
QUATERNION_TOLERANCE: () => QUATERNION_TOLERANCE,
|
|
8702
|
+
SelectMode: () => SelectMode,
|
|
8702
8703
|
Semaphore: () => Semaphore,
|
|
8703
8704
|
Stream: () => Stream,
|
|
8704
8705
|
TaskMode: () => TaskMode,
|
|
@@ -8725,6 +8726,8 @@ __export(index_exports, {
|
|
|
8725
8726
|
default: () => index_default,
|
|
8726
8727
|
encodeMultipartFormData: () => encodeMultipartFormData,
|
|
8727
8728
|
getBaseUrl: () => getBaseUrl,
|
|
8729
|
+
isSelectOperator: () => isSelectOperator,
|
|
8730
|
+
popSelects: () => popSelects,
|
|
8728
8731
|
randomMultipartBoundary: () => randomMultipartBoundary,
|
|
8729
8732
|
readableStreamFromString: () => readableStreamFromString,
|
|
8730
8733
|
resolveAuth: () => resolveAuth,
|
|
@@ -9412,6 +9415,7 @@ function validateCamera(camera) {
|
|
|
9412
9415
|
var PredictionVersion = /* @__PURE__ */ ((PredictionVersion3) => {
|
|
9413
9416
|
PredictionVersion3[PredictionVersion3["V1"] = 1] = "V1";
|
|
9414
9417
|
PredictionVersion3[PredictionVersion3["V2"] = 2] = "V2";
|
|
9418
|
+
PredictionVersion3[PredictionVersion3["V3"] = 3] = "V3";
|
|
9415
9419
|
return PredictionVersion3;
|
|
9416
9420
|
})(PredictionVersion || {});
|
|
9417
9421
|
var DEFAULT_PREDICTION_VERSION = 2 /* V2 */;
|
|
@@ -9432,8 +9436,17 @@ var ForwardOperatorType = /* @__PURE__ */ ((ForwardOperatorType2) => {
|
|
|
9432
9436
|
ForwardOperatorType2["FULL"] = "full";
|
|
9433
9437
|
ForwardOperatorType2["CROP"] = "crop";
|
|
9434
9438
|
ForwardOperatorType2["CROP_WITH_FULL_FALLBACK"] = "crop_with_full_fallback";
|
|
9439
|
+
ForwardOperatorType2["SELECT_CROP"] = "select_crop";
|
|
9440
|
+
ForwardOperatorType2["SELECT_FULL"] = "select_full";
|
|
9435
9441
|
return ForwardOperatorType2;
|
|
9436
9442
|
})(ForwardOperatorType || {});
|
|
9443
|
+
var SelectMode = /* @__PURE__ */ ((SelectMode2) => {
|
|
9444
|
+
SelectMode2["MOST_RELEVANT"] = "most_relevant";
|
|
9445
|
+
return SelectMode2;
|
|
9446
|
+
})(SelectMode || {});
|
|
9447
|
+
function isSelectOperator(operator) {
|
|
9448
|
+
return operator?.type === "select_crop" /* SELECT_CROP */ || operator?.type === "select_full" /* SELECT_FULL */;
|
|
9449
|
+
}
|
|
9437
9450
|
var InferenceType = /* @__PURE__ */ ((InferenceType2) => {
|
|
9438
9451
|
InferenceType2["IMAGE_CLASSIFICATION"] = "image_classification";
|
|
9439
9452
|
InferenceType2["OBJECT_DETECTION"] = "object_detection";
|
|
@@ -9470,6 +9483,52 @@ function validatePop(pop) {
|
|
|
9470
9483
|
if (pop.defaults?.camera !== void 0) {
|
|
9471
9484
|
validateCamera(pop.defaults.camera);
|
|
9472
9485
|
}
|
|
9486
|
+
validateForwards(pop.components);
|
|
9487
|
+
}
|
|
9488
|
+
function popSelects(pop) {
|
|
9489
|
+
const selects = (components) => (components ?? []).some((component) => isSelectOperator(component.forward?.operator) || selects(component.forward?.targets));
|
|
9490
|
+
return selects(pop?.components);
|
|
9491
|
+
}
|
|
9492
|
+
function validateForwards(components) {
|
|
9493
|
+
for (const component of components ?? []) {
|
|
9494
|
+
const operator = component.forward?.operator;
|
|
9495
|
+
if (operator !== void 0) {
|
|
9496
|
+
validateSelectOperator(operator);
|
|
9497
|
+
}
|
|
9498
|
+
validateForwards(component.forward?.targets);
|
|
9499
|
+
}
|
|
9500
|
+
}
|
|
9501
|
+
function validateSelectOperator(operator) {
|
|
9502
|
+
if (!isSelectOperator(operator)) {
|
|
9503
|
+
if (operator.select !== void 0) {
|
|
9504
|
+
throw new Error("select is only valid with the select_crop or select_full operator");
|
|
9505
|
+
}
|
|
9506
|
+
return;
|
|
9507
|
+
}
|
|
9508
|
+
const select = operator.select;
|
|
9509
|
+
if (select === void 0) {
|
|
9510
|
+
throw new Error(`${operator.type} requires a select block`);
|
|
9511
|
+
}
|
|
9512
|
+
if (select.mode !== void 0 && select.mode !== "most_relevant" /* MOST_RELEVANT */) {
|
|
9513
|
+
throw new Error(`select mode ${select.mode} is not supported, the only mode is ${"most_relevant" /* MOST_RELEVANT */}`);
|
|
9514
|
+
}
|
|
9515
|
+
if (select.relevancyModel !== void 0 && select.relevancyModelUuid !== void 0) {
|
|
9516
|
+
throw new Error("select can only have one of relevancyModelUuid or relevancyModel");
|
|
9517
|
+
}
|
|
9518
|
+
if (select.minTrackLengthSeconds !== void 0 && select.minTrackLengthSeconds < 0) {
|
|
9519
|
+
throw new Error("select minTrackLengthSeconds cannot be negative");
|
|
9520
|
+
}
|
|
9521
|
+
if (select.intervalSeconds !== void 0 && select.intervalSeconds <= 0) {
|
|
9522
|
+
throw new Error("select intervalSeconds must be positive");
|
|
9523
|
+
}
|
|
9524
|
+
if (operator.crop !== void 0) {
|
|
9525
|
+
if (operator.type !== "select_crop" /* SELECT_CROP */) {
|
|
9526
|
+
throw new Error(`crop options are only valid with select_crop, not ${operator.type}`);
|
|
9527
|
+
}
|
|
9528
|
+
if (operator.crop.maxItems !== void 0) {
|
|
9529
|
+
throw new Error("select_crop forwards one detection per selection, maxItems does not apply");
|
|
9530
|
+
}
|
|
9531
|
+
}
|
|
9473
9532
|
}
|
|
9474
9533
|
|
|
9475
9534
|
// worker/webrtc_whip.ts
|
|
@@ -9922,8 +9981,8 @@ var UploadJob = class extends AbstractJob {
|
|
|
9922
9981
|
get [Symbol.toStringTag]() {
|
|
9923
9982
|
return "uploadJob";
|
|
9924
9983
|
}
|
|
9925
|
-
constructor(stream, mimeType, size, videoMode, params, getSession, client, requestLogger, uploadBodyFactory) {
|
|
9926
|
-
super(params, getSession, client, requestLogger);
|
|
9984
|
+
constructor(stream, mimeType, size, videoMode, params, getSession, client, requestLogger, uploadBodyFactory, version = DEFAULT_PREDICTION_VERSION) {
|
|
9985
|
+
super(params, getSession, client, requestLogger, version);
|
|
9927
9986
|
this._uploadStream = stream;
|
|
9928
9987
|
this._uploadBodyFactory = uploadBodyFactory;
|
|
9929
9988
|
this._mimeType = mimeType;
|
|
@@ -10116,8 +10175,8 @@ var UploadJob = class extends AbstractJob {
|
|
|
10116
10175
|
}
|
|
10117
10176
|
};
|
|
10118
10177
|
var LoadFromJob = class extends AbstractJob {
|
|
10119
|
-
constructor(location, params, getSession, client, requestLogger) {
|
|
10120
|
-
super(params, getSession, client, requestLogger);
|
|
10178
|
+
constructor(location, params, getSession, client, requestLogger, version = DEFAULT_PREDICTION_VERSION) {
|
|
10179
|
+
super(params, getSession, client, requestLogger, version);
|
|
10121
10180
|
this._location = location;
|
|
10122
10181
|
}
|
|
10123
10182
|
get [Symbol.toStringTag]() {
|
|
@@ -10163,8 +10222,8 @@ var UploadGroupJob = class extends AbstractJob {
|
|
|
10163
10222
|
get [Symbol.toStringTag]() {
|
|
10164
10223
|
return "uploadGroupJob";
|
|
10165
10224
|
}
|
|
10166
|
-
constructor(sources, params, getSession, client, requestLogger) {
|
|
10167
|
-
super(params, getSession, client, requestLogger);
|
|
10225
|
+
constructor(sources, params, getSession, client, requestLogger, version = DEFAULT_PREDICTION_VERSION) {
|
|
10226
|
+
super(params, getSession, client, requestLogger, version);
|
|
10168
10227
|
if (sources.length === 0) {
|
|
10169
10228
|
throw new Error("upload group requires at least one source");
|
|
10170
10229
|
}
|
|
@@ -10225,8 +10284,8 @@ var LoadFromGroupJob = class extends AbstractJob {
|
|
|
10225
10284
|
get [Symbol.toStringTag]() {
|
|
10226
10285
|
return "loadFromGroupJob";
|
|
10227
10286
|
}
|
|
10228
|
-
constructor(urls, params, getSession, client, requestLogger) {
|
|
10229
|
-
super(params, getSession, client, requestLogger);
|
|
10287
|
+
constructor(urls, params, getSession, client, requestLogger, version = DEFAULT_PREDICTION_VERSION) {
|
|
10288
|
+
super(params, getSession, client, requestLogger, version);
|
|
10230
10289
|
if (urls.length === 0) {
|
|
10231
10290
|
throw new Error("load from group requires at least one url");
|
|
10232
10291
|
}
|
|
@@ -10271,8 +10330,8 @@ var LoadFromGroupJob = class extends AbstractJob {
|
|
|
10271
10330
|
}
|
|
10272
10331
|
};
|
|
10273
10332
|
var LoadFromAssetUuidJob = class extends AbstractJob {
|
|
10274
|
-
constructor(assetUuid, params, getSession, client, requestLogger) {
|
|
10275
|
-
super(params, getSession, client, requestLogger);
|
|
10333
|
+
constructor(assetUuid, params, getSession, client, requestLogger, version = DEFAULT_PREDICTION_VERSION) {
|
|
10334
|
+
super(params, getSession, client, requestLogger, version);
|
|
10276
10335
|
this._assetUuid = assetUuid;
|
|
10277
10336
|
}
|
|
10278
10337
|
get [Symbol.toStringTag]() {
|
|
@@ -10312,8 +10371,8 @@ var LoadFromAssetUuidJob = class extends AbstractJob {
|
|
|
10312
10371
|
}
|
|
10313
10372
|
};
|
|
10314
10373
|
var LoadMediaStreamJob = class extends AbstractJob {
|
|
10315
|
-
constructor(mediaStream, params, getSession, client, requestLogger) {
|
|
10316
|
-
super(params, getSession, client, requestLogger);
|
|
10374
|
+
constructor(mediaStream, params, getSession, client, requestLogger, version = DEFAULT_PREDICTION_VERSION) {
|
|
10375
|
+
super(params, getSession, client, requestLogger, version);
|
|
10317
10376
|
this._mediaStream = mediaStream;
|
|
10318
10377
|
}
|
|
10319
10378
|
get [Symbol.toStringTag]() {
|
|
@@ -10957,6 +11016,14 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
10957
11016
|
}
|
|
10958
11017
|
return this.options().pop || null;
|
|
10959
11018
|
}
|
|
11019
|
+
/**
|
|
11020
|
+
* A select forward's results come only at V3. Only a Pop that selects asks
|
|
11021
|
+
* for it, so a worker too old to know V3 - which also rejects that Pop - is
|
|
11022
|
+
* never sent a version it would not accept.
|
|
11023
|
+
*/
|
|
11024
|
+
predictionVersion() {
|
|
11025
|
+
return popSelects(this.pop()) ? 3 /* V3 */ : DEFAULT_PREDICTION_VERSION;
|
|
11026
|
+
}
|
|
10960
11027
|
async changePop(pop) {
|
|
10961
11028
|
validatePop(pop);
|
|
10962
11029
|
if (this.options().popId == "transient" /* Transient */) {
|
|
@@ -11085,7 +11152,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11085
11152
|
return { stream: streamSource.stream, mimeType: streamSource.mimeType };
|
|
11086
11153
|
})
|
|
11087
11154
|
);
|
|
11088
|
-
const job = new UploadGroupJob(sources, params, async () => this.session(), this._client, this._requestLogger);
|
|
11155
|
+
const job = new UploadGroupJob(sources, params, async () => this.session(), this._client, this._requestLogger, this.predictionVersion());
|
|
11089
11156
|
return job.start(
|
|
11090
11157
|
() => {
|
|
11091
11158
|
this.jobDone(job);
|
|
@@ -11117,7 +11184,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11117
11184
|
stream,
|
|
11118
11185
|
mimeType: mimeTypes?.[i] ?? null
|
|
11119
11186
|
}));
|
|
11120
|
-
const job = new UploadGroupJob(sources, params, async () => this.session(), this._client, this._requestLogger);
|
|
11187
|
+
const job = new UploadGroupJob(sources, params, async () => this.session(), this._client, this._requestLogger, this.predictionVersion());
|
|
11121
11188
|
return job.start(
|
|
11122
11189
|
() => {
|
|
11123
11190
|
this.jobDone(job);
|
|
@@ -11142,7 +11209,7 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11142
11209
|
await this._limit.acquire();
|
|
11143
11210
|
try {
|
|
11144
11211
|
this.updateState();
|
|
11145
|
-
const job = new LoadFromGroupJob(urls, params, async () => this.session(), this._client, this._requestLogger);
|
|
11212
|
+
const job = new LoadFromGroupJob(urls, params, async () => this.session(), this._client, this._requestLogger, this.predictionVersion());
|
|
11146
11213
|
return job.start(
|
|
11147
11214
|
() => {
|
|
11148
11215
|
this.jobDone(job);
|
|
@@ -11174,7 +11241,9 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11174
11241
|
return this.session();
|
|
11175
11242
|
},
|
|
11176
11243
|
this._client,
|
|
11177
|
-
this._requestLogger
|
|
11244
|
+
this._requestLogger,
|
|
11245
|
+
void 0,
|
|
11246
|
+
this.predictionVersion()
|
|
11178
11247
|
);
|
|
11179
11248
|
return job.start(
|
|
11180
11249
|
() => {
|
|
@@ -11207,7 +11276,9 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11207
11276
|
return this.session();
|
|
11208
11277
|
},
|
|
11209
11278
|
this._client,
|
|
11210
|
-
this._requestLogger
|
|
11279
|
+
this._requestLogger,
|
|
11280
|
+
void 0,
|
|
11281
|
+
this.predictionVersion()
|
|
11211
11282
|
);
|
|
11212
11283
|
return job.start(
|
|
11213
11284
|
() => {
|
|
@@ -11256,7 +11327,8 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11256
11327
|
},
|
|
11257
11328
|
this._client,
|
|
11258
11329
|
this._requestLogger,
|
|
11259
|
-
uploadBodyFactory
|
|
11330
|
+
uploadBodyFactory,
|
|
11331
|
+
this.predictionVersion()
|
|
11260
11332
|
);
|
|
11261
11333
|
return job.start(
|
|
11262
11334
|
() => {
|
|
@@ -11294,7 +11366,8 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11294
11366
|
return this.session();
|
|
11295
11367
|
},
|
|
11296
11368
|
this._client,
|
|
11297
|
-
this._requestLogger
|
|
11369
|
+
this._requestLogger,
|
|
11370
|
+
this.predictionVersion()
|
|
11298
11371
|
);
|
|
11299
11372
|
return job.start(
|
|
11300
11373
|
() => {
|
|
@@ -11324,7 +11397,8 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11324
11397
|
return this.session();
|
|
11325
11398
|
},
|
|
11326
11399
|
this._client,
|
|
11327
|
-
this._requestLogger
|
|
11400
|
+
this._requestLogger,
|
|
11401
|
+
this.predictionVersion()
|
|
11328
11402
|
);
|
|
11329
11403
|
return job.start(
|
|
11330
11404
|
() => {
|
|
@@ -11354,7 +11428,8 @@ var _WorkerEndpoint = class _WorkerEndpoint extends Endpoint {
|
|
|
11354
11428
|
return this.session();
|
|
11355
11429
|
},
|
|
11356
11430
|
this._client,
|
|
11357
|
-
this._requestLogger
|
|
11431
|
+
this._requestLogger,
|
|
11432
|
+
this.predictionVersion()
|
|
11358
11433
|
);
|
|
11359
11434
|
return job.start(
|
|
11360
11435
|
() => {
|
|
@@ -13512,6 +13587,7 @@ var index_default = EyePop;
|
|
|
13512
13587
|
PopComponentType,
|
|
13513
13588
|
PredictionVersion,
|
|
13514
13589
|
QUATERNION_TOLERANCE,
|
|
13590
|
+
SelectMode,
|
|
13515
13591
|
Semaphore,
|
|
13516
13592
|
Stream,
|
|
13517
13593
|
TaskMode,
|
|
@@ -13537,6 +13613,8 @@ var index_default = EyePop;
|
|
|
13537
13613
|
decodePointCloud,
|
|
13538
13614
|
encodeMultipartFormData,
|
|
13539
13615
|
getBaseUrl,
|
|
13616
|
+
isSelectOperator,
|
|
13617
|
+
popSelects,
|
|
13540
13618
|
randomMultipartBoundary,
|
|
13541
13619
|
readableStreamFromString,
|
|
13542
13620
|
resolveAuth,
|