phase 3
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from core.schema.models.pipeline_config import PipelineConfig
|
||||
from detect.models import BrandDetection, BrandStats, DetectionReport, PipelineStats
|
||||
|
||||
from .base import (
|
||||
@@ -12,12 +13,46 @@ from .base import (
|
||||
RegionAnalysisConfig,
|
||||
ResolverConfig,
|
||||
SceneFilterConfig,
|
||||
pipeline_config_from_dict,
|
||||
)
|
||||
|
||||
|
||||
class SoccerBroadcastProfile:
|
||||
name = "soccer_broadcast"
|
||||
|
||||
# Pipeline topology as JSONB — will be a DB field when profiles are persisted
|
||||
pipeline = {
|
||||
"name": "soccer_broadcast",
|
||||
"profile_name": "soccer_broadcast",
|
||||
"stages": [
|
||||
{"name": "extract_frames", "branch": "trunk"},
|
||||
{"name": "filter_scenes", "branch": "trunk"},
|
||||
{"name": "detect_edges", "branch": "hoarding"},
|
||||
{"name": "detect_objects", "branch": "objects"},
|
||||
{"name": "preprocess"},
|
||||
{"name": "run_ocr"},
|
||||
{"name": "match_brands"},
|
||||
{"name": "escalate_vlm"},
|
||||
{"name": "escalate_cloud"},
|
||||
{"name": "compile_report"},
|
||||
],
|
||||
"edges": [
|
||||
{"source": "extract_frames", "target": "filter_scenes"},
|
||||
{"source": "filter_scenes", "target": "detect_edges"},
|
||||
{"source": "filter_scenes", "target": "detect_objects"},
|
||||
{"source": "detect_edges", "target": "preprocess"},
|
||||
{"source": "detect_objects", "target": "preprocess"},
|
||||
{"source": "preprocess", "target": "run_ocr"},
|
||||
{"source": "run_ocr", "target": "match_brands"},
|
||||
{"source": "match_brands", "target": "escalate_vlm"},
|
||||
{"source": "escalate_vlm", "target": "escalate_cloud"},
|
||||
{"source": "escalate_cloud", "target": "compile_report"},
|
||||
],
|
||||
}
|
||||
|
||||
def pipeline_config(self) -> PipelineConfig:
|
||||
return pipeline_config_from_dict(self.pipeline)
|
||||
|
||||
def frame_extraction_config(self) -> FrameExtractionConfig:
|
||||
return FrameExtractionConfig(fps=2.0, max_frames=500)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user