是否有人使用fineReader abbyy sdk 10?我很好奇,经过图像ocr处理后,是否有可能得到数据挖掘的成功率。
对于我们从图像中收集数据的工作流程的场景,如果识别结果低于90%,则我们将批处理进行视觉验证/校正。
对于sdk处理,我使用。net -这不是那么重要,但…只是为了以防万一
我怎样才能达到这个数字?谢谢你的建议
没有"全局识别置信度"属性。期望开发人员使用自己的置信度标准自行计算。最简单的方法是遍历每个字符,检查CharParams。IsSuspicious财产。下面是一个代码示例(c#)为法语11
//Statistics counters
//Count of all suspicious symbols in layout
private int suspiciousSymbolsCount;
//Count of all unrecognized symbols in layout
private int unrecognizedSymbolsCount;
//Count of all nonspace symbols in layout
private int allSymbolsCount;
//Count of all words in layout
private int allWordsCount;
//Count of all not dictionary word in layout
private int notDictionaryWordsCount;
private void processImage()
{
// Create document
FRDocument document = engineLoader.Engine.CreateFRDocument();
try {
// Add image file to document
displayMessage( "Loading image..." );
string imagePath = Path.Combine( FreConfig.GetSamplesFolder(), @"SampleImagesDemo.tif" );
document.AddImageFile( imagePath, null, null );
//Recognize document
displayMessage( "Recognizing..." );
document.Process( null );
// Calculate text statistics
displayMessage( "Calculating statistics..." );
clearStatistics();
for( int i = 0; i < document.Pages.Count; i++ ) {
calculateStatisticsForLayout( document.Pages[i].Layout );
}
//show calculated statistics
displayStatistics();
} catch( Exception error ) {
MessageBox.Show( this, error.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error );
}
finally {
// Close document
document.Close();
}
}
private void calculateStatisticsForLayout( Layout layout )
{
LayoutBlocks blocks = layout.Blocks;
for( int index = 0; index < blocks.Count; index++ ) {
calculateStatisticsForBlock( blocks[index] );
}
}
void calculateStatisticsForBlock( IBlock block )
{
if( block.Type == BlockTypeEnum.BT_Text ) {
calculateStatisticsForTextBlock( block.GetAsTextBlock() );
} else if( block.Type == BlockTypeEnum.BT_Table ) {
calculateStatisticsForTableBlock( block.GetAsTableBlock() );
}
}
void calculateStatisticsForTextBlock( TextBlock textBlockProperties )
{
calculateStatisticsForText( textBlockProperties.Text );
}
void calculateStatisticsForTableBlock( TableBlock tableBlockProperties )
{
for( int index = 0; index < tableBlockProperties.Cells.Count; index++ ) {
calculateStatisticsForBlock( tableBlockProperties.Cells[index].Block );
}
}
void calculateStatisticsForText( Text text )
{
Paragraphs paragraphs = text.Paragraphs;
for( int index = 0; index < paragraphs.Count; index++ ) {
calculateStatisticsForParagraph( paragraphs[index] );
}
}
void calculateStatisticsForParagraph( Paragraph paragraph )
{
calculateCharStatisticsForParagraph( paragraph );
calculateWordStatisticsForParagraph( paragraph );
}
void calculateCharStatisticsForParagraph( Paragraph paragraph )
{
for( int index = 0; index < paragraph.Text.Length; index++ )
{
calculateStatisticsForChar( paragraph, index );
}
}
void calculateStatisticsForChar( Paragraph paragraph, int charIndex )
{
CharParams charParams = engineLoader.Engine.CreateCharParams();
paragraph.GetCharParams( charIndex, charParams );
if( charParams.IsSuspicious )
{
suspiciousSymbolsCount++;
}
if( isUnrecognizedSymbol( paragraph.Text[charIndex] ) )
{
unrecognizedSymbolsCount++;
}
if( paragraph.Text[charIndex] != ' ' )
{
allSymbolsCount++;
}
}
void calculateWordStatisticsForParagraph( Paragraph paragraph )
{
allWordsCount += paragraph.Words.Count;
for( int index = 0; index < paragraph.Words.Count; index++ )
{
if( !paragraph.Words[index].IsWordFromDictionary )
{
notDictionaryWordsCount ++;
}
}
}
bool isUnrecognizedSymbol( char symbol )
{
//it is special constant used by FREngine recogniser
return ( symbol == 0x005E );
}
void displayStatistics()
{
labelAllSymbols.Text = "All symbols: " + allSymbolsCount.ToString();
labelSuspiciosSymbols.Text = "Suspicious symbols: " + suspiciousSymbolsCount.ToString();
labelUnrecognizedSymbols.Text = "Unrecognized symbols: " + unrecognizedSymbolsCount.ToString();
labelAllWords.Text = "All words: " + allWordsCount.ToString();
labelNotDictionaryWords.Text = "Non-dictionary words: " + notDictionaryWordsCount.ToString();
}
不存在这样的"全局置信度"值——但是你可以很容易地通过取每个字符的置信度并取总数的平均值来获得这个值。但是,我认为你应该直接向ABBYY的论坛或支持电子邮件地址提出请求,看看他们的建议是什么。
我真的不可能告诉你,如果我使用引擎,我可能会得到什么程度的信心,因为所有这些都是如此依赖于图像的质量,字体的大小等等:没有所谓的"平均文档",行业使用他们的数据基础。
祝你好运!
FRE SDK识别结果仅在text或Table块中包含文本。我建议你设置一个全局字数统计变量。
- 运行异步方法遍历单词并获取单词中可疑字符的数量。(IsSuspicious)
- 查找每页包含可疑字符的单词总数
-
(含有可疑字符的单词)/(单词总数)并将结果乘以100。
2/4 = 0.5。乘以0.5 * 100 = 50%。这就是你的准确性。检查可疑字符和置信度的代码示例在上面abbyy的另一个回答中给出。