On-device artificial intelligence systems and methods for document auto-rotation
First Claim
1. A method, comprising:
- converting, by an auto-rotation module on a user device, a document image to a monochrome image having black and white pixels;
segmenting, by the auto-rotation module, the monochrome image into bounding boxes, the segmenting including generating a bounding box defining a connected segment of black pixels in the monochrome image;
determining, by the auto-rotation module, textual snippets from the bounding boxes;
preparing, by the auto-rotation module, the textual snippets for input to a single-layer neural network;
processing the textual snippets by the auto-rotation module using the single-layer neural network, wherein the single-layer neural network is trained to recognize a correct orientation of each textual snippet and output a set of results for the each textual snippet, each result of the set of results indicating a probability of a degree of rotation needed to achieve the correct orientation of the each textual snippet;
examining, by the auto-rotation module, results from the processing, the examining comprising comparing the probability with a threshold;
determining, by the auto-rotation module based on a majority of the results from the examining, a correct orientation of the document image, the majority of the results indicating a degree of rotation needed to achieve the correct orientation of the document image; and
automatically rotating, by the auto-rotation module, the document image by the degree of rotation to achieve the correct orientation of the document image.
1 Assignment
0 Petitions
Accused Products
Abstract
An auto-rotation module having a single-layer neural network on a user device can convert a document image to a monochrome image having black and white pixels and segment the monochrome image into bounding boxes, each bounding box defining a connected segment of black pixels in the monochrome image. The auto-rotation module can determine textual snippets from the bounding boxes and prepare them into input images for the single-layer neural network. The single-layer neural network is trained to process each input image, recognize a correct orientation, and output a set of results for each input image. Each result indicates a probability associated with a particular orientation. The auto-rotation module can examine the results, determine what degree of rotation is needed to achieve a correct orientation of the document image, and automatically rotate the document image by the degree of rotation needed to achieve the correct orientation of the document image.
41 Citations
20 Claims
-
1. A method, comprising:
-
converting, by an auto-rotation module on a user device, a document image to a monochrome image having black and white pixels; segmenting, by the auto-rotation module, the monochrome image into bounding boxes, the segmenting including generating a bounding box defining a connected segment of black pixels in the monochrome image; determining, by the auto-rotation module, textual snippets from the bounding boxes; preparing, by the auto-rotation module, the textual snippets for input to a single-layer neural network; processing the textual snippets by the auto-rotation module using the single-layer neural network, wherein the single-layer neural network is trained to recognize a correct orientation of each textual snippet and output a set of results for the each textual snippet, each result of the set of results indicating a probability of a degree of rotation needed to achieve the correct orientation of the each textual snippet; examining, by the auto-rotation module, results from the processing, the examining comprising comparing the probability with a threshold; determining, by the auto-rotation module based on a majority of the results from the examining, a correct orientation of the document image, the majority of the results indicating a degree of rotation needed to achieve the correct orientation of the document image; and automatically rotating, by the auto-rotation module, the document image by the degree of rotation to achieve the correct orientation of the document image. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An apparatus, comprising:
-
a processor; a non-transitory computer-readable medium; and stored instructions translatable by the processor for implementing an auto-rotation module on the apparatus, the auto-rotation module having a single-layer neural network and configured for; converting a document image to a monochrome image having black and white pixels; segmenting the monochrome image into bounding boxes, the segmenting including generating a bounding box defining a connected segment of black pixels in the monochrome image; determining textual snippets from the bounding boxes; preparing the textual snippets for input to the single-layer neural network; processing the textual snippets using the single-layer neural network, wherein the single-layer neural network is trained to recognize a correct orientation of each textual snippet and output a set of results for the each textual snippet, each result of the set of results indicating a probability of a degree of rotation needed to achieve the correct orientation of the each textual snippet; examining results from the processing, the examining comprising comparing the probability with a threshold; determining, based on a majority of the results from the examining, a correct orientation of the document image, the majority of the results indicating a degree of rotation needed to achieve the correct orientation of the document image; and automatically rotating the document image by the degree of rotation to achieve the correct orientation of the document image. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product comprising a non-transitory computer-readable medium storing instructions translatable by a processor of a user device for implementing an auto-rotation module having a single-layer neural network on the user device, the instructions when translated by the processor perform:
-
converting a document image to a monochrome image having black and white pixels; segmenting the monochrome image into bounding boxes, the segmenting including generating a bounding box defining a connected segment of black pixels in the monochrome image; determining textual snippets from the bounding boxes; preparing the textual snippets for input to the single-layer neural network; processing the textual snippets using the single-layer neural network, wherein the single-layer neural network is trained to recognize a correct orientation of each textual snippet and output a set of results for the each textual snippet, each result of the set of results indicating a probability of a degree of rotation needed to achieve the correct orientation of the each textual snippet; examining results from the processing, the examining comprising comparing the probability with a threshold; determining, based on a majority of the results from the examining, a correct orientation of the document image, the majority of the results indicating a degree of rotation needed to achieve the correct orientation of the document image; and automatically rotating the document image by the degree of rotation to achieve the correct orientation of the document image. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification