SYMBOL INDEX (139 symbols across 18 files) FILE: demo/demo_gradio.py function get_initial_session_state (line 54) | def get_initial_session_state(): function read_image_v2 (line 77) | def read_image_v2(img): function load_file_for_preview (line 91) | def load_file_for_preview(file_path, session_state): function turn_page (line 121) | def turn_page(direction, session_state): function get_test_images (line 150) | def get_test_images(): function create_temp_session_dir (line 159) | def create_temp_session_dir(): function parse_image_with_high_level_api (line 166) | def parse_image_with_high_level_api(parser, image, prompt_mode, fitz_pre... function parse_pdf_with_high_level_api (line 224) | def parse_pdf_with_high_level_api(parser, pdf_path, prompt_mode): function process_image_inference (line 294) | def process_image_inference(session_state, test_image_input, file_input, function clear_all_data (line 427) | def clear_all_data(session_state): function update_prompt_display (line 453) | def update_prompt_display(prompt_mode): function create_gradio_interface (line 458) | def create_gradio_interface(): FILE: demo/demo_gradio_annotion.py function read_image_v2 (line 67) | def read_image_v2(img): function get_test_images (line 81) | def get_test_images(): function create_temp_session_dir (line 90) | def create_temp_session_dir(): function parse_image_with_bbox (line 97) | def parse_image_with_bbox(parser, image, prompt_mode, bbox=None, fitz_pr... function process_annotation_data (line 167) | def process_annotation_data(annotation_data): function process_image_inference_with_annotation (line 199) | def process_image_inference_with_annotation(annotation_data, test_image_... function load_image_to_annotator (line 359) | def load_image_to_annotator(test_image_input): function clear_all_data (line 379) | def clear_all_data(): function update_prompt_display (line 414) | def update_prompt_display(prompt_mode): function create_gradio_interface (line 419) | def create_gradio_interface(): FILE: demo/demo_gradio_batch.py function read_image_v2 (line 115) | def read_image_v2(img): function create_temp_session_dir (line 134) | def create_temp_session_dir(): function classify_parse_failure (line 141) | def classify_parse_failure(exc, min_p, max_p): function _is_transient_backend_error (line 178) | def _is_transient_backend_error(exc: Exception): function parse_image_with_high_level_api (line 196) | def parse_image_with_high_level_api(parser, image, prompt_mode, fitz_pre... function _validate_pixels (line 267) | def _validate_pixels(min_p, max_p): function _set_parser_config (line 284) | def _set_parser_config(server_ip, server_port, min_pixels, max_pixels): function purge_queue (line 300) | def purge_queue(rid): function export_one_rid (line 317) | def export_one_rid(rid): function ensure_export_ready (line 335) | def ensure_export_ready(rid): class ExportBuilder (line 351) | class ExportBuilder: method __init__ (line 352) | def __init__(self, name=None): method _abspath (line 361) | def _abspath(self, rel_path: str): method mkdir (line 365) | def mkdir(self, rel_dir: str): method add_text (line 370) | def add_text(self, rel_path: str, content: str, encoding: str = "utf-8"): method add_bytes (line 377) | def add_bytes(self, rel_path: str, data: bytes): method add_file (line 384) | def add_file(self, src_path: str, dest_rel_path: str = None): method finalize (line 393) | def finalize(self, zip_name: str = None): class ScriptAPI (line 409) | class ScriptAPI: method __init__ (line 410) | def __init__(self, ids_snapshot): method get_ids (line 413) | def get_ids(self): method get_status (line 416) | def get_status(self, rid: str): method get_texts (line 431) | def get_texts(self, rid: str): method choose_texts (line 443) | def choose_texts( method list_paths (line 472) | def list_paths(self, rid: str): method path_exists (line 525) | def path_exists(self, p: str) -> bool: method build_export (line 531) | def build_export(self, name: str | None = None): function _safe_builtins (line 535) | def _safe_builtins(): function run_user_script (line 568) | def run_user_script(script_code: str, ids_snapshot): function run_user_script_stream (line 624) | def run_user_script_stream(script_code: str, ids_snapshot): function export_selected_rids (line 814) | def export_selected_rids(ids, selected_labels): function _get_base_name_from_result (line 858) | def _get_base_name_from_result(st: dict): function _edited_dir_for (line 874) | def _edited_dir_for(st: dict): function _edited_filepath (line 884) | def _edited_filepath(st: dict, which: str): function _save_edited_to_disk (line 900) | def _save_edited_to_disk(st: dict, which: str, content: str): function _delete_edited_from_disk (line 907) | def _delete_edited_from_disk(st: dict, which: str): function _invalidate_export_zip (line 916) | def _invalidate_export_zip(rid: str): function _default_ui_state (line 930) | def _default_ui_state(): function _ensure_ui_state (line 935) | def _ensure_ui_state(rid): function background_processor (line 957) | def background_processor(): function _stop_all_workers (line 1118) | def _stop_all_workers(): function _start_workers (line 1137) | def _start_workers(count: int): function start_background_processor (line 1149) | def start_background_processor(): function set_max_concurrency (line 1154) | def set_max_concurrency(n: int): function _pixel_reasons (line 1167) | def _pixel_reasons(min_p, max_p): function add_tasks_to_queue (line 1180) | def add_tasks_to_queue( function enqueue_single_reparse (line 1254) | def enqueue_single_reparse( function delete_one (line 1343) | def delete_one(ids, rid, tick): function create_gradio_interface (line 1360) | def create_gradio_interface(): function _queue_compat (line 2741) | def _queue_compat(blocks: gr.Blocks): function _launch_compat (line 2760) | def _launch_compat(app: gr.Blocks, port: int): FILE: demo/demo_hf.py function inference (line 10) | def inference(image_path, prompt, model, processor): FILE: demo/demo_streamlit.py function read_image_v2 (line 45) | def read_image_v2(img: str): function create_config_sidebar (line 62) | def create_config_sidebar(): function get_image_input (line 79) | def get_image_input(): function process_and_display_results (line 112) | def process_and_display_results(output: str, image: Image.Image, config:... function main (line 173) | def main(): FILE: demo/demo_vllm.py function main (line 30) | def main(): FILE: demo/demo_vllm_general.py function main (line 21) | def main(): FILE: demo/demo_vllm_svg.py function main (line 21) | def main(): FILE: dots_ocr/model/inference.py function inference_with_vllm (line 7) | def inference_with_vllm( FILE: dots_ocr/parser.py class DotsOCRParser (line 17) | class DotsOCRParser: method __init__ (line 22) | def __init__(self, method _load_hf_model (line 62) | def _load_hf_model(self): method _inference_with_hf (line 78) | def _inference_with_hf(self, image, prompt): method _inference_with_vllm (line 119) | def _inference_with_vllm(self, image, prompt): method get_prompt (line 133) | def get_prompt(self, prompt_mode, bbox=None, origin_image=None, image=... method _parse_single_image (line 143) | def _parse_single_image( method parse_image (line 255) | def parse_image(self, input_path, filename, prompt_mode, save_dir, bbo... method parse_pdf (line 261) | def parse_pdf(self, input_path, filename, prompt_mode, save_dir): method parse_file (line 297) | def parse_file(self, function main (line 326) | def main(): FILE: dots_ocr/utils/demo_utils/display.py function is_valid_image_path (line 5) | def is_valid_image_path(image_path): function read_image (line 27) | def read_image(image_path, use_native=False): FILE: dots_ocr/utils/doc_utils.py class SupportedPdfParseMethod (line 8) | class SupportedPdfParseMethod(enum.Enum): class PageInfo (line 13) | class PageInfo(BaseModel): function fitz_doc_to_image (line 20) | def fitz_doc_to_image(doc, target_dpi=200, origin_dpi=None) -> dict: function load_images_from_pdf (line 42) | def load_images_from_pdf(pdf_file, dpi=200, start_page_id=0, end_page_id... FILE: dots_ocr/utils/format_transformer.py function has_latex_markdown (line 10) | def has_latex_markdown(text: str) -> bool: function clean_latex_preamble (line 42) | def clean_latex_preamble(latex_text: str) -> str: function get_formula_in_markdown (line 69) | def get_formula_in_markdown(text: str) -> str: function clean_text (line 122) | def clean_text(text: str) -> str: function layoutjson2md (line 145) | def layoutjson2md(image: Image.Image, cells: list, text_key: str = 'text... function fix_streamlit_formulas (line 183) | def fix_streamlit_formulas(md: str) -> str: FILE: dots_ocr/utils/image_utils.py function round_by_factor (line 14) | def round_by_factor(number: int, factor: int) -> int: function ceil_by_factor (line 19) | def ceil_by_factor(number: int, factor: int) -> int: function floor_by_factor (line 24) | def floor_by_factor(number: int, factor: int) -> int: function smart_resize (line 29) | def smart_resize( function PILimage_to_base64 (line 67) | def PILimage_to_base64(image, format='PNG'): function to_rgb (line 74) | def to_rgb(pil_image: Image.Image) -> Image.Image: function fetch_image (line 84) | def fetch_image( function get_input_dimensions (line 142) | def get_input_dimensions( function get_image_by_fitz_doc (line 170) | def get_image_by_fitz_doc(image, target_dpi=200): FILE: dots_ocr/utils/layout_utils.py function draw_layout_on_image (line 31) | def draw_layout_on_image(image, cells, resized_height=None, resized_widt... function pre_process_bboxes (line 115) | def pre_process_bboxes( function post_process_cells (line 146) | def post_process_cells( function is_legal_bbox (line 195) | def is_legal_bbox(cells): function post_process_output (line 202) | def post_process_output(response, prompt_mode, origin_image, input_image... FILE: dots_ocr/utils/output_cleaner.py class CleanedData (line 22) | class CleanedData: class OutputCleaner (line 32) | class OutputCleaner: method __init__ (line 35) | def __init__(self): method clean_list_data (line 43) | def clean_list_data(self, data: List[Dict], case_id: int) -> CleanedData: method clean_string_data (line 109) | def clean_string_data(self, data_str: str, case_id: int) -> CleanedData: method _fix_missing_delimiters (line 171) | def _fix_missing_delimiters(self, text: str) -> Tuple[str, int]: method _truncate_last_incomplete_element (line 188) | def _truncate_last_incomplete_element(self, text: str) -> Tuple[str, b... method _remove_duplicate_complete_dicts_preserve_order (line 222) | def _remove_duplicate_complete_dicts_preserve_order(self, text: str) -... method _ensure_json_format (line 256) | def _ensure_json_format(self, text: str) -> str: method _parse_final_json (line 271) | def _parse_final_json(self, text: str) -> Optional[List[Dict]]: method _handle_single_incomplete_dict (line 301) | def _handle_single_incomplete_dict(self, text: str) -> Optional[List[D... method remove_duplicate_category_text_pairs_and_bbox (line 347) | def remove_duplicate_category_text_pairs_and_bbox(self, data_list: Lis... method clean_model_output (line 418) | def clean_model_output(self, model_output: str): method clean_all_data (line 437) | def clean_all_data(self, jsonl_path: str) -> List[CleanedData]: method save_cleaned_data (line 489) | def save_cleaned_data(self, output_dir: str): method _generate_cleaning_report (line 528) | def _generate_cleaning_report(self, output_dir: str): function main (line 600) | def main(): FILE: setup.py function parse_requirements (line 4) | def parse_requirements(filename): FILE: tools/elo_score_prompt.py function construct_prompt (line 1) | def construct_prompt(c1_text, c2_text):