File size: 484 Bytes
5f1587b
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from .pipeline import Pipeline
from .detectors import build_detector
from .trackers import build_tracker

def build_pipeline(config):
    """
    Build and return a pipeline based on the provided configuration.
    """
    # Build detector and tracker using the config
    detector = build_detector(config.detector)
    tracker = build_tracker(config.tracker)

    # Create and return a Pipeline object with detector and tracker
    return Pipeline(detector=detector, tracker=tracker)