Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_2
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
赵心治
accessibility_movie_2
Commits
07e3092b
Commit
07e3092b
authored
Nov 06, 2023
by
wux51
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat_1' of
http://gitlab.uiiai.com/xuanweiace/accessibility_movie_2
into feat_2
parents
fca8dfbc
f9fdec5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
detect_with_ocr.py
detect_with_ocr.py
+9
-1
No files found.
detect_with_ocr.py
View file @
07e3092b
...
...
@@ -189,7 +189,12 @@ def evaluate_position(video_path: str, start_time: float) -> Tuple[float, float]
print
(
'颜色结果:'
,
r
,
g
,
b
)
# 返回值:字幕行数 字幕高度 字幕位置(比例形式) 字幕颜色(r,g,b)
# [2, 109.0, [[0.8637892376681614, 0.9243273542600897], [0.9304932735426009, 0.9915919282511211]],(r,g,b)]
return
item_result
[
0
][
0
],
item_result
[
0
][
1
]
#打印字幕预测值
# with open('debug.txt','w') as f:
# f.write(str(item_result[-1][0]))
# f.write(str(item_result[-1][1]))
return
item_result
[
-
1
][
0
],
item_result
[
-
1
][
1
]
return
[
line_num
,
height
,
item_result
,(
r
,
g
,
b
)]
...
...
@@ -921,3 +926,5 @@ if __name__ == '__main__':
print
(
"111111"
)
else
:
print
(
"222222"
)
# print(evaluate_position('C:/Users/Smile/Desktop/accessibility-movie/海上钢琴师-2.mp4',0))
\ No newline at end of file
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