SYMBOL INDEX (212 symbols across 33 files) FILE: docs/hooks/change_copyright.py function on_config (line 7) | def on_config(config, **kwargs): FILE: docs/hooks/expiry.py function on_page_context (line 5) | def on_page_context(context, page, config, nav): FILE: docs/hooks/link.py function on_page_markdown (line 5) | def on_page_markdown(markdown, page, config, files): FILE: rapid_layout/inference_engine/base.py class InferSession (line 18) | class InferSession(ABC): method __init__ (line 29) | def __init__(self, config): method __call__ (line 33) | def __call__(self, input_content: np.ndarray) -> np.ndarray: method _verify_model (line 37) | def _verify_model(model_path: Union[str, Path, None]): method have_key (line 49) | def have_key(self, key: str = "character") -> bool: method characters (line 53) | def characters(self): method get_character_list (line 57) | def get_character_list(self, key: str = "character") -> List[str]: method update_params (line 61) | def update_params(cfg: DictConfig, params: Dict[str, Any]) -> DictConfig: function get_engine (line 67) | def get_engine(engine_type: EngineType): FILE: rapid_layout/inference_engine/onnxruntime/main.py class OrtInferSession (line 20) | class OrtInferSession(InferSession): method __init__ (line 21) | def __init__(self, cfg: RapidLayoutInput): method _init_sess_opts (line 47) | def _init_sess_opts(cfg: DictConfig) -> SessionOptions: method __call__ (line 64) | def __call__(self, input_content: np.ndarray) -> Any: method get_input_names (line 76) | def get_input_names(self) -> List[str]: method get_output_names (line 79) | def get_output_names(self) -> List[str]: method characters (line 83) | def characters(self): method get_character_list (line 86) | def get_character_list(self, key: str = "character") -> List[str]: method have_key (line 90) | def have_key(self, key: str = "character") -> bool: class ONNXRuntimeError (line 97) | class ONNXRuntimeError(Exception): FILE: rapid_layout/inference_engine/onnxruntime/provider_config.py class EP (line 14) | class EP(Enum): class ProviderConfig (line 21) | class ProviderConfig: method __init__ (line 22) | def __init__(self, engine_cfg: DictConfig): method get_ep_list (line 34) | def get_ep_list(self) -> List[Tuple[str, Dict[str, Any]]]: method cpu_ep_cfg (line 52) | def cpu_ep_cfg(self) -> Dict[str, Any]: method cuda_ep_cfg (line 55) | def cuda_ep_cfg(self) -> Dict[str, Any]: method dml_ep_cfg (line 58) | def dml_ep_cfg(self) -> Dict[str, Any]: method cann_ep_cfg (line 66) | def cann_ep_cfg(self) -> Dict[str, Any]: method verify_providers (line 69) | def verify_providers(self, session_providers: Sequence[str]): method is_cuda_available (line 88) | def is_cuda_available(self) -> bool: method is_dml_available (line 111) | def is_dml_available(self) -> bool: method is_cann_available (line 148) | def is_cann_available(self) -> bool: method print_log (line 169) | def print_log(self, log_list: List[str]): FILE: rapid_layout/inference_engine/openvino/device_config.py class OpenVINOConfig (line 12) | class OpenVINOConfig: method __init__ (line 13) | def __init__(self, engine_cfg: DictConfig): method get_config (line 16) | def get_config(self) -> Dict[str, Any]: FILE: rapid_layout/inference_engine/openvino/main.py class OpenVINOInferSession (line 20) | class OpenVINOInferSession(InferSession): method __init__ (line 21) | def __init__(self, cfg: RapidLayoutInput): method __call__ (line 44) | def __call__(self, input_content: np.ndarray) -> Any: method get_input_names (line 71) | def get_input_names(self) -> List[str]: method get_output_names (line 74) | def get_output_names(self) -> List[str]: method characters (line 78) | def characters(self): method get_character_list (line 81) | def get_character_list(self, key: str = "character") -> List[str]: method have_key (line 96) | def have_key(self, key: str = "character") -> bool: method get_rt_info_framework (line 103) | def get_rt_info_framework(self): class OpenVINOError (line 110) | class OpenVINOError(Exception): FILE: rapid_layout/main.py class RapidLayout (line 15) | class RapidLayout: method __init__ (line 16) | def __init__(self, cfg: Optional[RapidLayoutInput] = None, **kwargs): method __call__ (line 43) | def __call__(self, img_content: InputType) -> RapidLayoutOutput: function parse_args (line 49) | def parse_args(arg_list: Optional[List[str]] = None): function main (line 82) | def main(arg_list: Optional[List[str]] = None): FILE: rapid_layout/model_handler/base/__init__.py class BaseModelHandler (line 7) | class BaseModelHandler(ABC): method __call__ (line 9) | def __call__(self): method preprocess (line 13) | def preprocess(self): method postprocess (line 17) | def postprocess(self): FILE: rapid_layout/model_handler/doc_layout/main.py class DocLayoutModelHandler (line 15) | class DocLayoutModelHandler(BaseModelHandler): method __init__ (line 16) | def __init__(self, labels, conf_thres, iou_thres, session: InferSession): method __call__ (line 23) | def __call__(self, ori_img: np.ndarray) -> RapidLayoutOutput: method preprocess (line 43) | def preprocess(self, image): method postprocess (line 46) | def postprocess(self, preds, ori_img_shape, img_shape): FILE: rapid_layout/model_handler/doc_layout/post_process.py class DocLayoutPostProcess (line 9) | class DocLayoutPostProcess: method __init__ (line 10) | def __init__(self, labels: List[str], conf_thres=0.2, iou_thres=0.5): method __call__ (line 17) | def __call__( FILE: rapid_layout/model_handler/doc_layout/pre_process.py class DocLayoutPreProcess (line 14) | class DocLayoutPreProcess: method __init__ (line 15) | def __init__(self, img_size: Tuple[int, int]): method __call__ (line 19) | def __call__(self, image: np.ndarray) -> np.ndarray: FILE: rapid_layout/model_handler/main.py class ModelHandler (line 17) | class ModelHandler: method __init__ (line 18) | def __init__(self, cfg: RapidLayoutInput, session: InferSession): method _init_handler (line 22) | def _init_handler(self, cfg: RapidLayoutInput, session: InferSession) ... method __call__ (line 48) | def __call__(self, img: np.ndarray) -> RapidLayoutOutput: FILE: rapid_layout/model_handler/pp/main.py class PPModelHandler (line 15) | class PPModelHandler(BaseModelHandler): method __init__ (line 16) | def __init__(self, labels, conf_thres, iou_thres, session: InferSession): method __call__ (line 23) | def __call__(self, ori_img: np.ndarray) -> RapidLayoutOutput: method preprocess (line 40) | def preprocess(self, image: np.ndarray) -> np.ndarray: method postprocess (line 43) | def postprocess(self, ori_img_shape, img, preds): FILE: rapid_layout/model_handler/pp/post_process.py class PPPostProcess (line 9) | class PPPostProcess: method __init__ (line 10) | def __init__(self, labels, conf_thres=0.4, iou_thres=0.5): method __call__ (line 18) | def __call__( method warp_boxes (line 130) | def warp_boxes(self, boxes, ori_shape): method img_info (line 154) | def img_info(self, origin_shape, img): method softmax (line 167) | def softmax(x, axis=None): method hard_nms (line 190) | def hard_nms(self, box_scores, iou_thres, top_k=-1, candidate_size=200): method iou_of (line 221) | def iou_of(self, boxes0, boxes1, eps=1e-5): method area_of (line 239) | def area_of(left_top, right_bottom): FILE: rapid_layout/model_handler/pp/pre_process.py class PPPreProcess (line 13) | class PPPreProcess: method __init__ (line 14) | def __init__(self, img_size: Tuple[int, int]): method __call__ (line 20) | def __call__(self, img: Optional[np.ndarray] = None) -> np.ndarray: method resize (line 30) | def resize(self, img: np.ndarray) -> np.ndarray: method normalize (line 35) | def normalize(self, img: np.ndarray) -> np.ndarray: method permute (line 38) | def permute(self, img: np.ndarray) -> np.ndarray: FILE: rapid_layout/model_handler/pp_doc_layout/main.py class PPDocLayoutModelHandler (line 16) | class PPDocLayoutModelHandler(BaseModelHandler): method __init__ (line 17) | def __init__( method __call__ (line 33) | def __call__(self, ori_img: np.ndarray) -> RapidLayoutOutput: method preprocess (line 58) | def preprocess(self, image: np.ndarray) -> np.ndarray: method postprocess (line 61) | def postprocess(self, **kwargs: Any): method format_output (line 65) | def format_output(pred): FILE: rapid_layout/model_handler/pp_doc_layout/post_process.py class PPDocLayoutPostProcess (line 24) | class PPDocLayoutPostProcess: method __init__ (line 25) | def __init__( method apply (line 31) | def apply( method __call__ (line 257) | def __call__( function is_contained (line 314) | def is_contained(box1, box2): function check_containment (line 330) | def check_containment(boxes, formula_index=None, category_index=None, mo... function nms (line 359) | def nms(boxes, iou_same=0.6, iou_diff=0.95): function iou (line 393) | def iou(box1, box2): function is_convex (line 432) | def is_convex(p_prev, p_curr, p_next): function angle_between_vectors (line 442) | def angle_between_vectors(v1, v2): function calc_new_point (line 454) | def calc_new_point(p_curr, v1, v2, distance=20): function extract_custom_vertices (line 464) | def extract_custom_vertices( function mask2polygon (line 567) | def mask2polygon(mask, max_allowed_dist, epsilon_ratio=0.004, extract_cu... function extract_polygon_points_by_masks (line 592) | def extract_polygon_points_by_masks(boxes, masks, scale_ratio, layout_sh... function convert_polygon_to_quad (line 705) | def convert_polygon_to_quad(polygon): function restructured_boxes (line 734) | def restructured_boxes( function unclip_boxes (line 779) | def unclip_boxes(boxes, unclip_ratio=None): function make_valid (line 837) | def make_valid(poly): function calculate_polygon_overlap_ratio (line 843) | def calculate_polygon_overlap_ratio( function calculate_bbox_area (line 881) | def calculate_bbox_area(bbox): function calculate_overlap_ratio (line 888) | def calculate_overlap_ratio( function filter_boxes (line 937) | def filter_boxes( function update_order_index (line 994) | def update_order_index(boxes: List[Dict], skip_order_labels: List[str]): function find_label_position (line 1015) | def find_label_position(box, polygon_points, text_w, text_h, max_shift=50): FILE: rapid_layout/model_handler/pp_doc_layout/pre_process.py class PPDocLayoutPreProcess (line 14) | class PPDocLayoutPreProcess: method __init__ (line 15) | def __init__(self, img_size: Tuple[int, int]): method __call__ (line 24) | def __call__(self, img: Optional[np.ndarray] = None) -> Dict[str, Any]: method resize (line 35) | def resize(self, img: np.ndarray): method normalize (line 51) | def normalize(self, data: Dict[str, Any]) -> np.ndarray: method permute (line 63) | def permute(self, data: Dict[str, Any]) -> np.ndarray: method to_batch (line 68) | def to_batch(self, data, dtype: np.dtype = np.float32) -> list[np.ndar... FILE: rapid_layout/model_handler/utils.py class ModelProcessor (line 16) | class ModelProcessor: method get_model_path (line 29) | def get_model_path(cls, model_type: ModelType) -> str: method get_single_model_path (line 33) | def get_single_model_path(cls, model_type: ModelType) -> str: method get_multi_models_dict (line 49) | def get_multi_models_dict(cls, model_type: ModelType) -> Dict[str, str]: class LetterBox (line 71) | class LetterBox: method __init__ (line 74) | def __init__( method __call__ (line 91) | def __call__(self, labels=None, image=None): method _update_labels (line 141) | def _update_labels(self, labels, ratio, padw, padh): function rescale_boxes (line 150) | def rescale_boxes(boxes, input_width, input_height, img_width, img_height): function scale_boxes (line 158) | def scale_boxes( function clip_boxes (line 200) | def clip_boxes(boxes, shape): function nms (line 206) | def nms(boxes, scores, iou_threshold): function multiclass_nms (line 228) | def multiclass_nms(boxes, scores, class_ids, iou_threshold): function compute_iou (line 243) | def compute_iou(box, boxes): function xywh2xyxy (line 264) | def xywh2xyxy(x): FILE: rapid_layout/model_handler/yolov8/main.py class YOLOv8ModelHandler (line 16) | class YOLOv8ModelHandler(BaseModelHandler): method __init__ (line 17) | def __init__(self, labels, conf_thres, iou_thres, session: InferSession): method __call__ (line 24) | def __call__(self, ori_img: np.ndarray) -> RapidLayoutOutput: method preprocess (line 44) | def preprocess(self, image: np.ndarray) -> np.ndarray: method postprocess (line 47) | def postprocess(self, model_output) -> Tuple[np.ndarray, np.ndarray, L... FILE: rapid_layout/model_handler/yolov8/post_process.py class YOLOv8PostProcess (line 11) | class YOLOv8PostProcess: method __init__ (line 12) | def __init__(self, labels: List[str], conf_thres=0.7, iou_thres=0.5): method __call__ (line 19) | def __call__( method extract_boxes (line 51) | def extract_boxes(self, predictions: np.ndarray) -> np.ndarray: FILE: rapid_layout/model_handler/yolov8/pre_process.py class YOLOv8PreProcess (line 10) | class YOLOv8PreProcess: method __init__ (line 11) | def __init__(self, img_size: Tuple[int, int]): method __call__ (line 14) | def __call__(self, image: np.ndarray) -> np.ndarray: FILE: rapid_layout/utils/download_file.py class DownloadFileInput (line 17) | class DownloadFileInput: class DownloadFile (line 24) | class DownloadFile: method run (line 29) | def run(cls, input_params: DownloadFileInput): method _ensure_parent_dir_exists (line 41) | def _ensure_parent_dir_exists(path: Path): method _should_skip_download (line 45) | def _should_skip_download( method _make_http_request (line 63) | def _make_http_request(cls, url: str, logger: logging.Logger) -> reque... method _save_response_with_progress (line 74) | def _save_response_with_progress( method check_file_sha256 (line 94) | def check_file_sha256(file_path: Union[str, Path], gt_sha256: str) -> ... method check_is_atty (line 98) | def check_is_atty() -> bool: class DownloadFileException (line 106) | class DownloadFileException(Exception): FILE: rapid_layout/utils/load_image.py class LoadImage (line 19) | class LoadImage: method __init__ (line 20) | def __init__(self): method __call__ (line 23) | def __call__(self, img: InputType) -> np.ndarray: method load_img (line 34) | def load_img(self, img: InputType) -> np.ndarray: method verify_exist (line 63) | def verify_exist(file_path: Union[str, Path]): method exif_transpose (line 68) | def exif_transpose(img: Image.Image) -> Image.Image: method img_to_ndarray (line 77) | def img_to_ndarray(self, img: Image.Image) -> np.ndarray: method convert_img (line 83) | def convert_img(self, img: np.ndarray, origin_img_type: Any) -> np.nda... method cvt_two_to_three (line 110) | def cvt_two_to_three(img: np.ndarray) -> np.ndarray: method cvt_four_to_three (line 124) | def cvt_four_to_three(img: np.ndarray) -> np.ndarray: class LoadImageError (line 163) | class LoadImageError(Exception): FILE: rapid_layout/utils/logger.py class Logger (line 7) | class Logger: method __init__ (line 8) | def __init__(self, log_level=logging.INFO, logger_name=None): method get_log (line 34) | def get_log(self): FILE: rapid_layout/utils/typings.py class ModelType (line 18) | class ModelType(Enum): class EngineType (line 33) | class EngineType(Enum): class RapidLayoutInput (line 39) | class RapidLayoutInput: method normalize_kwargs (line 50) | def normalize_kwargs(cls, kwargs: dict) -> dict: class RapidLayoutOutput (line 62) | class RapidLayoutOutput: method vis (line 69) | def vis(self, save_path: Union[str, Path, None] = None) -> Optional[np... FILE: rapid_layout/utils/utils.py function mkdir (line 15) | def mkdir(dir_path): function read_yaml (line 19) | def read_yaml(file_path: Union[str, Path]) -> DictConfig: function quads_to_rect_bbox (line 23) | def quads_to_rect_bbox(bbox: np.ndarray) -> Tuple[float, float, float, f... function has_chinese_char (line 36) | def has_chinese_char(text: str) -> bool: function get_file_sha256 (line 40) | def get_file_sha256(file_path: Union[str, Path], chunk_size: int = 65536... function save_img (line 52) | def save_img(save_path: Union[str, Path], img: np.ndarray): function is_url (line 59) | def is_url(url: str) -> bool: function import_package (line 67) | def import_package(name, package=None): FILE: rapid_layout/utils/vis_res.py class VisLayout (line 10) | class VisLayout: method draw_detections (line 12) | def draw_detections( method draw_box (line 53) | def draw_box( method draw_text (line 63) | def draw_text( method draw_masks (line 94) | def draw_masks( method get_color (line 109) | def get_color(): FILE: setup.py function read_txt (line 12) | def read_txt(txt_path: Union[Path, str]) -> List[str]: function get_readme (line 18) | def get_readme(): FILE: tests/test_engine.py function get_engine (line 27) | def get_engine(params: RapidLayoutInput): function test_engine_onnxruntime (line 32) | def test_engine_onnxruntime(img_name, model_type, gt): function test_engine_openvino (line 47) | def test_engine_openvino(img_name, model_type, gt): FILE: tests/test_main.py function get_engine (line 22) | def get_engine(params: Optional[RapidLayoutInput] = None): function test_normal (line 42) | def test_normal(img_name, model_type, gt): function test_main_cli (line 56) | def test_main_cli(capsys, command, expected_output): function test_init_with_kwargs (line 62) | def test_init_with_kwargs(): function test_init_with_kwargs_model_type_string (line 71) | def test_init_with_kwargs_model_type_string(): function test_init_with_cfg (line 80) | def test_init_with_cfg(): function test_init_with_cfg_and_kwargs_override (line 90) | def test_init_with_cfg_and_kwargs_override():