Skip to content

courtvision.config

CourtVisionInferenceSettings

Bases: BaseSettings

All the settings for running inference and tracking.

Note

The settings are loaded from the .env file in the root of the project.

Source code in courtvision/config.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class CourtVisionInferenceSettings(BaseSettings):
    """
    All the settings for running inference and tracking.

    !!! note
        The settings are loaded from the .env file in the root of the project.
    """

    ball_tracker_num_particles: int = 10_000

    # Models
    ball_detection_model_path: Path
    player_detection_model_path: Path
    # Calibrations
    camera_info_path: Path
    # Visualizations
    court_mesh_path: Path
    # Data
    annotation_path: Path

    class Config:
        extra = "ignore"
        env_prefix = "COURTVISION_"
        env_file = ".env"
        env_file_encoding = "utf-8"

CourtVisionTrainingSettings

Bases: BaseSettings

All the settings for training a model

Note

The settings are loaded from the .env file in the root of the project.

Source code in courtvision/config.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class CourtVisionTrainingSettings(BaseSettings):
    """
    All the settings for training a model
    !!! note
        The settings are loaded from the .env file in the root of the project.
    """

    datasets_path: Path
    ball_models_dir: Path
    ball_model_name: str
    ball_checkpoints_dir: Path
    ball_checkpoints_weights_only: Path

    wb_project: str
    wb_save_dir: str

    class Config:
        extra = "ignore"
        env_prefix = "COURTVISION_"
        env_file = ".env"
        env_file_encoding = "utf-8"