Azure Computer Vision - Read Numeric Values

Eltee 21 Reputation points
2022-11-14T06:59:37.19+00:00

I love computer vision. It does exactly what I need it to.

My use case its that I'm reading in only handwritten numbers and while it works perfectly in most cases, in cases where the number one (1) is written as just a straight line rather than with the curve at the top and the line, Computer Vision recognises it as a the lowercase letter L (l) or the pipe character (|).

My question then, is that is there anyway to specify that I only want it to be reading in numeric characters (0-9) rather than alphanumeric (a-z,A-Z,0-9)? That way a straight line will almost always be read as a number one? Or do I have to write custom code on my end to do a find and replace?

Cheers.

Computer Vision
Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
415 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 48,906 Reputation points Microsoft Employee Moderator
    2022-11-14T09:50:13.53+00:00

    @Eltee The computer vision API Read API is asynchronous where the request is processed after submission and the result with the entire content of the image is returned in the corresponding operation location. This does not provide an option to filter the results as part of the original request.

    To ensure the required response you will have to write some client-side processing logic to read the confidence score of the response or compare the result with the required values i.e numeric values.
    As per my experience using the confidence score is advisable if you have an input image with numeric values and if one of the responses detects a non-numeric value with a low confidence score, you could use a threshold limit for confidence score in your application and if anything, below the threshold is returned it can be discarded or you can further compare the same with numeric values and then reject the response.

    I hope this helps!!

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.