Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions docs/en/ocr_benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ seotitle: Visual NLP | John Snow Labs
title: Speed Benchmarks
permalink: /docs/en/ocr_benchmark
key: docs-benchmark
modify_date: "2024-06-24"
modify_date: "2025-02-04"
show_nav: true
sidebar:
nav: sparknlp-healthcare
Expand Down Expand Up @@ -33,10 +33,42 @@ sidebar:

#### Benchmark Table

{:.table-model-big}
| Instance | memory | cores | input\_data\_pages| partition | second per page | timing |
| ------------- | ------ | ----- | ----------------- | ------------- | --------------- | ------- |
| m5n.4xlarge | 64 GB | 16 | 1000 | 10 | 0.24 | 4 mins |
| m5n.8xlarge | 128 GB | 32 | 1000 | 32 | 0.15 | 2.5 mins|

</div>
### DICOM De-identification Benchmark Experiment

- **Datasets:**
- 15 files of 1 frame, uncompresses, 3.3 MB
- 15 files of 1 frame, compresses, 1.1 MB
- 1 file of 160 frames, 377,5 MB
- **Instance :**
- g5.4xlarge (16 vCPUs, 64 GiB memory)
- g5.8xlarge (32 vCPUs, 128 GiB memory)
- **Versions:**
- **spark-nlp Version:** 5.5.1
- **visual-nlp Version:** 5.5.0
- **spark-nlp-jsl Version :** 5.5.1
- **Spark Version :** 3.5.0
- **Visual NLP Pipeline:** [SparkOcrDicomDeIdentificationV2Streaming](https://github.com/JohnSnowLabs/visual-nlp-workshop/blob/master/jupyter/Dicom/SparkOcrDicomDeIdentificationV2Streaming.ipynb)

</div><div class="h3-box" markdown="1">

#### Benchmark Table

| Test | memory | cores | files | frames | sec/frame | sec/frame 1 cpu |
| ------------------------- | ------ | ----- | ----- | ------ | --------- | --------------- |
| 1 frame, uncompressed | 64 GB | 16 | 15 | 1 | 11.6 | 185.6 |
| 1 frame, compressed | 64 GB | 16 | 15 | 1 | 11.6 | 185.6 |
| 160 frames, lossy compres | 128 GB | 32 | 1 | 160 | 0.925 | 29,6 |

**"sec/frame 1 cpu"** column is rough estimation how much it'd take on 1 cpu machine. For your environment you may divide it on number of available cpus to get rough estimation.

#### Conclusions

- Compression doesn't affect performance due it is not so heavy operation in comparison with the rest
- Performance may depend on DICOM image's size abd quality

</div>