Skip to content

Commit

Permalink
Image to text OCR conversion implementation to redact images with tex…
Browse files Browse the repository at this point in the history
…t only DLPs (#24)
  • Loading branch information
abdolence authored Aug 19, 2024
1 parent d6046ff commit 2a874ef
Show file tree
Hide file tree
Showing 21 changed files with 959 additions and 401 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.rten filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
*.swp
tmp/
lib/
models/
147 changes: 146 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ categories = ["command-line-utilities"]
description = "Copy & Redact cli tool to securely copy and redact files removing Personal Identifiable Information (PII) across various filesystems."

[features]
default = ["pdf-render", "clipboard"]
default = ["pdf-render", "clipboard", "ocr"]
ci-gcp = [] # For testing on CI/GCP
ci-aws = [] # For testing on CI/AWS
ci-ms-presidio = [] # For testing on CI/MS Presidiom
ci-gcp-llm = [] # For testing on CI/GCP with LLM models
ci-open-ai = [] # For testing on CI/OpenAIP
ci-clibpoard = [] # For testing on CI/Clipboard
ci-ocr = [] # For testing on CI/OCR
ci = ["ci-gcp", "ci-aws", "ci-ms-presidio", "ci-gcp-llm", "ci-open-ai", "ci-clibpoard"]
pdf-render = ["pdfium-render"]
clipboard = ["arboard"]
ocr = ["ocrs", "rten", "rten-imageproc"]


[dependencies]
Expand All @@ -43,6 +45,7 @@ sha2 = "0.10"
async-trait = "0.1"
hex = "0.4"
thiserror = "1"
anyhow = "1"
sync_wrapper = { version = "1", features = ["futures"] }
async-recursion = "1"
mime = "0.3"
Expand All @@ -62,8 +65,13 @@ rand = "0.8"
pdfium-render = { version = "0.8", features = ["thread_safe", "image"], optional = true }
image = "0.25"
bytes = { version = "1" }
arboard = { version = "3", features = ["image"], optional = true }
serde_json = "1"
arboard = { version = "3", features = ["image"], optional = true }
ocrs = { version = "0.8", optional = true }
rten = { version = "0.10", optional = true }
rten-imageproc = { version = "0.10", optional = true }
dirs = "5.0.1"



[dev-dependencies]
Expand Down
Loading

0 comments on commit 2a874ef

Please sign in to comment.