{"id":15956295,"url":"https://github.com/nagelflorian/document-classification","last_synced_at":"2025-03-18T00:30:29.095Z","repository":{"id":74425402,"uuid":"92691739","full_name":"nagelflorian/document-classification","owner":"nagelflorian","description":"Image classifier based on the Inception model to get predictions on documents","archived":false,"fork":false,"pushed_at":"2017-05-28T22:55:05.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-09T00:32:03.826Z","etag":null,"topics":["documents","flask","image-classification","inception","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"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/nagelflorian.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":"2017-05-28T22:51:45.000Z","updated_at":"2022-02-07T18:30:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"cabe0c8d-cf6f-4200-8e96-67b9c5833f7c","html_url":"https://github.com/nagelflorian/document-classification","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/nagelflorian%2Fdocument-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagelflorian%2Fdocument-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagelflorian%2Fdocument-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagelflorian%2Fdocument-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nagelflorian","download_url":"https://codeload.github.com/nagelflorian/document-classification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893565,"owners_count":20364914,"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":["documents","flask","image-classification","inception","tensorflow"],"created_at":"2024-10-07T13:30:23.676Z","updated_at":"2025-03-18T00:30:29.089Z","avatar_url":"https://github.com/nagelflorian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Image Classifier\n\nThis is a simple image classifier based on the [Inception model](https://github.com/google/inception) to get predictions on whether a supplied image is a document or not.\n\n## Getting Started\n\nInstall Python dependencies using [PIP](https://pip.pypa.io/en/stable/):\n\n```\npip install -r requirements.txt\n```\n\n## Training\n\nAdd training images in the `training/images` directory like shown below. Due to the usage of the Inception model you can achieve great results with a relatively small data set (~100 images for each category).\n\n```\n├── training\n│   ├── images\n│   │   ├── documents [your training images]\n│   │   └── random    [your training images]\n```\n\nOnce we have the training images we can start the process of retraining the Inception model.\n\n```\nscripts/training.sh\n```\n\n## Predictions\n\n**Notice that this image classifier currently only works with JPEG images.**\n\n```\n$ python src/prediction.py \u003cYOUR_IMAGE_URL\u003e\n\u003e document (score = 0.99978)\n\u003e random (score = 0.00022)\n```\n\n## Rest-API (development-only)\n\nFor development purposes you can run a simple REST endpoint to serve predictions. For serious production use something like [TensorFlow Serving](https://tensorflow.github.io/serving/) is highly recommended.\n\n```\nexport FLASK_APP=\"api.py\"\nexport FLASK_DEBUG=1\n\nflask run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagelflorian%2Fdocument-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnagelflorian%2Fdocument-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagelflorian%2Fdocument-classification/lists"}