Confidence value of Tesseract OCR [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have some questions about Tesseract OCR confidence value which can be obtained by calling AllWordConfidences() function in C++ API.
What is the confidence value (returned by tesseract API) and how tesseract calculates that value? (like based on what factors)?
Is there any possibility that I can change the accuracy levels of tesseract?
Can anyone help me with these questions? Thank you.

I've used similar metrics in other OCR software (specifically in ANPR software). If I recall correctly there are two confidence factors overall; one is a 0->100% confidence factor and the other is a 0->X value that is used as an aggregation of the various cascading confidence factors.
This value is arbitrary and so I'd recommend using the 0->100% value. Also note that each character should have a confidence factor.
These metrics calculated by evaluating how clear contour lines/edges are, how close the shapes detected in characters are to expected shapes and how close the decisions are to choose one character vs another is. IE the OCR has an easier time choosing between 'p' and 'b' than 'Q' and 'O'.
The only way to 'improve' these metrics is to train the detector! So prepare to have lots of valid data. You will also need patience using the Tesseract training tools - I found them to be 75% nightmarish.
Good luck!

Related

Is it possible to use a machine learning library with streaming inputs and outputs? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to incorporate machine learning into a project ive been working on but i havent seen anything about my intended use case. It seems like the old pandoras box project did something like this but with textual input and output.
I want to train a model in real time as well as use it (and then switch it from testing to live api endpoints when it works well enough.)
But every library ive found works like "feed in a datablob, get an answer"
I want to be able to stream data into it:
instead of giving it "5,4,3,4,3,2,3,4,5" and it says "1" or "-1" or "0"
I want to give it "5" then "4" then "3" then "4" etc and each time it responds.
Im not even sure if "streaming" is the right word for this. Please help!
It sounds like a usecase for recurrent neural networks, which translate sequences (your stream) into single outputs or other sequences. This a well-explored approach, e.g., in natural language processing. Tensorflow has support for different flavors of such nets.

Implement video editor [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to implement a "simple" video editor and since I'm new to the topic, I'm not sure how to start.
The editor should have the following features / components
A timeline for multiple recordings
A video player that plays the edited video in real-time (it should render all added effects and assets)
Assets that can be placed on the timeline such as text elements, arrows and so on
I'd like to start with the video player and then build the other components around it.
Which frameworks would you recommend?
For the player, I'm not sure if DirectShow is the right choice or MediaFoundation would be better. Are there other libraries to consider? FFmpeg?
My recommendation given your interests is to start with Blender
http://www.blender.org
It's written in a combination of C, C++, and Python, has a substantial user community, and has the advantage of open source code so you can see how a real large project looks.
You might end up just contributing to it, or you might lift bits of it to bootstrap your own project, etc. But if you don't know about, it's worthwhile to look at if only to help you refine what you want to work on.

Neural Network Image Classification, The Most Efficient Solution / Suggestion [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have already built a deep neural network image classifier program in Matlab (gives 1 output for each example, such as is it a car or not), using gradient descent and back propagation algorithms. It is a simple feed forward network, with 1 or 2 hidden layers. I'm using the obtained weights in a nvcc C++ for real time object detection.
NN training results have quite a good accuracy (more than %99.9, but not enough), and can process more than 100,000 image files of size 32x32. But only problem with the Matlab code is: it ends up in local minimums in each training, so requires many different trainings but its training speed is quite slow.
Other than my slowly working Matlab NN training code, I have tried:
1) OpenCV 3.0.0, it "probably" has a bug in virtual float cv::ml::StatModel::predict function at the moment. So I weren't able to use it properly.
2) Tried OpenNN with gui, but it even gets stuck during loading and training. I'm still working on to fix that.
3) Checked FANN, but could only find "one" tutorial code written in C++. May take quite a time for me to master it with out examples.
4) I had tried Theano in Python a few months ago, it was quite customizable, and has quite many tutorials. But had never tried training image files with it.
5) I can also transfer my Matlab code to nvcc C++, and try conjugate gradients method to speed up further. But didn't try this yet, it is the last choice for me.
Mastering in each path may take quite a big time, and I have many more different works to do too. Which path should I take, or do you have another suggestion? Thank you
If you have experience with Matlab, the easiest path is to go through the "VGG Convolutional Neural Networks Practical" and use their open source MatConvNet toolbox for Matlab: http://www.vlfeat.org/matconvnet/.

Multilingual Dictionary Solution C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need a multilingual dictionary accessible through C++ which is capable of performing the following operation:
inputs: Language of Input Word, Input Word, Language of Output Definition
output: A string definition of the input word in the desired output language (NULL if the word is not found)
Some restrictions: This function needs to be able to run in under 0.5 seconds on an iPhone 6. Therefore, only fast and slim web based solutions or highly optimized local dictionary search functions are suitable.
I have considered using the Bing Translate API to translate the definition of the word to the desired destination language. However, I have been unable to find a dictionary which will return a definition of a word given the language of the input word. Does such a system exist? If not, how could I go about implementing the system outlined here? Any and all suggestions and information are greatly appreciated.
Thanks in advance!
Here is how I solved this. I downloaded word lists for all of the supported languages. I checked the word list of the language of the given input word and if the input word existed in this list, I used the bing translate API to get the definition of the input word in the destination language. Otherwise I returned NULL as expected.
Here is a link to an English word list similar to the one I used:
http://www-01.sil.org/linguistics/wordlists/english/wordlist/wordsEn.txt
This Microsoft site contains information about the Bing Translator API costs and how to get started:
https://datamarket.azure.com/dataset/bing/microsofttranslator

High Volume Geocoding API? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like some recommendations on a high volume Geocoding API. I've reached out to Google and Yahoo so far. Google wants too much money for too little offering and Yahoo doesn't have a commercial offering.
I need to geocode about 250,000 items per day initially, but this number will grow exponentially in the near future, so I need a solution that will grow with us.
Any thoughts?
There are many providers that offer bulk and/or batch geocoding. You can also purchase datasets, depending on your accuracy and coverage area requirements. As one example, Microsoft offers a solution. I can not vouch for its quality.
I'd get on the horn to SimpleGeo and see what kind of deal could be put in play; they're a startup so probably hungry for volume business.
Otherwise, I'd probably start looking to the source rather than brokers like Google, e.g., TeleAtlas, but that's bound to be painful.
If you're daily numbers will be exponentially larger than 250K, e.g, 1.5e+16, you're bound to be repeating a lot of queries; find a way to clean them up/normalize them to increase cache hits and shove them into memcached to keep the third-party queries down.
This is a helpful resource, stumbled across when looking for ways to get TIGER data which has to be free, but US only: http://www.vterrain.org/Culture/geocoding.html
One comment on simplegeo , their api is simple and the you can query large number of records in a very short term . But their geo coding quality is not as good as Google or even Bing. I had many cases where I got the same coordinates for different set of addresses.
I'm looking for a solution my self and I'm testing the MapQuest api , seems like there is not rate limit (per say).