Spaces:
Running
Running
File size: 734 Bytes
d5daafd c01fc99 d5daafd 953dc3a ee8bafa 97aa4e5 df846c6 953dc3a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from dataclasses import dataclass
@dataclass
class Config:
"""Configuration settings for the comic-to-video pipeline."""
input_path: str = ""
black_overlay_input_path: str = ""
output_folder: str = "temp_dir"
distance_threshold: int = 70
vertical_threshold: int = 30
text_cood_file_name: str = "detect_and_group_text.json"
min_text_length: int = 2
min_area_ratio: float = 0.05
min_width_ratio: float = 0.05
min_height_ratio: float = 0.1
# Additional parameters for BorderPanelExtractor
panel_filename_pattern: str = r"panel_\d+_\((\d+), (\d+), (\d+), (\d+)\)\.jpg"
def get_text_cood_file_path(config: Config):
return f'{config.output_folder}/{config.text_cood_file_name}' |