{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!pip install /kaggle/input/make-wheels-for-offline/parsing_graphs_wheels/torchmetrics-1.2.0.dev0-py3-none-any.whl -f ./ --no-index\n!pip install /kaggle/input/make-wheels-for-offline/parsing_graphs_wheels/argschema-3.0.4-py2.py3-none-any.whl -f ./ --no-index\n!pip install /kaggle/input/make-wheels-for-offline/parsing_graphs_wheels/backboned_unet-0.0.1-py3-none-any.whl -f ./ --no-index\n!pip install /kaggle/input/make-wheels-for-offline/parsing_graphs_wheels/lightning-2.0.8-py3-none-any.whl -f ./ --no-index --find-links=file:///kaggle/input/make-wheels-for-offline/parsing_graphs_wheels\n!pip install /kaggle/input/make-wheels-for-offline/parsing_graphs_wheels/pycocotools-2.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -f ./ --no-index\n!pip install /kaggle/input/make-wheels-for-offline/parsing_graphs_wheels/parsing_graphs-0.1.dev226+g0df5df4-py3-none-any.whl -f ./ --no-index --no-deps","metadata":{"execution":{"iopub.status.busy":"2023-09-04T14:46:42.762596Z","iopub.execute_input":"2023-09-04T14:46:42.762954Z","iopub.status.idle":"2023-09-04T14:47:45.503935Z","shell.execute_reply.started":"2023-09-04T14:46:42.762927Z","shell.execute_reply":"2023-09-04T14:47:45.502734Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import torch\nimport yaml\nfrom parse_plots.runner import ParsePlotsRunner","metadata":{"execution":{"iopub.status.busy":"2023-08-10T11:48:32.224280Z","iopub.execute_input":"2023-08-10T11:48:32.224804Z","iopub.status.idle":"2023-08-10T11:48:49.909309Z","shell.execute_reply.started":"2023-08-10T11:48:32.224748Z","shell.execute_reply":"2023-08-10T11:48:49.908429Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!mkdir -p ocr_model\n!cp /kaggle/input/ocr-model/ocr_model/* ocr_model","metadata":{"execution":{"iopub.status.busy":"2023-08-10T11:48:49.911033Z","iopub.execute_input":"2023-08-10T11:48:49.911352Z","iopub.status.idle":"2023-08-10T11:48:53.506645Z","shell.execute_reply.started":"2023-08-10T11:48:49.911323Z","shell.execute_reply":"2023-08-10T11:48:53.505371Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with open('/kaggle/input/ocr-model/ocr_model/ocr_model.yaml') as f:\n    ocr_model_config = yaml.safe_load(f)\n    ocr_model_config['gpu'] = torch.has_cuda\n\nwith open('ocr_model/ocr_model.yaml', 'w') as f:\n    yaml.dump(ocr_model_config, f)","metadata":{"execution":{"iopub.status.busy":"2023-08-10T11:48:53.508217Z","iopub.execute_input":"2023-08-10T11:48:53.508534Z","iopub.status.idle":"2023-08-10T11:48:53.521761Z","shell.execute_reply.started":"2023-08-10T11:48:53.508508Z","shell.execute_reply":"2023-08-10T11:48:53.520960Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"input_data = dict(\n    plots_dir='/kaggle/input/benetech-making-graphs-accessible/test/images/',\n    classify_plot_type_checkpoint='/kaggle/input/classify-plot-type-checkpoint/epoch1-step1326.ckpt',\n    segment_axes_tick_labels_checkpoint='/kaggle/input/detect-axes-labels-checkpoint/epoch_2-step_15900.ckpt',\n    ocr_model_storage_directory='/kaggle/working/ocr_model',\n    ocr_user_network_directory='/kaggle/working/ocr_model',\n    line_plot_segmentation_checkpoint='/kaggle/input/line-plot-segmentation-model/epoch12-step5915.ckpt',\n    plot_object_detector_checkpoint='/kaggle/input/plot-object-detector-model/epoch9-step31140.ckpt',\n    out_dir='/kaggle/working',\n    log_level='INFO',\n    batch_size=32\n)\nParsePlotsRunner(input_data=input_data, args=[]).run()","metadata":{"execution":{"iopub.status.busy":"2023-08-10T11:48:53.523598Z","iopub.execute_input":"2023-08-10T11:48:53.524468Z","iopub.status.idle":"2023-08-10T11:49:14.329884Z","shell.execute_reply.started":"2023-08-10T11:48:53.524442Z","shell.execute_reply":"2023-08-10T11:49:14.328640Z"},"trusted":true},"execution_count":null,"outputs":[]}],"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}}