Skip to content

Commit e107d2a

Browse files
aymanechilahAymane Chilah
and
Aymane Chilah
authored
Dicom pipelines (#1720)
* add dicom pretrained pipelines * fix params deid dicom --------- Co-authored-by: Aymane Chilah <aymane.chilah@inetum.com>
1 parent 34ab436 commit e107d2a

11 files changed

+227
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
layout: model
3+
title: Dicom de-identification
4+
author: John Snow Labs
5+
name: dicom_deid_full_anonymization
6+
date: 2025-02-19
7+
tags: [en, licensed]
8+
task: Dicom De-identification
9+
language: en
10+
nav_key: models
11+
edition: Visual NLP 5.5.0
12+
spark_version: 3.4.1
13+
supported: true
14+
recommended: true
15+
annotator: PipelineModel
16+
article_header:
17+
type: cover
18+
use_language_switcher: "Python-Scala-Java"
19+
---
20+
21+
## Description
22+
23+
Pretrained pipeline for doing Dicom De-identification in which all texts in the images are removed together with most of the tags in the metadata.
24+
25+
## Predicted Entities
26+
27+
{:.btn-box}
28+
[Live Demo](https://demo.johnsnowlabs.com/ocr/PP_DICOM_DEID/){:.button.button-orange.button-orange-trans.co.button-icon}
29+
[Open in Colab](https://github.com/JohnSnowLabs/visual-nlp-workshop/blob/master/jupyter/Dicom/SparkOcrDicomPretrainedPipelines.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
30+
<!-- [Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/ocr/dicom_deid_full_anonymization_en_5.5.0_3.0_1737198071000.zip){:.button.button-orange.button-orange-trans.arr.button-icon} -->
31+
32+
33+
## How to use
34+
35+
<div class="tabs-box" markdown="1">
36+
{% include programmingLanguageSelectScalaPythonNLU.html %}
37+
38+
```python
39+
dicom_df = spark.read.format("binaryFile").load(dicom_path)
40+
41+
pipeline = PretrainedPipeline("dicom_deid_full_anonymization", "en", "clinical/ocr")
42+
43+
result = pipeline.transform(dicom_df).cache()
44+
```
45+
```scala
46+
val dicom_df = spark.read.format("binaryFile").load(dicom_path)
47+
48+
val pipeline = new PretrainedPipeline("dicom_deid_full_anonymization", "en", "clinical/ocr")
49+
50+
val result = pipeline.transform(dicom_df).cache()
51+
```
52+
</div>
53+
54+
## Example
55+
56+
### Input:
57+
![Screenshot](/assets/images/examples_ocr/pp_deid_metadata.png)
58+
![Screenshot](/assets/images/examples_ocr/pp_deid_image.png)
59+
60+
### Output:
61+
![Screenshot](/assets/images/examples_ocr/pp2_metadata.png)
62+
![Screenshot](/assets/images/examples_ocr/pp2_deid.png)
63+
64+
## Model Information
65+
66+
{:.table-model}
67+
|---|---|
68+
|Model Name:|dicom_deid_full_anonymization|
69+
|Type:|ocr|
70+
|Compatibility:|Visual NLP 5.5.0+|
71+
|License:|Licensed|
72+
|Edition:|Official|
73+
|Language:|en|
74+
75+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
layout: model
3+
title: Dicom de-identification
4+
author: John Snow Labs
5+
name: dicom_deid_generic_augmented_minimal
6+
date: 2025-02-19
7+
tags: [en, licensed]
8+
task: Dicom De-identification
9+
language: en
10+
nav_key: models
11+
edition: Visual NLP 5.5.0
12+
spark_version: 3.4.1
13+
supported: true
14+
recommended: true
15+
annotator: PipelineModel
16+
article_header:
17+
type: cover
18+
use_language_switcher: "Python-Scala-Java"
19+
---
20+
21+
## Description
22+
23+
Pretrained pipeline for doing Dicom De-identification, attempting to remove the least possible amount of tags and image texts.
24+
25+
26+
## Predicted Entities
27+
28+
{:.btn-box}
29+
[Live Demo](https://demo.johnsnowlabs.com/ocr/PP_DICOM_DEID/){:.button.button-orange.button-orange-trans.co.button-icon}
30+
[Open in Colab](https://github.com/JohnSnowLabs/visual-nlp-workshop/blob/master/jupyter/Dicom/SparkOcrDicomPretrainedPipelines.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
31+
<!-- [Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/ocr/dicom_deid_generic_augmented_minimal_en_5.5.0_3.0_1737198071000.zip){:.button.button-orange.button-orange-trans.arr.button-icon} -->
32+
33+
34+
## How to use
35+
36+
<div class="tabs-box" markdown="1">
37+
{% include programmingLanguageSelectScalaPythonNLU.html %}
38+
39+
```python
40+
dicom_df = spark.read.format("binaryFile").load(dicom_path)
41+
42+
pipeline = PretrainedPipeline("dicom_deid_generic_augmented_minimal", "en", "clinical/ocr")
43+
44+
result = pipeline.transform(dicom_df).cache()
45+
```
46+
```scala
47+
val dicom_df = spark.read.format("binaryFile").load(dicom_path)
48+
49+
val pipeline = new PretrainedPipeline("dicom_deid_generic_augmented_minimal", "en", "clinical/ocr")
50+
51+
val result = pipeline.transform(dicom_df).cache()
52+
```
53+
</div>
54+
55+
## Example
56+
57+
### Input:
58+
![Screenshot](/assets/images/examples_ocr/pp_deid_metadata.png)
59+
![Screenshot](/assets/images/examples_ocr/pp_deid_image.png)
60+
61+
### Output:
62+
![Screenshot](/assets/images/examples_ocr/pp1_metadata.png)
63+
![Screenshot](/assets/images/examples_ocr/pp1_deid.png)
64+
65+
## Model Information
66+
67+
{:.table-model}
68+
|---|---|
69+
|Model Name:|dicom_deid_generic_augmented_minimal|
70+
|Type:|ocr|
71+
|Compatibility:|Visual NLP 5.5.0+|
72+
|License:|Licensed|
73+
|Edition:|Official|
74+
|Language:|en|
75+
76+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
layout: model
3+
title: Dicom de-identification
4+
author: John Snow Labs
5+
name: dicom_deid_generic_augmented_pseudonym
6+
date: 2025-02-19
7+
tags: [en, licensed]
8+
task: Dicom De-identification
9+
language: en
10+
nav_key: models
11+
edition: Visual NLP 5.5.0
12+
spark_version: 3.4.1
13+
supported: true
14+
recommended: true
15+
annotator: PipelineModel
16+
article_header:
17+
type: cover
18+
use_language_switcher: "Python-Scala-Java"
19+
---
20+
21+
## Description
22+
23+
Pretrained pipeline for doing Dicom De-identification, attempting to replaces values in metadata with pseudonyms. Images will be de-identified for PHI.
24+
25+
26+
## Predicted Entities
27+
28+
{:.btn-box}
29+
[Live Demo](https://demo.johnsnowlabs.com/ocr/PP_DICOM_DEID/){:.button.button-orange.button-orange-trans.co.button-icon}
30+
[Open in Colab](https://github.com/JohnSnowLabs/visual-nlp-workshop/blob/master/jupyter/Dicom/SparkOcrDicomPretrainedPipelines.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
31+
<!-- [Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/ocr/dicom_deid_generic_augmented_pseudonym_en_5.5.0_3.0_1737198071000.zip){:.button.button-orange.button-orange-trans.arr.button-icon} -->
32+
33+
34+
## How to use
35+
36+
<div class="tabs-box" markdown="1">
37+
{% include programmingLanguageSelectScalaPythonNLU.html %}
38+
39+
```python
40+
dicom_df = spark.read.format("binaryFile").load(dicom_path)
41+
42+
pipeline = PretrainedPipeline("dicom_deid_generic_augmented_pseudonym", "en", "clinical/ocr")
43+
44+
result = pipeline.transform(dicom_df).cache()
45+
```
46+
```scala
47+
val dicom_df = spark.read.format("binaryFile").load(dicom_path)
48+
49+
val pipeline = new PretrainedPipeline("dicom_deid_generic_augmented_pseudonym", "en", "clinical/ocr")
50+
51+
val result = pipeline.transform(dicom_df).cache()
52+
```
53+
</div>
54+
55+
## Example
56+
57+
### Input:
58+
![Screenshot](/assets/images/examples_ocr/pp_deid_metadata.png)
59+
![Screenshot](/assets/images/examples_ocr/pp_deid_image.png)
60+
61+
### Output:
62+
![Screenshot](/assets/images/examples_ocr/pp3_metadata.png)
63+
![Screenshot](/assets/images/examples_ocr/pp3_deid.png)
64+
65+
## Model Information
66+
67+
{:.table-model}
68+
|---|---|
69+
|Model Name:|dicom_deid_generic_augmented_pseudonym|
70+
|Type:|ocr|
71+
|Compatibility:|Visual NLP 5.5.0+|
72+
|License:|Licensed|
73+
|Edition:|Official|
74+
|Language:|en|
75+
76+
815 KB
Loading
Loading
779 KB
Loading
Loading
839 KB
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)