有人使用fineReader abbyy sdk 10吗?我很好奇图像ocr处理后是否有可能获得数据挖掘的成功率。
对于我们有从图像中收集数据的工作流的场景,如果识别的结果小于 90%,那么我们将我们的批次进行视觉验证/校正。
对于 sdk 处理,我使用的是 .net - 知道它不是那么重要,但是......以防万一
我怎样才能达到这个数字?谢谢你的建议
有人使用fineReader abbyy sdk 10吗?我很好奇图像ocr处理后是否有可能获得数据挖掘的成功率。
对于我们有从图像中收集数据的工作流的场景,如果识别的结果小于 90%,那么我们将我们的批次进行视觉验证/校正。
对于 sdk 处理,我使用的是 .net - 知道它不是那么重要,但是......以防万一
我怎样才能达到这个数字?谢谢你的建议
没有“全局识别置信度”属性。开发人员应使用自己的置信度标准自行计算。最简单的方法是遍历每个字符,检查 CharParams.IsSuspicious 属性。这是 FREngine 11 的代码示例 (C#)
//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(), @"SampleImages\Demo.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 识别结果仅在文本或表格块中具有文本。我建议你有一个全局字数统计变量。
(带有可疑字符的单词)/(总单词数)并将结果乘以 100。
2/4 等于 0.5。乘以 0.5 * 100 = 50%。那是您的准确性。上面在 abbyy 的另一个答案中给出了检查可疑字符和置信度的代码示例。