hezar.models.text_detection.craft.craft_text_detection module¶
- class hezar.models.text_detection.craft.craft_text_detection.CraftTextDetection(config: CraftTextDetectionConfig, **kwargs)[source]¶
- Bases: - Model- CRAFT for text detection. Copied from the original implementation at https://github.com/clovaai/CRAFT-pytorch - basenet¶
- U network 
 - post_process(model_outputs: dict, text_threshold: float | None = None, link_threshold: float | None = None, low_text: float | None = None, poly: bool = False)[source]¶
- Process model outputs and return human-readable results. Called in self.predict() - Parameters:
- model_outputs – model outputs to process 
- **kwargs – extra arguments specific to the derived class 
 
- Returns:
- Processed model output values and converted to human-readable results 
 
 
- class hezar.models.text_detection.craft.craft_text_detection.DoubleConv(in_ch, mid_ch, out_ch)[source]¶
- Bases: - Module- forward(x)[source]¶
- Define the computation performed at every call. - Should be overridden by all subclasses. - Note - Although the recipe for forward pass needs to be defined within this function, one should call the - Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
 
- class hezar.models.text_detection.craft.craft_text_detection.VGG16BN[source]¶
- Bases: - Module- forward(x)[source]¶
- Define the computation performed at every call. - Should be overridden by all subclasses. - Note - Although the recipe for forward pass needs to be defined within this function, one should call the - Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.