{"id":19099911,"url":"https://github.com/bryanoliveira/cpp-pdf2txt","last_synced_at":"2025-04-30T16:22:14.922Z","repository":{"id":123883932,"uuid":"91985976","full_name":"bryanoliveira/cpp-pdf2txt","owner":"bryanoliveira","description":"A PDF to text converter using a MLP-based OCR.","archived":false,"fork":false,"pushed_at":"2017-09-03T15:13:37.000Z","size":137,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T17:46:14.551Z","etag":null,"topics":["arquivo","autocorrection","autocorrector","converter","file","image","mlp","multilayer","ocr","pdf","perceptron","text"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryanoliveira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-21T20:38:06.000Z","updated_at":"2021-01-09T19:46:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"6181cecf-60a6-4279-853d-855833b38be5","html_url":"https://github.com/bryanoliveira/cpp-pdf2txt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanoliveira%2Fcpp-pdf2txt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanoliveira%2Fcpp-pdf2txt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanoliveira%2Fcpp-pdf2txt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanoliveira%2Fcpp-pdf2txt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryanoliveira","download_url":"https://codeload.github.com/bryanoliveira/cpp-pdf2txt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251740002,"owners_count":21635958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arquivo","autocorrection","autocorrector","converter","file","image","mlp","multilayer","ocr","pdf","perceptron","text"],"created_at":"2024-11-09T03:52:22.268Z","updated_at":"2025-04-30T16:22:14.917Z","avatar_url":"https://github.com/bryanoliveira.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF 2 Text Converter\nThis is a PDF to text converter prototype.\nThis project converts scanned files (.pdf) into a set of images, reads the containing characters using a multilayer perceptron, runs an autocorrector and then writes a .txt file with the results.\n\n## How it (supposedly) works\n\n### MLP Training\n- Initialize with the following parameters:\n   - Learning rate = 150\n   - Sigmoid Slope = 0.014\n   - Weight bias = 30\n   - Number of Epochs = 300-600\n   - Mean error threshold value = 0.0002\n- Initialize random weights\n- Load training sets\n### Preparation\n- Read PDF from command-line\n- Convert it to a set of images using pdftoppm\n### Preprocessing (for each image)\n- Convert to grayscale\n- Apply threshold\n- Erode\n- Dilate\n- Apply pose transformation\n### Detection\n- Find lines (y axis limits)\n- Find characters/digits (x axis limits)\n- Extract char matrix\n- Resize pixel matrix to MLP's input size\n### Recognition (for each char)\n- Send matrix to MLP\n- Concatenate result to output text\n- (Learning phase) Compare results and backpropagate errors\n### Presentation\n- (If language is supported) apply autocorrection\n- Save results in a .txt file and show it on the screen\n\n## Usage\nYou have to have pdftoppm and build-essential running on a GNU/Linux distribution.\n\n## Notes\n\nPlease note that this project is no longer being updated and this version is incomplete (the remaining scripts don't talk to each other but its main idea is already implemented). Some of the code may be written in portuguese.\n\nYou can contact me at bryanufg@gmail.com if you have any doubts about the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanoliveira%2Fcpp-pdf2txt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryanoliveira%2Fcpp-pdf2txt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanoliveira%2Fcpp-pdf2txt/lists"}