phase 3
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
*/
|
||||
|
||||
export type AssetStatus = "pending" | "ready" | "error";
|
||||
export type JobStatus = "pending" | "processing" | "completed" | "failed" | "cancelled";
|
||||
export type ChunkJobStatus = "pending" | "chunking" | "processing" | "collecting" | "completed" | "failed" | "cancelled";
|
||||
export type DetectJobStatus = "pending" | "running" | "paused" | "completed" | "failed" | "cancelled";
|
||||
export type JobStatus = "pending" | "running" | "paused" | "completed" | "failed" | "cancelled";
|
||||
export type RunType = "initial" | "replay" | "retry";
|
||||
export type BrandSource = "ocr" | "local_vlm" | "cloud_llm" | "manual";
|
||||
export type SourceType = "chunk_job" | "upload" | "device" | "stream";
|
||||
@@ -54,63 +52,15 @@ export interface TranscodePreset {
|
||||
updated_at: string | null;
|
||||
}
|
||||
|
||||
export interface TranscodeJob {
|
||||
id: string;
|
||||
source_asset_id: string;
|
||||
preset_id: string | null;
|
||||
preset_snapshot: Record<string, unknown>;
|
||||
trim_start: number | null;
|
||||
trim_end: number | null;
|
||||
output_filename: string;
|
||||
output_path: string | null;
|
||||
output_asset_id: string | null;
|
||||
status: JobStatus;
|
||||
progress: number;
|
||||
current_frame: number | null;
|
||||
current_time: number | null;
|
||||
speed: string | null;
|
||||
error_message: string | null;
|
||||
celery_task_id: string | null;
|
||||
execution_arn: string | null;
|
||||
priority: number;
|
||||
created_at: string | null;
|
||||
started_at: string | null;
|
||||
completed_at: string | null;
|
||||
}
|
||||
|
||||
export interface ChunkJob {
|
||||
id: string;
|
||||
source_asset_id: string;
|
||||
chunk_duration: number;
|
||||
num_workers: number;
|
||||
max_retries: number;
|
||||
processor_type: string;
|
||||
status: ChunkJobStatus;
|
||||
progress: number;
|
||||
total_chunks: number;
|
||||
processed_chunks: number;
|
||||
failed_chunks: number;
|
||||
retry_count: number;
|
||||
error_message: string | null;
|
||||
throughput_mbps: number | null;
|
||||
elapsed_seconds: number | null;
|
||||
celery_task_id: string | null;
|
||||
priority: number;
|
||||
created_at: string | null;
|
||||
started_at: string | null;
|
||||
completed_at: string | null;
|
||||
}
|
||||
|
||||
export interface DetectJob {
|
||||
export interface Job {
|
||||
id: string;
|
||||
source_asset_id: string;
|
||||
video_path: string;
|
||||
profile_name: string;
|
||||
parent_job_id: string | null;
|
||||
parent_id: string | null;
|
||||
run_type: RunType;
|
||||
replay_from_stage: string | null;
|
||||
config_overrides: Record<string, unknown>;
|
||||
status: DetectJobStatus;
|
||||
status: JobStatus;
|
||||
current_stage: string | null;
|
||||
progress: number;
|
||||
error_message: string | null;
|
||||
@@ -125,51 +75,42 @@ export interface DetectJob {
|
||||
completed_at: string | null;
|
||||
}
|
||||
|
||||
export interface StageCheckpoint {
|
||||
export interface Timeline {
|
||||
id: string;
|
||||
job_id: string;
|
||||
stage: string;
|
||||
stage_index: number;
|
||||
source_asset_id: string | null;
|
||||
source_video: string;
|
||||
profile_name: string;
|
||||
fps: number;
|
||||
frames_prefix: string;
|
||||
frames_manifest: Record<string, unknown>;
|
||||
frames_meta: string[];
|
||||
filtered_frame_sequences: number[];
|
||||
boxes_by_frame: Record<string, unknown>;
|
||||
text_candidates: string[];
|
||||
unresolved_candidates: string[];
|
||||
detections: string[];
|
||||
stats: Record<string, unknown>;
|
||||
config_snapshot: Record<string, unknown>;
|
||||
config_overrides: Record<string, unknown>;
|
||||
video_path: string;
|
||||
profile_name: string;
|
||||
created_at: string | null;
|
||||
}
|
||||
|
||||
export interface KnownBrand {
|
||||
export interface Checkpoint {
|
||||
id: string;
|
||||
timeline_id: string;
|
||||
parent_id: string | null;
|
||||
stage_outputs: Record<string, unknown>;
|
||||
config_overrides: Record<string, unknown>;
|
||||
stats: Record<string, unknown>;
|
||||
is_scenario: boolean;
|
||||
scenario_label: string;
|
||||
created_at: string | null;
|
||||
}
|
||||
|
||||
export interface Brand {
|
||||
id: string;
|
||||
canonical_name: string;
|
||||
aliases: string[];
|
||||
first_source: BrandSource;
|
||||
total_occurrences: number;
|
||||
source: BrandSource;
|
||||
confirmed: boolean;
|
||||
airings: string[];
|
||||
total_airings: number;
|
||||
created_at: string | null;
|
||||
updated_at: string | null;
|
||||
}
|
||||
|
||||
export interface SourceBrandSighting {
|
||||
id: string;
|
||||
source_asset_id: string;
|
||||
brand_id: string;
|
||||
brand_name: string;
|
||||
first_seen_timestamp: number;
|
||||
last_seen_timestamp: number;
|
||||
occurrences: number;
|
||||
detection_source: BrandSource;
|
||||
avg_confidence: number;
|
||||
created_at: string | null;
|
||||
}
|
||||
|
||||
export interface CreateJobRequest {
|
||||
source_asset_id: string;
|
||||
preset_id: string | null;
|
||||
|
||||
@@ -42,9 +42,9 @@ source.on<StatsUpdate>('stats_update', (e) => {
|
||||
stats.value = e
|
||||
if (!runContext.value && e.run_id) {
|
||||
runContext.value = {
|
||||
run_id: (e as any).run_id,
|
||||
parent_job_id: (e as any).parent_job_id,
|
||||
run_type: (e as any).run_type ?? 'initial',
|
||||
run_id: e.run_id!,
|
||||
parent_job_id: e.parent_job_id!,
|
||||
run_type: e.run_type ?? 'initial',
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -267,8 +267,10 @@ const editorOverlays = ref<FrameOverlay[]>([])
|
||||
// Boxes from edge detection (local or server)
|
||||
const editorBoxes = ref<FrameBBox[]>([])
|
||||
|
||||
type RegionBox = { x: number; y: number; w: number; h: number; confidence: number; label: string }
|
||||
|
||||
function onReplayResult(result: {
|
||||
regions_by_frame?: Record<string, unknown[]>
|
||||
regions_by_frame?: Record<string, RegionBox[]>
|
||||
debug?: Record<string, { edge_overlay_b64: string; lines_overlay_b64: string; horizontal_count: number; pair_count: number }>
|
||||
frameWidth?: number
|
||||
frameHeight?: number
|
||||
@@ -281,7 +283,7 @@ function onReplayResult(result: {
|
||||
// Merge incoming per-frame regions into accumulated store
|
||||
if (result.regions_by_frame) {
|
||||
for (const [seqStr, regions] of Object.entries(result.regions_by_frame)) {
|
||||
allFrameRegions.value[Number(seqStr)] = regions as any[]
|
||||
allFrameRegions.value[Number(seqStr)] = regions
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,9 @@ export interface StatsUpdate {
|
||||
cloud_llm_calls: number;
|
||||
processing_time_seconds: number;
|
||||
estimated_cloud_cost_usd: number;
|
||||
run_id: string | null;
|
||||
parent_job_id: string | null;
|
||||
run_type: string;
|
||||
}
|
||||
|
||||
export interface FrameUpdate {
|
||||
|
||||
@@ -53,19 +53,7 @@ export interface PreprocessingConfigOverrides {
|
||||
contrast: boolean | null;
|
||||
}
|
||||
|
||||
export interface RegionAnalysisConfigOverrides {
|
||||
enabled: boolean | null;
|
||||
edge_canny_low: number | null;
|
||||
edge_canny_high: number | null;
|
||||
edge_hough_threshold: number | null;
|
||||
edge_hough_min_length: number | null;
|
||||
edge_hough_max_gap: number | null;
|
||||
edge_pair_max_distance: number | null;
|
||||
edge_pair_min_distance: number | null;
|
||||
}
|
||||
|
||||
export interface ConfigOverrides {
|
||||
region_analysis: RegionAnalysisConfigOverrides | null;
|
||||
detection: DetectionConfigOverrides | null;
|
||||
ocr: OCRConfigOverrides | null;
|
||||
resolver: ResolverConfigOverrides | null;
|
||||
|
||||
Reference in New Issue
Block a user