mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-10 21:10:55 +08:00
update api4cpp .
This commit is contained in:
1 parent
66dbb5b705
commit
82184c1068
191 files changed
+6940
-19394
No files matched your search
@@ -75,11 +75,11 @@ TextLine CrnnNet::scoreToTextLine(const std::vector<float> &outputData, int h, i
|
||||
float maxValue;
|
||||
|
||||
for (int i = 0; i < h; i++) {
|
||||
maxIndex = int(argmax(&outputData[i * w], &outputData[(i + 1) * w]));
|
||||
maxValue = float(*std::max_element(&outputData[i * w], &outputData[(i + 1) * w]));
|
||||
maxIndex = int(argmax(&outputData[i * w], &outputData[(i+1) * w-1]));
|
||||
maxValue = float(*std::max_element(&outputData[i * w], &outputData[(i + 1) * w-1]));
|
||||
|
||||
if (maxIndex > 0 && maxIndex < keySize && (!(i > 0 && maxIndex == lastIndex))) {
|
||||
scores.emplace_back(maxValue);
|
||||
scores.push_back(maxValue);
|
||||
strRes.append(keys[maxIndex]);
|
||||
}
|
||||
lastIndex = maxIndex;
|
||||
|
||||
Reference in new issue
Block a user