From 06d5cfb25a376644e40dcd48efc49579b22298e2 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Thu, 25 Feb 2021 09:59:42 -0800 Subject: [PATCH 1/3] adding comment about image/bmp being accepted --- .../azure/ai/formrecognizer/_form_recognizer_client.py | 6 +++--- .../azure/ai/formrecognizer/_form_training_client.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py index 34e18c63683b..47f3ecd6b201 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py @@ -597,10 +597,10 @@ def begin_recognize_custom_forms(self, model_id, form, **kwargs): """Analyze a custom form with a model trained with or without labels. The form to analyze should be of the same type as the forms that were used to train the model. The input document must be of one of the supported content types - 'application/pdf', - 'image/jpeg', 'image/png', or 'image/tiff'. + 'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. :param str model_id: Custom model identifier. - :param form: JPEG, PNG, PDF, or TIFF type file stream or bytes. + :param form: JPEG, PNG, PDF, TIFF, or BMP type file stream or bytes. :type form: bytes or IO[bytes] :keyword bool include_field_elements: Whether or not to include all lines per page and field elements such as lines, words, @@ -687,7 +687,7 @@ def begin_recognize_custom_forms_from_url(self, model_id, form_url, **kwargs): :param str model_id: Custom model identifier. :param str form_url: The URL of the form to analyze. The input must be a valid, encoded URL - of one of the supported formats: JPEG, PNG, PDF, or TIFF. + of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. :keyword bool include_field_elements: Whether or not to include all lines per page and field elements such as lines, words, and selection marks for each form field. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py index 93d6a1cfbdb8..35fbf3b7bc79 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py @@ -86,7 +86,7 @@ def begin_training(self, training_files_url, use_training_labels, **kwargs): externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Note that a container URI (without SAS) is accepted only when the container is public. Models are trained using documents that are of the following content type - 'application/pdf', - 'image/jpeg', 'image/png', 'image/tiff'. Other types of content in the container is ignored. + 'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. Other types of content in the container is ignored. :param str training_files_url: An Azure Storage blob container's SAS URI. A container URI (without SAS) can be used if the container is public. For more information on setting up a training data set, see: From 137a5db8164d8491309566795dcbf04620517cbe Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Fri, 5 Mar 2021 10:03:37 -0800 Subject: [PATCH 2/3] add comments on async clients --- .../ai/formrecognizer/aio/_form_recognizer_client_async.py | 6 +++--- .../ai/formrecognizer/aio/_form_training_client_async.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py index 67a66edb0218..3e5b6386bb1b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py @@ -608,10 +608,10 @@ async def begin_recognize_custom_forms( """Analyze a custom form with a model trained with or without labels. The form to analyze should be of the same type as the forms that were used to train the model. The input document must be of one of the supported content types - 'application/pdf', - 'image/jpeg', 'image/png', or 'image/tiff'. + 'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. :param str model_id: Custom model identifier. - :param form: JPEG, PNG, PDF, or TIFF type file stream or bytes. + :param form: JPEG, PNG, PDF, TIFF, or BMP type file stream or bytes. :type form: bytes or IO[bytes] :keyword bool include_field_elements: Whether or not to include all lines per page and field elements such as lines, words, @@ -701,7 +701,7 @@ async def begin_recognize_custom_forms_from_url( :param str model_id: Custom model identifier. :param str form_url: The URL of the form to analyze. The input must be a valid, encoded URL - of one of the supported formats: JPEG, PNG, PDF, or TIFF. + of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. :keyword bool include_field_elements: Whether or not to include all lines per page and field elements such as lines, words, and selection marks for each form field. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py index 47e30c1cb7f2..1fb0e25dca90 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py @@ -80,7 +80,7 @@ async def begin_training( externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Note that a container URI (without SAS) is accepted only when the container is public. Models are trained using documents that are of the following content type - 'application/pdf', - 'image/jpeg', 'image/png', 'image/tiff'. Other types of content in the container is ignored. + 'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. Other types of content in the container is ignored. :param str training_files_url: An Azure Storage blob container's SAS URI. A container URI (without SAS) can be used if the container is public. For more information on setting up a training data set, see: From 7087eac4b042d4ba4105458c0477c0633c839d20 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Fri, 5 Mar 2021 13:29:44 -0800 Subject: [PATCH 3/3] update changelog --- sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md index af14d37db599..85d1cdd10d8c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md @@ -2,6 +2,10 @@ ## 3.1.0b4 (Unreleased) +**New features** + +- Content-type `image/bmp` now supported by custom forms and training methods. + **Dependency Updates** - Bumped `msrest` requirement from `0.6.12` to `0.6.21`.