forked from ZGGSONG/STranslate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleanocr.ps1
38 lines (31 loc) · 929 Bytes
/
cleanocr.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Write-Host ""
Write-Host "========================================"
Write-Host "Deleting ocr dlls..."
Write-Host "========================================"
$path_to_files = "publish"
$path_to_back = "../"
Set-Location -Path $path_to_files
$dlls = @(
"PaddleOCR.dll",
"common.dll",
"libiomp5md.dll",
"mkldnn.dll",
"mklml.dll",
"opencv_world470.dll",
"paddle_inference.dll",
"tbb12.dll",
"tbbmalloc.dll",
"tbbmalloc_proxy.dll",
"vcruntime140.dll",
"vcruntime140_1.dll"
)
foreach ($dll in $dlls) {
Remove-Item -Path $dll -Force -ErrorAction SilentlyContinue
}
Get-ChildItem *CPU*.exe | Remove-Item -Force -ErrorAction SilentlyContinue
Remove-Item -Path inference -Recurse -Force -ErrorAction SilentlyContinue
Set-Location -Path $path_to_back
Write-Host ""
Write-Host "========================================"
Write-Host "Deleted ocr dlls..."
Write-Host "========================================"