### Environment Setup Source: https://github.com/ai4phys/seephys/blob/main/README.md Install the project dependencies in editable mode after navigating to the project directory. ```bash cd seephys-project pip install -e . ``` -------------------------------- ### Install MEGA-Bench Requirements Source: https://github.com/ai4phys/seephys/blob/main/vlmeval/dataset/utils/megabench/README.md Install the necessary dependencies to support MEGA-Bench evaluation metrics. ```bash pip install -r vlmeval/dataset/utils/megabench/requirements.txt ``` -------------------------------- ### Example Score File Paths Source: https://github.com/ai4phys/seephys/blob/main/vlmeval/dataset/utils/megabench/README.md Expected output file structure after running the evaluation scripts. ```bash your/work/dir/Qwen-2-VL-7B-Instruct/T20250706_Gbf63ab2c/megabench_score_core.json your/work/dir/Qwen-2-VL-7B-Instruct/T20250707_Gbf63ab2c/megabench_score_open.json ``` -------------------------------- ### Setup and Text Masking Utilities Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Initializes environment dependencies and defines functions to mask text in images by replacing it with new content. ```python import os, cv2 import string import os.path as osp import numpy as np from collections import defaultdict from vlmeval.smp import ls, load, dump, download_file, encode_image_file_to_base64, md5, mrlines import pandas as pd import matplotlib.pyplot as plt import multiprocessing as mp from PIL import Image, ImageFont, ImageDraw font_URL = 'http://opencompass.openxlab.space/utils/Fonts/timesb.ttf' font_file = 'timesb.ttf' if not osp.exists(font_file): download_file(font_URL) test_split_URL = 'https://s3-us-east-2.amazonaws.com/prior-datasets/ai2d_test_ids.csv' test_split_file = 'ai2d_test_ids.csv' if not osp.exists(test_split_file): download_file(test_split_URL) test_ids = set(mrlines(test_split_file)) def proper_font_size(font_file, wh, text, ratio=1): font_size = 2 while True: font = ImageFont.truetype(font_file, font_size) real_box = font.getbbox(text) real_wh = (real_box[2] - real_box[0], real_box[3] - real_box[1]) if real_wh[0] > wh[0] * ratio or real_wh[1] > wh[1] * ratio: break font_size += 1 return font_size def cover_image(ann_path): data = load(ann_path) texts = list(data['text'].values()) raw_img = ann_path.replace('annotations', 'images').replace('.json', '') tgt_img = raw_img.replace('images', 'images_abc') img = Image.open(raw_img) draw = ImageDraw.Draw(img) for text in texts: st, ed = tuple(text['rectangle'][0]), tuple(text['rectangle'][1]) T = text['replacementText'] draw.rectangle((st, ed), fill='white') font_size = proper_font_size(font_file, (ed[0] - st[0], ed[1] - st[1]), T, ratio=1) font = ImageFont.truetype(font_file, font_size) text_box = font.getbbox(T) text_wh = (text_box[2] - text_box[0], text_box[3] - text_box[1]) cx, cy = (st[0] + ed[0]) // 2, st[1] stx = cx - text_wh[0] // 2 sty = cy - text_wh[1] // 2 draw.text((stx, sty), T, font=font, fill='black') img.save(tgt_img) ``` -------------------------------- ### API Configuration Source: https://github.com/ai4phys/seephys/blob/main/README.md Set the required environment variables for OpenAI API access. ```bash export OPENAI_API_KEY= export OPENAI_API_BASE= ``` -------------------------------- ### Run Evaluation Script Source: https://github.com/ai4phys/seephys/blob/main/README.md Execute the evaluation script using torchrun across 8 GPUs with specified model and judge parameters. ```bash #!/bin/bash set -x export GPU=$(nvidia-smi --list-gpus | wc -l) export LMUData=/LMUData torchrun --nproc-per-node=8 run.py --model Qwen2.5-VL-7B-Instruct \ --data SeePhys\ --api-nproc 32 \ --work-dir /work_dir\ --judge deepseek \ --judge-args '{"valid_type": "LLM"}' \ --reuse ``` -------------------------------- ### Download External Resources Source: https://github.com/ai4phys/seephys/blob/main/scripts/visualize.ipynb Utility function to download files from a URL and initialize font properties for plotting. ```python import json import copy as cp import numpy as np import matplotlib.pyplot as plt import matplotlib.font_manager as fm def download_file(url, filename=None): from urllib.request import urlretrieve if filename is None: filename = url.split('/')[-1] urlretrieve(url, filename) font_URL = 'http://opencompass.openxlab.space/utils/Fonts/segoepr.ttf' download_file(font_URL) font12 = fm.FontProperties(fname='segoepr.ttf', size=12) font15 = fm.FontProperties(fname='segoepr.ttf', size=15, weight='bold') font18 = fm.FontProperties(fname='segoepr.ttf', size=18, weight='bold') DATA_URL = 'http://opencompass.openxlab.space/utils/OpenVLM.json' download_file(DATA_URL) ``` -------------------------------- ### Run CC-OCR Benchmark Inference and Evaluation Source: https://github.com/ai4phys/seephys/blob/main/vlmeval/dataset/utils/ccocr_evaluator/README.md Execute these shell commands from the VLMEvalKit root directory to perform batch inference and evaluation for various OCR subsets. ```shell MODEL_NAME="QwenVLMax" OUTPUT_DIR="/your/path/to/output_dir" SUB_OUTPUT_DIR=${OUTPUT_DIR}/multi_scene_ocr python run.py --data CCOCR_MultiSceneOcr_Cord CCOCR_MultiSceneOcr_Funsd CCOCR_MultiSceneOcr_Iam CCOCR_MultiSceneOcr_ZhDoc CCOCR_MultiSceneOcr_ZhHandwriting CCOCR_MultiSceneOcr_Hieragent CCOCR_MultiSceneOcr_Ic15 CCOCR_MultiSceneOcr_Inversetext CCOCR_MultiSceneOcr_Totaltext CCOCR_MultiSceneOcr_ZhScene CCOCR_MultiSceneOcr_UgcLaion CCOCR_MultiSceneOcr_ZhDense CCOCR_MultiSceneOcr_ZhVertical --model ${MODEL_NAME} --work-dir ${SUB_OUTPUT_DIR} --verbose python vlmeval/dataset/utils/ccocr_evaluator/common.py ${SUB_OUTPUT_DIR} SUB_OUTPUT_DIR=${OUTPUT_DIR}/multi_lan_ocr python run.py --data CCOCR_MultiLanOcr_Arabic CCOCR_MultiLanOcr_French CCOCR_MultiLanOcr_German CCOCR_MultiLanOcr_Italian CCOCR_MultiLanOcr_Japanese CCOCR_MultiLanOcr_Korean CCOCR_MultiLanOcr_Portuguese CCOCR_MultiLanOcr_Russian CCOCR_MultiLanOcr_Spanish CCOCR_MultiLanOcr_Vietnamese --model ${MODEL_NAME} --work-dir ${SUB_OUTPUT_DIR} --verbose python vlmeval/dataset/utils/ccocr_evaluator/common.py ${SUB_OUTPUT_DIR} SUB_OUTPUT_DIR=${OUTPUT_DIR}/doc_parsing python run.py --data CCOCR_DocParsing_DocPhotoChn CCOCR_DocParsing_DocPhotoEng CCOCR_DocParsing_DocScanChn CCOCR_DocParsing_DocScanEng CCOCR_DocParsing_TablePhotoChn CCOCR_DocParsing_TablePhotoEng CCOCR_DocParsing_TableScanChn CCOCR_DocParsing_TableScanEng CCOCR_DocParsing_MolecularHandwriting CCOCR_DocParsing_FormulaHandwriting --model ${MODEL_NAME} --work-dir ${SUB_OUTPUT_DIR} --verbose python vlmeval/dataset/utils/ccocr_evaluator/common.py ${SUB_OUTPUT_DIR} SUB_OUTPUT_DIR=${OUTPUT_DIR}/kie python run.py --data CCOCR_Kie_Sroie2019Word CCOCR_Kie_Cord CCOCR_Kie_EphoieScut CCOCR_Kie_Poie CCOCR_Kie_ColdSibr CCOCR_Kie_ColdCell --model ${MODEL_NAME} --work-dir ${SUB_OUTPUT_DIR} --verbose python vlmeval/dataset/utils/ccocr_evaluator/common.py ${SUB_OUTPUT_DIR} ``` -------------------------------- ### Run Model Evaluation with VLMEvalKit Source: https://github.com/ai4phys/seephys/blob/main/vlmeval/dataset/utils/megabench/README.md Execute evaluation scripts for core and open-ended task sets using VLMEvalKit. ```bash # Core set (440 tasks, in 16-frame setting) python3 run.py \ --data MEGABench_core_16frame \ --model Qwen2-VL-7B-Instruct \ --work-dir your/work/dir \ # Open-ended set (65 tasks, in 16-frame setting) python3 run.py \ --data MEGABench_open_16frame \ --model Qwen2-VL-7B-Instruct \ --work-dir your/work/dir ``` -------------------------------- ### Dataset Download and Listing Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Downloads the AI2D dataset archive and lists the contents of the extracted directories. ```python download_file('https://ai2-public-datasets.s3.amazonaws.com/diagrams/ai2d-all.zip') os.system('unzip -o ai2d-all.zip') images = ls('ai2d/images/') questions = ls('ai2d/questions/') annotations = ls('ai2d/annotations/') cates = load('ai2d/categories.json') ``` -------------------------------- ### Prepare Radar Chart Data Source: https://github.com/ai4phys/seephys/blob/main/scripts/visualize.ipynb Loads benchmark results and defines model selection and color palettes for radar graph visualization. ```python # Draw MMBench Radar Graph data = json.loads(open('OpenVLM.json').read())['results'] models = list(data) print(models) # model2vis = [ # 'GPT-4v (detail: low)', 'GeminiProVision', 'Qwen-VL-Plus', # 'InternLM-XComposer2-VL', 'LLaVA-v1.5-13B', 'CogVLM-17B-Chat', # 'mPLUG-Owl2', 'Qwen-VL-Chat', 'IDEFICS-80B-Instruct' # ] model2vis = [ # 'GPT-4v (detail: low)', 'GeminiProVision', 'InternLM-XComposer2-VL', 'GPT-4v (1106, detail-low)', 'Gemini-1.0-Pro', 'Gemini-1.5-Pro', #'Gemini-1.5-Flash', 'Qwen-VL-Plus', 'InternLM-XComposer2', 'LLaVA-v1.5-13B', 'CogVLM-17B-Chat', 'mPLUG-Owl2', 'Qwen-VL-Chat', 'IDEFICS-80B-Instruct' ] colors = [ '#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22' ] ``` -------------------------------- ### Dataset Processing Pipeline Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Iterates through question files to extract metadata and build a structured dataset. ```python data_all = defaultdict(list) for qfile in questions: data = load(qfile) idx = data['imageName'].split('.')[0] if idx not in test_ids: continue image_pth = qfile.replace('questions', 'images').replace('.json', '') cate = cates[image_pth.split('/')[-1]] for q, qmeta in data['questions'].items(): assert '.png-' in qmeta['questionId'] main, sub = qmeta['questionId'].split('.png-') idx = int(main) * 100 + int(sub) answers = qmeta['answerTexts'] correct = qmeta['correctAnswer'] data_all['index'].append(idx) data_all['question'].append(q) assert len(answers) == 4 for c, a in zip('ABCD', answers): data_all[c].append(a) data_all['answer'].append('ABCD'[qmeta['correctAnswer']]) data_all['category'].append(cate) data_all['abcLabel'].append(qmeta['abcLabel']) abc = is_abc(qmeta['abcLabel'], {x: data_all[x][-1] for x in 'ABCD'}, q) # if qmeta['abcLabel'] and not abc: # print(qmeta['abcLabel'], {x: data_all[x][-1] for x in 'ABCD'}, q) data_all['image_path'].append(image_pth.replace('images', 'images_abc') if abc else image_pth) data = pd.DataFrame(data_all) ``` -------------------------------- ### Generate Breakdown Analysis Source: https://github.com/ai4phys/seephys/blob/main/vlmeval/dataset/utils/megabench/README.md Run the breakdown analysis script after placing score files in the target directory. ```bash # Run the metrics for the open-ended set cd vlmeval/dataset/utils/megabench/tools python3 derive_breakdown_results.py --input_dir your/dir/to/megabench_scores ``` -------------------------------- ### Alternative Masking for No-Mask Images Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Provides an alternative masking approach that detects image color and applies outlines to text regions. ```python # Process for no mask images test_ids = set(mrlines(test_split_file)) def detect_image_color(image): gray_image = image.convert('L') mean_brightness = np.mean(np.array(gray_image)) if mean_brightness < 127: return 'white' else: return 'black' def cover_image(ann_path): data = load(ann_path) texts = list(data['text'].values()) raw_img = ann_path.replace('annotations', 'images').replace('.json', '') tgt_img = raw_img.replace('images', 'images_abc') img = Image.open(raw_img) draw = ImageDraw.Draw(img) color = detect_image_color(img) font_size = 0 for text in texts: st, ed = tuple(text['rectangle'][0]), tuple(text['rectangle'][1]) font_size += (ed[1] - st[1]) if len(texts) != 0: font_size /= len(texts) else: font_size = 2 for text in texts: st, ed = tuple(text['rectangle'][0]), tuple(text['rectangle'][1]) T = text['replacementText'] for i in range(2): draw.rectangle( [(st[0] - i, st[1] - i), (ed[0] + i, ed[1] + i)], outline=color ) font = ImageFont.truetype(font_file, font_size) text_box = font.getbbox(T) text_wh = (text_box[2] - text_box[0], text_box[3] - text_box[1]) cx, cy = (st[0] + ed[0]) // 2, st[1] stx = cx - text_wh[0] // 2 sty = cy - text_wh[1] * 1.5 if sty < 0: sty = cy + text_wh[1] * 1.3 draw.text((stx, sty), T, font=font, fill=color) img.save(tgt_img) ``` -------------------------------- ### Image Encoding and Export Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Encodes images to base64 and saves the final dataset to a TSV file. ```python images = [] image_seen = {} for idx, pth in zip(data['index'], data['image_path']): images.append(encode_image_file_to_base64(pth)) data['image'] = images dump(data, 'AI2D_TEST.tsv') print(md5('AI2D_TEST.tsv')) ``` -------------------------------- ### Generate Radar Chart for VLM Benchmarks Source: https://github.com/ai4phys/seephys/blob/main/scripts/visualize.ipynb Uses Matplotlib's polar projection to plot model performance metrics. Requires pre-normalized data and specific font configurations for labels. ```python labels = ['SEEDBench_IMG', 'CCBench', 'MMBench_TEST_EN', 'MMBench_TEST_CN', 'MME', 'MMVet', 'MMMU_VAL', 'MathVista', 'HallusionBench', 'LLaVABench'] num_vars = len(labels) raw_data = [{k: data[m][k]['Overall'] for k in labels} for m in model2vis] data_list, range_map = pre_normalize(raw_data, labels) alpha = 0.25 angles = np.linspace(0, 2 * np.pi, num_vars, endpoint=False).tolist() angles_deg = np.linspace(0, 360, num_vars, endpoint=False).tolist() fig, ax_base = plt.subplots(nrows=1, ncols=1, figsize=(10, 10), subplot_kw=dict(polar=True)) for i in range(len(data_list)): item = data_list[i] model_name = model2vis[i] color = colors[i] tmp_angles = angles[:] + [angles[0]] tmp_values = [item[lb] for lb in labels] + [item[labels[0]]] ax_base.plot(tmp_angles, tmp_values, color=color, linewidth=1, linestyle='solid', label=model_name) ax_base.fill(tmp_angles, tmp_values, color=color, alpha=alpha) angles += [angles[0]] ax_base.set_ylim(0, 100) ax_base.set_yticks([40, 60, 80, 100]) ax_base.set_yticklabels([''] * 4) ax_base.tick_params(pad=15) ax_base.set_xticks(angles[:-1]) ax_base.set_xticklabels(labels, fontproperties=font18) dataset_map = { 'MMBench_TEST_EN': 'MMBench (Test)', 'MMBench_TEST_CN': 'MMBenchCN (Test)', 'MathVista': 'MathVista (TestMini)', 'MMMU_VAL': 'MMMU (Val)' } for i, label in enumerate(ax_base.get_xticklabels()): x,y = label.get_position() text = label.get_text() text = dataset_map[text] if text in dataset_map else text lab = ax_base.text(x, y, text, transform=label.get_transform(), ha=label.get_ha(), va=label.get_va(), font_properties=font15) lab.set_rotation(360 / num_vars * i + 270) labels.append(lab) ax_base.set_xticklabels([]) leg = ax_base.legend(loc='center right', bbox_to_anchor=(1.6, 0.5), prop=font15, ncol=1, frameon=True, labelspacing=1.2) for line in leg.get_lines(): line.set_linewidth(2.5) cx, cy, sz = 0.44, 0.435, 0.34 axes = [fig.add_axes([cx - sz, cy - sz, cx + sz, cy + sz], projection='polar', label='axes%d' % i) for i in range(num_vars)] for ax, angle, label in zip(axes, angles_deg, labels): ax.patch.set_visible(False) ax.grid(False) ax.xaxis.set_visible(False) cur_range = range_map[label] label_list = [cur_range[0] + (cur_range[1] - cur_range[0]) / 5 * i for i in range(2, 6)] label_list = [f'{x:.1f}' for x in label_list] ax.set_rgrids(range(40, 120, 20), angle=angle, labels=label_list, font_properties=font12) ax.spines['polar'].set_visible(False) ax.set_ylim(0, 100) title_text = f'{len(model2vis)} Representative VLMs on {num_vars} Benchmarks in OpenCompass Multi-Modal Leaderboard.' plt.figtext(.7, .95, title_text, fontproperties=font18, ha='center') plt.show() ``` -------------------------------- ### Normalize Benchmark Data Source: https://github.com/ai4phys/seephys/blob/main/scripts/visualize.ipynb Functions to scale benchmark scores into a normalized range, including a logarithmic variant for high-score distributions. ```python def pre_normalize(raw_data, labels): data_list = cp.deepcopy(raw_data) minimum, maximum, max_range, range_map = {}, {}, 0, {} for lb in labels: minimum[lb] = min([x[lb] for x in data_list]) maximum[lb] = max([x[lb] for x in data_list]) max_range = max(max_range, maximum[lb] - minimum[lb]) max_range *= 1.25 for lb in labels: mid = (minimum[lb] + maximum[lb]) / 2 new_range = (mid - max_range / 2, mid + max_range / 2) if (mid + max_range / 2) < 100 else (100 - max_range, 100) range_map[lb] = new_range for item in data_list: assert new_range[0] <= item[lb] <= new_range[1] item[lb] = (item[lb] - new_range[0]) / max_range * 100 return data_list, range_map # solve the problem that some benchmark score is too high and out of range def log_normalize(raw_data, labels): data_list = cp.deepcopy(raw_data) minimum, maximum, max_range, range_map = {}, {}, 0, {} for lb in labels: minimum[lb] = min([np.log(x[lb]) for x in data_list]) maximum[lb] = max([np.log(x[lb]) for x in data_list]) max_range = max(max_range, maximum[lb] - minimum[lb]) max_range *= 1.005 for lb in labels: mid = (minimum[lb] + maximum[lb]) / 2 new_range = (mid - max_range / 2, mid + max_range / 2) if (mid + max_range / 2) < 100 else (100 - max_range, 100) range_map[lb] = new_range for item in data_list: assert new_range[0] <= np.log(item[lb]) <= new_range[1] item[lb] = (np.log(item[lb]) - new_range[0]) / max_range * 100 return data_list, range_map ``` -------------------------------- ### Generate Radar Chart for VLM Evaluation Source: https://github.com/ai4phys/seephys/blob/main/scripts/visualize.ipynb Uses Matplotlib to plot normalized model performance data on a polar coordinate system. Requires pre-defined variables like model2vis, colors, and font settings. ```python from collections import defaultdict split = 'MMBench_TEST_EN' # data_sub = {k: v[split] for k, v in data.items()} data_sub = {k: defaultdict(int, v)[split] for k, v in data.items()} # solve the problem that some model lack the evaluation of MMBench_TEST_EN labels = list(data_sub[model2vis[0]]) labels.remove('Overall') num_vars = len(labels) raw_data = [data_sub[m] for m in model2vis] data_list, range_map = pre_normalize(raw_data, labels) alpha = 0.25 angles = np.linspace(0, 2 * np.pi, num_vars, endpoint=False).tolist() angles_deg = np.linspace(0, 360, num_vars, endpoint=False).tolist() fig, ax_base = plt.subplots(nrows=1, ncols=1, figsize=(10, 10), subplot_kw=dict(polar=True)) for i in range(len(data_list)): item = data_list[i] model_name = model2vis[i] color = colors[i] tmp_angles = angles[:] + [angles[0]] tmp_values = [item[lb] for lb in labels] + [item[labels[0]]] ax_base.plot(tmp_angles, tmp_values, color=color, linewidth=1, linestyle='solid', label=model_name) ax_base.fill(tmp_angles, tmp_values, color=color, alpha=alpha) angles += [angles[0]] ax_base.set_ylim(0, 100) ax_base.set_yticks([40, 60, 80, 100]) ax_base.set_yticklabels([''] * 4) ax_base.tick_params(pad=25) ax_base.set_xticks(angles[:-1]) ax_base.set_xticklabels(labels, fontproperties=font18) leg = ax_base.legend(loc='center right', bbox_to_anchor=(1.6, 0.5), prop=font15, ncol=1, frameon=True, labelspacing=1.2) for line in leg.get_lines(): line.set_linewidth(2.5) cx, cy, sz = 0.44, 0.435, 0.34 axes = [fig.add_axes([cx - sz, cy - sz, cx + sz, cy + sz], projection='polar', label='axes%d' % i) for i in range(num_vars)] for ax, angle, label in zip(axes, angles_deg, labels): ax.patch.set_visible(False) ax.grid(False) ax.xaxis.set_visible(False) cur_range = range_map[label] label_list = [cur_range[0] + (cur_range[1] - cur_range[0]) / 5 * i for i in range(2, 6)] label_list = [f'{x:.1f}' for x in label_list] ax.set_rgrids(range(40, 120, 20), angle=angle, labels=label_list, font_properties=font12) ax.spines['polar'].set_visible(False) ax.set_ylim(0, 100) title_text = f'{len(model2vis)} Representative VLMs on MMBench Test.' plt.figtext(.7, .95, title_text, fontproperties=font18, ha='center') plt.show() ``` -------------------------------- ### Text and Question Validation Functions Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Utility functions for cleaning punctuation and validating question/choice structures. ```python def puncproc(inText): import re outText = inText punct = [ ';', r'/', '[', ']', '"', '{', '}', '(', ')', '=', '+', '\\', '_', '-', '>', '<', '@', '`', ',', '?', '!' ] commaStrip = re.compile('(\\d)(,)(\\d)') # noqa: W605 periodStrip = re.compile('(?!<=\\d)(\\.)(?!\\d)') # noqa: W605 for p in punct: if (p + ' ' in inText or ' ' + p in inText) or (re.search(commaStrip, inText) is not None): outText = outText.replace(p, '') else: outText = outText.replace(p, ' ') outText = periodStrip.sub('', outText, re.UNICODE) return outText def check_choices(line): def ischar(s): s = str(s) if s in ['{}', 'Both', 'None of above']: return True elif s.startswith('Stage ') and ischar(s[6:]): return True elif ' and ' in s and np.all([ischar(x) for x in s.split(' and ')]): return True elif len(s) <= 2: return True elif len(puncproc(s).split()) > 1: return np.all([ischar(x) for x in puncproc(s).split()]) return False n_char = sum([ischar(line[x]) for x in 'ABCD']) return n_char >= 3 def check_question(question): words = puncproc(question).split() for ch in string.ascii_lowercase + string.ascii_uppercase: if ch in words: return True return False def is_abc(abc, choices, question): if abc == 0: return False if check_choices(choices): return True if check_question(question): return True return False ``` -------------------------------- ### CC-OCR Citation Source: https://github.com/ai4phys/seephys/blob/main/vlmeval/dataset/utils/ccocr_evaluator/README.md BibTeX entry for citing the CC-OCR benchmark. ```bibtex @misc{yang2024ccocr, title={CC-OCR: A Comprehensive and Challenging OCR Benchmark for Evaluating Large Multimodal Models in Literacy}, author={Zhibo Yang and Jun Tang and Zhaohai Li and Pengfei Wang and Jianqiang Wan and Humen Zhong and Xuejing Liu and Mingkun Yang and Peng Wang and Shuai Bai and LianWen Jin and Junyang Lin}, year={2024}, eprint={2412.02210}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2412.02210}, } ``` -------------------------------- ### Parallel Processing Execution Source: https://github.com/ai4phys/seephys/blob/main/scripts/AI2D_preproc.ipynb Uses multiprocessing to apply the masking function across the annotation files. ```python pool = mp.Pool(32) pool.map(cover_image, annotations) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.