flow_preprocessing.preprocessing_logic.preprocess.ZipPreprocessor
- class flow_preprocessing.preprocessing_logic.preprocess.ZipPreprocessor(input_path, config, converter_factory=None)[source]
Preprocessor for ZIP files (local or remote).
Supports: - Local ZIP files - Remote ZIP files (HTTP/HTTPS URLs) - Automatic source type detection
- Parameters:
input_path (str)
config (PreprocessorConfig)
converter_factory (ConverterFactory | None)
- __init__(input_path, config, converter_factory=None)[source]
Initialize ZIP preprocessor.
- Parameters:
input_path (str) – Path or URL to ZIP file.
config (PreprocessorConfig) – Preprocessor configuration.
converter_factory (ConverterFactory | None) – Optional converter factory (for DI/testing).
- Raises:
ValueError – If input_path is invalid or a URL fails validation.
- Return type:
None
Methods
__init__(input_path, config[, converter_factory])Initialize ZIP preprocessor.
create_xmlconverter()Create XmlConverter for ZIP source using factory.
preprocess()Preprocess ZIP file.
segment_images()Segment images in the dataset using YOLO or kraken.
Attributes
configGet configuration.
converterGet or create the XmlConverter (lazy initialization).
datasetGet the current dataset.
stateGet current processor state.