@lumy-pack/scene-sieve 0.1.0 → 0.2.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/README.md +47 -24
- package/dist/{errors.d.ts → cli/errors/classify-error.d.ts} +5 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/{utils → cli/options}/parse-options.d.ts +6 -1
- package/dist/cli.mjs +755 -319
- package/dist/constants/pipeline-defaults.d.ts +13 -0
- package/dist/core/{analyzer.d.ts → analyzer/analyzer.d.ts} +11 -6
- package/dist/core/{dbscan.d.ts → analyzer/clustering/dbscan.d.ts} +1 -1
- package/dist/core/analyzer/constants/vision-tuning.d.ts +12 -0
- package/dist/core/analyzer/features/feature-diff.d.ts +14 -0
- package/dist/core/analyzer/features/frame-features.d.ts +32 -0
- package/dist/core/analyzer/index.d.ts +3 -0
- package/dist/core/constants/workspace-layout.d.ts +9 -0
- package/dist/core/{extractor.d.ts → extractor/extractor.d.ts} +6 -4
- package/dist/core/extractor/index.d.ts +1 -0
- package/dist/core/index.d.ts +8 -9
- package/dist/core/input-resolver/index.d.ts +1 -0
- package/dist/core/{input-resolver.d.ts → input-resolver/input-resolver.d.ts} +11 -1
- package/dist/core/input-resolver/validation/validate-options.d.ts +8 -0
- package/dist/core/orchestrator/index.d.ts +3 -0
- package/dist/core/{orchestrator.d.ts → orchestrator/orchestrator.d.ts} +1 -1
- package/dist/core/{run-in-worker.d.ts → orchestrator/worker/run-in-worker.d.ts} +5 -1
- package/dist/core/pruner/index.d.ts +1 -0
- package/dist/core/{pruner.d.ts → pruner/pruner.d.ts} +2 -2
- package/dist/{utils/math.d.ts → core/pruner/scoring/normalize-scores.d.ts} +4 -0
- package/dist/core/segmenter/index.d.ts +1 -0
- package/dist/core/{segmenter.d.ts → segmenter/segmenter.d.ts} +11 -11
- package/dist/core/utils/metadata/build-video-metadata.d.ts +14 -0
- package/dist/core/workspace/index.d.ts +1 -0
- package/dist/core/{workspace.d.ts → workspace/workspace.d.ts} +1 -1
- package/dist/index.cjs +910 -434
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +913 -434
- package/dist/pipeline-worker.mjs +635 -278
- package/dist/types/index.d.ts +25 -0
- package/package.json +1 -1
- package/dist/constants.d.ts +0 -32
- /package/dist/{commands → cli/commands}/Sieve.d.ts +0 -0
- /package/dist/{utils → cli/commands}/command-registry.d.ts +0 -0
- /package/dist/{components → cli/components}/PhaseStep.d.ts +0 -0
- /package/dist/{components → cli/components}/ProgressBar.d.ts +0 -0
- /package/dist/core/{pipeline-worker.d.ts → orchestrator/worker/pipeline-worker.d.ts} +0 -0
- /package/dist/{utils → core/pruner/heap}/min-heap.d.ts +0 -0
- /package/dist/{utils → core/segmenter/scheduling}/concurrency.d.ts +0 -0
- /package/dist/{utils → core/utils/filesystem}/paths.d.ts +0 -0
- /package/dist/{utils → logging}/logger.d.ts +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface SieveOptionsBase {
|
|
|
14
14
|
threshold?: number;
|
|
15
15
|
outputPath?: string;
|
|
16
16
|
fps?: number;
|
|
17
|
+
/** Strict file/buffer candidate frame limit (default: 300); ignored in frames mode. */
|
|
17
18
|
maxFrames?: number;
|
|
18
19
|
scale?: number;
|
|
19
20
|
quality?: number;
|
|
@@ -60,8 +61,11 @@ export interface AnimationMetadata {
|
|
|
60
61
|
durationMs: number;
|
|
61
62
|
}
|
|
62
63
|
export interface VideoMetadata {
|
|
64
|
+
/** Source duration from ffprobe, or the final candidate timestamp in frames mode. */
|
|
63
65
|
originalDurationMs: number;
|
|
66
|
+
/** Effective sampling frequency; frames mode uses one frame per second. */
|
|
64
67
|
fps: number;
|
|
68
|
+
/** Actual output JPEG dimensions; zero when no candidate exists. */
|
|
65
69
|
resolution: {
|
|
66
70
|
width: number;
|
|
67
71
|
height: number;
|
|
@@ -97,6 +101,15 @@ export interface DBSCANResult {
|
|
|
97
101
|
}
|
|
98
102
|
export interface ProcessContext {
|
|
99
103
|
options: ResolvedOptions;
|
|
104
|
+
/** Actual extraction grid frequency; frames mode uses one-second intervals. */
|
|
105
|
+
effectiveFps?: number;
|
|
106
|
+
/** Original video duration reported by ffprobe, in seconds. */
|
|
107
|
+
sourceDurationSec?: number;
|
|
108
|
+
/** Dimensions of analysis-space boxes; absent or zero if no pair was analyzed. */
|
|
109
|
+
analysisResolution?: {
|
|
110
|
+
width: number;
|
|
111
|
+
height: number;
|
|
112
|
+
};
|
|
100
113
|
workspacePath: string;
|
|
101
114
|
frames: FrameNode[];
|
|
102
115
|
graph: ScoreEdge[];
|
|
@@ -108,16 +121,23 @@ export interface ProcessContext {
|
|
|
108
121
|
export interface AnalysisResult {
|
|
109
122
|
edges: ScoreEdge[];
|
|
110
123
|
animations: AnimationMetadata[];
|
|
124
|
+
/** First analyzed image dimensions, or zero dimensions when no pair exists. */
|
|
125
|
+
analysisResolution: {
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
};
|
|
111
129
|
}
|
|
112
130
|
export interface SegmentPlan {
|
|
113
131
|
index: number;
|
|
114
132
|
startTime: number;
|
|
115
133
|
endTime: number;
|
|
116
134
|
duration: number;
|
|
135
|
+
/** FFmpeg output limit, including overlap slots; a single segment uses the full budget. */
|
|
117
136
|
allocatedFrames: number;
|
|
118
137
|
effectiveFps: number;
|
|
119
138
|
overlapBefore: number;
|
|
120
139
|
overlapAfter: number;
|
|
140
|
+
/** First extraction grid time in seconds, including overlap. */
|
|
121
141
|
extractStartTime: number;
|
|
122
142
|
extractDuration: number;
|
|
123
143
|
}
|
|
@@ -126,4 +146,9 @@ export interface SegmentResult {
|
|
|
126
146
|
frames: FrameNode[];
|
|
127
147
|
edges: ScoreEdge[];
|
|
128
148
|
animations: AnimationMetadata[];
|
|
149
|
+
/** Analysis coordinates retained through merging for output-only box scaling. */
|
|
150
|
+
analysisResolution: {
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
};
|
|
129
154
|
}
|
package/package.json
CHANGED
package/dist/constants.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare const APP_NAME = "scene-sieve";
|
|
2
|
-
export declare const DEFAULT_COUNT = 20;
|
|
3
|
-
export declare const DEFAULT_THRESHOLD = 0.5;
|
|
4
|
-
export declare const DEFAULT_FPS = 5;
|
|
5
|
-
export declare const DEFAULT_SCALE = 720;
|
|
6
|
-
export declare const DEFAULT_QUALITY = 80;
|
|
7
|
-
export declare const DEFAULT_MAX_FRAMES = 300;
|
|
8
|
-
export declare const NORMALIZATION_MIN_PERCENTILE = 0.1;
|
|
9
|
-
export declare const NORMALIZATION_MAX_PERCENTILE = 0.9;
|
|
10
|
-
export declare const NORMALIZATION_LOGISTIC_K = 3;
|
|
11
|
-
export declare const NORMALIZATION_ALPHA = 0.4;
|
|
12
|
-
export declare const NORMALIZATION_MAD_COEFFICIENT = 1.4826;
|
|
13
|
-
export declare const NORMALIZATION_MIN_SAMPLE_SIZE = 10;
|
|
14
|
-
export declare const WORKSPACE_PREFIX = "scene-sieve-";
|
|
15
|
-
export declare const TEMP_BASE_DIR: string;
|
|
16
|
-
export declare const FRAME_OUTPUT_EXTENSION = ".jpg";
|
|
17
|
-
export declare const FRAME_FILENAME_PATTERN = "frame_%06d.jpg";
|
|
18
|
-
export declare const OPENCV_BATCH_SIZE = 10;
|
|
19
|
-
export declare const MIN_IFRAME_COUNT = 3;
|
|
20
|
-
export declare const DBSCAN_ALPHA = 0.03;
|
|
21
|
-
export declare const DBSCAN_MIN_PTS = 4;
|
|
22
|
-
export declare const IOU_THRESHOLD = 0.9;
|
|
23
|
-
export declare const DECAY_LAMBDA = 0.95;
|
|
24
|
-
export declare const ANIMATION_FRAME_THRESHOLD = 5;
|
|
25
|
-
export declare const MATCH_DISTANCE_THRESHOLD = 0.25;
|
|
26
|
-
export declare const PIXELDIFF_GAUSSIAN_KERNEL = 3;
|
|
27
|
-
export declare const PIXELDIFF_BINARY_THRESHOLD = 30;
|
|
28
|
-
export declare const PIXELDIFF_CONTOUR_MIN_AREA = 100;
|
|
29
|
-
export declare const PIXELDIFF_SAMPLE_SPACING = 8;
|
|
30
|
-
export declare const DEFAULT_MAX_SEGMENT_DURATION = 300;
|
|
31
|
-
export declare const DEFAULT_SEGMENT_CONCURRENCY = 2;
|
|
32
|
-
export declare function getTempWorkspaceDir(sessionId: string): string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|