{"id":23741363,"url":"https://github.com/shambac/project-sem-6","last_synced_at":"2026-04-28T23:33:27.103Z","repository":{"id":269552941,"uuid":"612500028","full_name":"ShambaC/Project-SEM-6","owner":"ShambaC","description":"Handwritten text recognition with LSTM RNN using IAM dataset","archived":false,"fork":false,"pushed_at":"2023-03-13T17:44:16.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-24T11:52:20.883Z","etag":null,"topics":["handwritten-text-recognition","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShambaC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-03-11T05:54:59.000Z","updated_at":"2024-07-30T07:19:43.000Z","dependencies_parsed_at":"2024-12-24T11:52:26.844Z","dependency_job_id":"6cb2eda2-8c81-460c-808c-d21b469b4e5e","html_url":"https://github.com/ShambaC/Project-SEM-6","commit_stats":null,"previous_names":["shambac/project-sem-6"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShambaC%2FProject-SEM-6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShambaC%2FProject-SEM-6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShambaC%2FProject-SEM-6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShambaC%2FProject-SEM-6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShambaC","download_url":"https://codeload.github.com/ShambaC/Project-SEM-6/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239889024,"owners_count":19713702,"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":["handwritten-text-recognition","tensorflow"],"created_at":"2024-12-31T10:39:57.595Z","updated_at":"2026-03-04T20:30:18.290Z","avatar_url":"https://github.com/ShambaC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project SEM 6\nHandwritten text recognition\n\n## What ?\nHandwritten text recognition using Long Short Term Memory implementation of RNN. Honestly I don't know what's happening here.\nThe [IAM Handwriting Database](https://fki.tic.heia-fr.ch/databases/iam-handwriting-database) is used to train the network. Specifically the words dataset.\n\n## How to ?\nClone the repo and then do the following.\n\n### Get the IAM Handwriting Dataset :\n- Make an [account](https://fki.tic.heia-fr.ch/register) on the database website.\n- Download the [words archive](https://fki.tic.heia-fr.ch/DBs/iamDB/data/words.tgz)\n- Extract the contents to the following directory structure on the root of this project : `Datasets/words`\n    - So the resulting folder structure should be : \n        ```\n        Datasets\n            |_words\n                |_a01\n                    |_a01-000u\n                        |_images.png\n                    |_a01-000x\n                    |_...\n                |_a02\n                |_...\n        ```\n- Now you need the labels for these images.\n- Download the [ascii archive](https://fki.tic.heia-fr.ch/DBs/iamDB/data/ascii.tgz)\n- Extract only the words.txt file to the `Datasets` folder.\n\n### Install the dependencies\n- install the requirements.\n- Do in terminal : `pip install -r requirements.txt`\n- The required packages are :\n    - numpy : 1.22.4\n    - opencv_python : 4.6.0.66\n    - pandas : 1.3.2\n    - Pillow : 9.4.0\n    - tensorflow : 2.10.0\n    - tqdm : 4.62.3\n\n### Edit the configurations\n- Open the `config.py` file.\n- Make whatever changes you want.\n- Mainly you might want to make changes to the following variables : \n    - batch_size\n    - learning_rate\n    - train_epochs\n    - train_workers\n    - validation_split\n\n### Train the model\n- Run the `train.py` script to train the model.\n- No need for editing anything in this file.\n- I trained the model with the following parameters :\n    - learning rate : 0.0005\n    - validation split : 0.9\n    - batch size = 16\n    - epochs = 100\n- I trained it with my GTX 1650. It used 2132 MB of GPU memory. Usage was around 8-10 %. Took around 140-150 seconds each epoch. Took about 4 hours for all 100 epochs.\n- CPU usage was around 50%. My CPU is Ryzen 7 3750H.\n- RAM usage was around 2 GBs.\n- You can visualise the training using tensorboard. Run `tensorboard --logdir = path_to_logs` in terminal to start the server.\n- The logs are located at the following folder : `Models/Handwriting_recognition/{timestamp}/logs`\n- After training, a bunch of files are generated. The only important files are `model.meow` and `configs.meow`.\n\n### Run the model\n- You can run the `inferenceModel.py` to check with only one image from the dataset itself.\n- OR use the Paint GUI made with tkinter by running the `tkRecog.py`.\n# IN BOTH CASES MAKE SURE TO EDIT THE unixTime VARIABLE WITH YOUR MODEL'S FOLDER\n\n# Thank You\nTotally not copied code.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshambac%2Fproject-sem-6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshambac%2Fproject-sem-6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshambac%2Fproject-sem-6/lists"}