{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.10","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":43873,"databundleVersionId":5585780,"sourceType":"competition"},{"sourceId":5214849,"sourceType":"datasetVersion","datasetId":3033230},{"sourceId":5639937,"sourceType":"datasetVersion","datasetId":3241919}],"dockerImageVersionId":30474,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Indroduction\n\nThe competition is focused on making graphs accessible to people with visual impairments or other disabilities that make it difficult to read and interpret the values displayed in graphs. In this competition, we are given a set of graphs, along with some data points such as x and y coordinates, x and y-axis values, and bounding boxes. However, the values in the graph images are not always clear, making it challenging to extract accurate data from them.\n\n\nTo address this challenge, I have fine-tuned an OCR model using EasyOCR. While pre-trained OCR models may not work accurately in all cases, fine-tuning an OCR model on the dataset provided by the competition can help us achieve better results.\n\n\nIn this notebook, I will be sharing my approach and implementation of the OCR model, along with the data pre-processing techniques steps used to extract accurate data from the graph images.\n\n\nThe goal of this notebook is to provide a detailed guide for anyone interested in using OCR to make graphs accessible to a wider audience. By sharing my approach, I hope to contribute to the development of more effective methods for making visual data accessible to all.","metadata":{}},{"cell_type":"markdown","source":"# ","metadata":{}},{"cell_type":"markdown","source":"# Step By Step How to Finetune EasyOCR?\n\n\n**Step 01: Clone EasyOCR Repo**\n\n* Within this repo, there exists a directory named `trainer`, which contains nearly all the necessary resources to train a custom model.\n\n**Step 02: Process the Data**\n\nIn this notebook, I kept things simple by not performing any data augmentations, as my primary goal was to ensure that everyone could understand it. It's worth noting that EasyOCR expects a specific data format that will look like the following:\n\n* The images will be stored in the `train/__results___files/` directory.\n\n* also we have to create a file named `labels.csv`. it contains the names of the images and their corresponding text. \n\nIf you're don't understand this data format, don't worry as I'll explain it later on. For now, let's continue reading.\n\n    \n**Step 03: Debugging**\n    \n* Furthermore, there may be some errors encountered when running the repository due to version updates. Therefore, I have made some modifications to the script to resolve these issues.","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}