{"id":22929921,"url":"https://github.com/genocs/form-recognizer","last_synced_at":"2025-07-23T21:12:42.933Z","repository":{"id":45219763,"uuid":"356498648","full_name":"Genocs/form-recognizer","owner":"Genocs","description":"Form Recognizer built on top of  Azure Cognitive Services ","archived":false,"fork":false,"pushed_at":"2024-02-26T03:26:44.000Z","size":381,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-03T10:43:14.359Z","etag":null,"topics":["azure","cognitive-services","ml","webapi"],"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/Genocs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"open_collective":"genocs","custom":["https://www.buymeacoffee.com/genocs"]}},"created_at":"2021-04-10T06:53:25.000Z","updated_at":"2024-01-24T11:53:40.000Z","dependencies_parsed_at":"2023-12-20T20:28:59.370Z","dependency_job_id":"36b4080f-b720-4cb7-b1a1-a3fbe17bcff1","html_url":"https://github.com/Genocs/form-recognizer","commit_stats":{"total_commits":122,"total_committers":2,"mean_commits":61.0,"dds":"0.024590163934426257","last_synced_commit":"cfd50d627f3a5ba4deb800ee85d1b86f7a47ce37"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genocs%2Fform-recognizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genocs%2Fform-recognizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genocs%2Fform-recognizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genocs%2Fform-recognizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genocs","download_url":"https://codeload.github.com/Genocs/form-recognizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229690635,"owners_count":18108260,"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":["azure","cognitive-services","ml","webapi"],"created_at":"2024-12-14T10:19:43.397Z","updated_at":"2024-12-14T10:19:46.491Z","avatar_url":"https://github.com/Genocs.png","language":"C#","funding_links":["https://opencollective.com/genocs","https://www.buymeacoffee.com/genocs","https://www.buymeacoffee.com/genocs)!","https://opencollective.com/genocs/contribute"],"categories":[],"sub_categories":[],"readme":"\u003c!-- PROJECT SHIELDS --\u003e\n[![License][license-shield]][license-url]\n[![Build][build-shield]][build-url]\n[![Downloads][downloads-shield]][downloads-url]\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![Discord][discord-shield]][discord-url]\n[![Gitter][gitter-shield]][gitter-url]\n[![Twitter][twitter-shield]][twitter-url]\n[![Twitterx][twitterx-shield]][twitterx-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n[license-shield]: https://img.shields.io/github/license/Genocs/form-recognizer?color=2da44e\u0026style=flat-square\n[license-url]: https://github.com/Genocs/form-recognizer/blob/main/LICENSE\n[build-shield]: https://github.com/Genocs/form-recognizer/actions/workflows/build_and_test.yml/badge.svg?branch=main\n[build-url]: https://github.com/Genocs/form-recognizer/actions/workflows/build_and_test.yml\n[downloads-shield]: https://img.shields.io/nuget/dt/Genocs.Microservice.Template.svg?color=2da44e\u0026label=downloads\u0026logo=nuget\n[downloads-url]: https://www.nuget.org/packages/Genocs.Microservice.Template\n[contributors-shield]: https://img.shields.io/github/contributors/Genocs/form-recognizer.svg?style=flat-square\n[contributors-url]: https://github.com/Genocs/form-recognizer/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/Genocs/form-recognizer?style=flat-square\n[forks-url]: https://github.com/Genocs/form-recognizer/network/members\n[stars-shield]: https://img.shields.io/github/stars/Genocs/form-recognizer.svg?style=flat-square\n[stars-url]: https://img.shields.io/github/stars/Genocs/form-recognizer?style=flat-square\n[issues-shield]: https://img.shields.io/github/issues/Genocs/form-recognizer?style=flat-square\n[issues-url]: https://github.com/Genocs/form-recognizer/issues\n[discord-shield]: https://img.shields.io/discord/1106846706512953385?color=%237289da\u0026label=Discord\u0026logo=discord\u0026logoColor=%237289da\u0026style=flat-square\n[discord-url]: https://discord.com/invite/fWwArnkV\n[gitter-shield]: https://img.shields.io/badge/chat-on%20gitter-blue.svg\n[gitter-url]: https://gitter.im/genocs/\n[twitter-shield]: https://img.shields.io/twitter/follow/genocs?color=1DA1F2\u0026label=Twitter\u0026logo=Twitter\u0026style=flat-square\n[twitter-url]: https://twitter.com/genocs\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://www.linkedin.com/in/giovanni-emanuele-nocco-b31a5169/\n[twitterx-shield]: https://img.shields.io/twitter/url/https/twitter.com/genocs.svg?style=social\n[twitterx-url]: https://twitter.com/genocs\n\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/genocs-library-logo.png\" alt=\"icon\"\u003e\n\u003c/p\u003e\n\n\n\nNuget package \u0026 Web Api service built with .NET8.\nThis repo contains the source code for the Genocs.FormRecognizer project. \n\nGenocs.FormRecognizer is a .NET library that allows to extract tag coming from images. The ML model is built using Azure Cognitive services. \n\n**NOTE:** Version 5.x.x doesn't support Microsoft Face Api any more\n\n\n## Prerequisites \n\nThe project requires to have an Azure subscription with\n- Storage account\n- Cognitive Services\n- Redis Cache\n\n### Distributed cache\nThe project use a cache to store the classification modelId.\nYou have two options:\n1. Use in memory cache\n2. Use Redis cache  \n\nThe system by default use the singleton object to store the classification key value pair data.\n\nTo use the library remember to setup the classification modelId calling:\nPOST {{root_url}}/api/Settings\n\n### Setup the environment by using environment variables\n\n``` bash\n  \"AppSettings\": {\n    \"PassportModel\": \"{{PassportModelUrl}}\"\n  },\n  \"AzureStorage\": {\n    \"AccountName\": \"{{accountName}}\",\n    \"AccountKey\": \"{{AccountKey}}\",\n    \"UploadContainer\": \"{{UploadContainer}}\",\n    \"TrainingSetContainerUrl\": \"{{TrainingSetContainerUrl}}\",\n    \"ThumbnailContainer\": \"{{ThumbnailContainer}}\",\n    \"InspectingFileUrl\": \"{{InspectingFileUrl}}\"\n  },\n  \"ImageClassifier\": {\n    \"Endpoint\": \"https://westeurope.api.cognitive.microsoft.com\",\n    \"SubscriptionKey\": \"{{SubscriptionKey}}\",\n    \"ModelId\": \"{{ModelId}}\"\n  },\n  \"FormRecognizer\": {\n    \"Endpoint\": \"https://westeurope.api.cognitive.microsoft.com\",\n    \"SubscriptionKey\": \"{{SubscriptionKey}}\"\n  },\n  \"AzureVision\": {\n    \"Endpoint\": \"https://westeurope.cognitiveservices.azure.com\",\n    \"SubscriptionKey\": \"{{SubscriptionKey}}\"\n  },\n  \"RedisSettings\": {\n    \"ConnectionString\": \"{{ConnectionString}}\"\n  },\n  \"RabbitMQ\": {\n    \"HostName\": \"localhost\",\n    \"Username\": \"guest\",\n    \"Password\": \"guest\",\n    \"VirtualHost\": \"/\"\n  }\n```  \n  \n## Integration Events\n\nThe system use RabbitMQ to publish events. The following events are published:\n\n`FormDataExtractionCompleted`\n\n``` csharp\nnamespace Genocs.Integration.CognitiveServices.IntegrationEvents;\n\n/// \u003csummary\u003e\n/// The event to raised when Form Data extraction is completed.\n/// \u003c/summary\u003e\npublic class FormDataExtractionCompleted\n{\n    /// \u003csummary\u003e\n    /// The reference id. Client can use it to keep external reference.\n    /// \u003c/summary\u003e\n    public string? ReferenceId { get; set; }\n\n    /// \u003csummary\u003e\n    /// The request id.\n    /// \u003c/summary\u003e\n    public string? RequestId { get; set; }\n\n    /// \u003csummary\u003e\n    /// The context id.\n    /// \u003c/summary\u003e\n    public string? ContextId { get; set; }\n\n    /// \u003csummary\u003e\n    /// The processed resource url.\n    /// \u003c/summary\u003e\n    public string ResourceUrl { get; set; } = default!;\n\n    /// \u003csummary\u003e\n    /// The classification object.\n    /// \u003c/summary\u003e\n    public Classification? Classification { get; set; }\n\n    /// \u003csummary\u003e\n    /// The dynamic data about the results.\n    /// \u003c/summary\u003e\n    public List\u003cdynamic\u003e? ContentData { get; set; }\n}\n```\n\n\n# Build and Test\n\n``` bash\n# Restore packages\ndotnet restore\n\n# Build solution\ndotnet build\n\n# Run tests\ndotnet test\n\n# Pack nuget package\ndotnet pack\n\n# Run WebApi\ndotnet run --project ./src/Genocs.FormRecognizer.WebApi\n\n# Run worker\ndotnet run --project ./src/Genocs.FormRecognizer.Worker\n\n# Build docker image\ndocker build -f webapi.dockerfile -t genocs/formrecognizer-webapi:5.0.4 -t genocs/formrecognizer-webapi:latest .\ndocker build -f worker.dockerfile -t genocs/formrecognizer-worker:5.0.4 -t genocs/formrecognizer-worker:latest .\n\n# Push image on dockerhub\ndocker push genocs/formrecognizer-webapi:5.0.4\ndocker push genocs/formrecognizer-webapi:latest\n\ndocker push genocs/formrecognizer-worker:5.0.4\ndocker push genocs/formrecognizer-worker:latest\n\n# Build using docker compose\ndocker-compose -f docker-compose.yml build\n\n# Run using docker compose\ndocker-compose -f docker-compose.yml up -d\n```\n\n\napi-workbench.rest\n\nUse this file inside Visual Studio code with [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) plugin\n\n\n## License\n\nThis project is licensed with the [MIT license](LICENSE).\n\n## Changelogs\n\nView Complete [Changelogs](https://github.com/Genocs/form-recognizer/blob/main/CHANGELOGS.md).\n\n## Community\n\n- Discord [@genocs](https://discord.com/invite/fWwArnkV)\n- Facebook Page [@genocs](https://facebook.com/Genocs)\n- Youtube Channel [@genocs](https://youtube.com/c/genocs)\n\n\n## Support\n\nHas this Project helped you learn something New? or Helped you at work?\nHere are a few ways by which you can support.\n\n- ⭐ Leave a star! \n- 🥇 Recommend this project to your colleagues.\n- 🦸 Do consider endorsing me on LinkedIn for ASP.NET Core - [Connect via LinkedIn](https://www.linkedin.com/in/giovanni-emanuele-nocco-b31a5169/) \n- ☕ If you want to support this project in the long run, [consider buying me a coffee](https://www.buymeacoffee.com/genocs)!\n  \n\n[![buy-me-a-coffee](https://raw.githubusercontent.com/Genocs/form-recognizer/main/assets/buy-me-a-coffee.png \"buy-me-a-coffee\")](https://www.buymeacoffee.com/genocs)\n\n## Code Contributors\n\nThis project exists thanks to all the people who contribute. [Submit your PR and join the team!](CONTRIBUTING.md)\n\n[![genocs contributors](https://contrib.rocks/image?repo=Genocs/form-recognizer \"genocs contributors\")](https://github.com/genocs/form-recognizer/graphs/contributors)\n\n## Financial Contributors\n\nBecome a financial contributor and help me sustain the project. [Support the Project!](https://opencollective.com/genocs/contribute)\n\n\u003ca href=\"https://opencollective.com/genocs\"\u003e\u003cimg src=\"https://opencollective.com/genocs/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n\n## Acknowledgements\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenocs%2Fform-recognizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenocs%2Fform-recognizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenocs%2Fform-recognizer/lists"}