RED-7669: optimize OCR-module performance
* reset test and settings
This commit is contained in:
parent
4c225c2219
commit
2632d2023d
@ -12,9 +12,9 @@ import lombok.experimental.FieldDefaults;
|
|||||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||||
public class OcrServiceSettings {
|
public class OcrServiceSettings {
|
||||||
|
|
||||||
int ocrThreadCount = 16; // Number of OCR threads
|
int ocrThreadCount = 4; // Number of OCR threads
|
||||||
int imageExtractThreadCount = 2; // Number of image extraction threads
|
int imageExtractThreadCount = 2; // Number of image extraction threads
|
||||||
int gsProcessCount = 5; // Number of Ghostscript processes
|
int gsProcessCount = 2; // Number of Ghostscript processes
|
||||||
int dpi = 300; // Target DPI for binarized images
|
int dpi = 300; // Target DPI for binarized images
|
||||||
int psmOverride = -1; // Overrides the page segmentation mode if > 0
|
int psmOverride = -1; // Overrides the page segmentation mode if > 0
|
||||||
int minImageHeight = 20; // Minimum height for images to be processed
|
int minImageHeight = 20; // Minimum height for images to be processed
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import io.micrometer.prometheus.PrometheusMeterRegistry;
|
|||||||
import io.micrometer.prometheus.PrometheusTimer;
|
import io.micrometer.prometheus.PrometheusTimer;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
//@Disabled // Ghostscript/Tesseract/Leptonica is not available on build server. If you want to run the test install these dependencies. See README.md for help.
|
@Disabled // Ghostscript/Tesseract/Leptonica is not available on build server. If you want to run the test install these dependencies. See README.md for help.
|
||||||
@SpringBootTest()
|
@SpringBootTest()
|
||||||
public class OcrServiceIntegrationTest extends AbstractTest {
|
public class OcrServiceIntegrationTest extends AbstractTest {
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public class OcrServiceIntegrationTest extends AbstractTest {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public void testOcr() {
|
public void testOcr() {
|
||||||
|
|
||||||
String text = testOCR("files/10.SYN524464 FS (A16148C) - Absorção cutânea.pdf");
|
String text = testOCR("files/2009-1048395_50pages_tables.pdf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user