Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_1
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
翟艳秋(20软)
accessibility_movie_1
Commits
148178b6
Commit
148178b6
authored
Apr 11, 2022
by
翟艳秋(20软)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: modified the ocr in judge_subtitle
parent
9671a120
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
.gitignore
.gitignore
+1
-0
detect_with_ocr.py
detect_with_ocr.py
+0
-2
judge_subtitle.py
judge_subtitle.py
+3
-3
main_gui.py
main_gui.py
+5
-1
No files found.
.gitignore
View file @
148178b6
...
@@ -2,5 +2,6 @@
...
@@ -2,5 +2,6 @@
/build
/build
/missing_packages
/missing_packages
/aborted_icons
/aborted_icons
/docx
/无障碍电影制作工具(无黑窗口).zip
/无障碍电影制作工具(无黑窗口).zip
/无障碍电影制作工具(有黑窗口).zip
/无障碍电影制作工具(有黑窗口).zip
detect_with_ocr.py
View file @
148178b6
...
@@ -5,8 +5,6 @@ import cv2
...
@@ -5,8 +5,6 @@ import cv2
import
numpy
as
np
import
numpy
as
np
from
paddleocr
import
PaddleOCR
from
paddleocr
import
PaddleOCR
import
difflib
import
difflib
# from openpyxl.styles import PatternFill, Alignment
# from openpyxl import Workbook
import
re
import
re
from
detect_with_asr
import
create_sheet
,
write_to_sheet
from
detect_with_asr
import
create_sheet
,
write_to_sheet
...
...
judge_subtitle.py
View file @
148178b6
...
@@ -6,7 +6,7 @@ import numpy as np
...
@@ -6,7 +6,7 @@ import numpy as np
from
paddleocr
import
PaddleOCR
from
paddleocr
import
PaddleOCR
from
collections
import
Counter
from
collections
import
Counter
ocr
=
PaddleOCR
(
use_angle_cls
=
True
,
lang
=
"ch"
,
show_log
=
False
)
ocr
=
PaddleOCR
(
use_angle_cls
=
True
,
lang
=
"ch"
,
show_log
=
False
,
use_gpu
=
False
)
def
random_int_list
(
start
,
stop
,
length
):
def
random_int_list
(
start
,
stop
,
length
):
...
@@ -93,5 +93,5 @@ def detect_movie(video_path, start, end, interval):
...
@@ -93,5 +93,5 @@ def detect_movie(video_path, start, end, interval):
return
Counter
(
ans
)
.
most_common
(
1
)[
0
][
0
]
return
Counter
(
ans
)
.
most_common
(
1
)[
0
][
0
]
if
__name__
==
'__main__'
:
#
if __name__ == '__main__':
pass
#
pass
main_gui.py
View file @
148178b6
...
@@ -295,7 +295,9 @@ def start_detect():
...
@@ -295,7 +295,9 @@ def start_detect():
progressbar_1
.
stop
()
progressbar_1
.
stop
()
progressbar_1
[
'value'
]
=
100.0
progressbar_1
[
'value'
]
=
100.0
progress_1
[
'text'
]
=
"100.0
%
"
progress_1
[
'text'
]
=
"100.0
%
"
# 检测完成后,将“停止检测”按钮设置为不可点击状态,”开始检测“按钮设置为可点击状态
progressbar_1
.
grid_forget
()
progress_1
.
grid_forget
()
# 检测完成后,将“停止检测”按钮设置为不可点击状态,“开始检测”按钮设置为可点击状态
stopDetection
.
config
(
state
=
tk
.
DISABLED
)
stopDetection
.
config
(
state
=
tk
.
DISABLED
)
startDetection
.
config
(
state
=
tk
.
ACTIVE
)
startDetection
.
config
(
state
=
tk
.
ACTIVE
)
...
@@ -488,6 +490,8 @@ def start_synthesis():
...
@@ -488,6 +490,8 @@ def start_synthesis():
progressbar_2
.
stop
()
progressbar_2
.
stop
()
progressbar_2
[
'value'
]
=
100.0
progressbar_2
[
'value'
]
=
100.0
progress_2
[
'text'
]
=
"100.00
%
"
progress_2
[
'text'
]
=
"100.00
%
"
progressbar_2
.
grid_forget
()
progress_2
.
grid_forget
()
startSynthesis
.
config
(
state
=
tk
.
ACTIVE
)
startSynthesis
.
config
(
state
=
tk
.
ACTIVE
)
stopSynthesis
.
config
(
state
=
tk
.
DISABLED
)
stopSynthesis
.
config
(
state
=
tk
.
DISABLED
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment