Toggle navigation
Toggle navigation
This project
Loading...
Sign in
lizhengwei
/
aigc-embedding-service
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
lizhengwei
2026-06-03 14:29:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4f51c651e49c2164949d1c2271cfd77b3cef9207
4f51c651
1 parent
b725d68d
jira:NYJ-1656 desc: modified 30W to 40W
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
src/football_replay_match/core/api.py
src/football_replay_match/core/api_test.py
src/football_replay_match/core/utils/football_replay_match_live.py
src/football_replay_match/core/api.py
View file @
4f51c65
...
...
@@ -60,7 +60,8 @@ class FootballReplayMatch:
if
video_url
.
endswith
(
'.m3u8'
):
mp4_name
=
os
.
path
.
basename
(
video_url
)
else
:
mp4_name
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
video_url
))))
# mp4_name = os.path.basename(os.path.dirname(os.path.dirname(os.path.dirname(video_url))))
mp4_name
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
video_url
)))
return
self
.
videoEventRecognition
.
video_event
(
replay
,
cache_dir
=
os
.
path
.
join
(
self
.
cache_dir
,
mp4_name
,
"replays"
),
task_log_dir
=
os
.
path
.
join
(
self
.
task_log_dir
,
mp4_name
,
task_id
))
...
...
@@ -69,7 +70,8 @@ class FootballReplayMatch:
if
video_url
.
endswith
(
'.m3u8'
):
mp4_name
=
os
.
path
.
basename
(
video_url
)
else
:
mp4_name
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
video_url
))))
# mp4_name = os.path.basename(os.path.dirname(os.path.dirname(os.path.dirname(video_url))))
mp4_name
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
video_url
)))
return
self
.
videoMatchLive
.
match_batch
(
replay
,
events
,
max_parallel
=
2
,
cache_dir
=
os
.
path
.
join
(
self
.
cache_dir
,
mp4_name
,
"events"
),
task_log_dir
=
os
.
path
.
join
(
self
.
task_log_dir
,
mp4_name
,
task_id
))
def
replay_match_event
(
self
,
data
):
...
...
src/football_replay_match/core/api_test.py
View file @
4f51c65
...
...
@@ -41,8 +41,8 @@ def _fake_settings():
temperature
=
0.7
,
api_key
=
'no_key'
),
common
=
SimpleNamespace
(
cache_dir
=
f
"/root/lzw/tmp_0602_replay_cache/videos_cache"
,
task_log_dir
=
f
"/root/lzw/tmp_0602_replay_cache/tasks_log"
common
=
SimpleNamespace
(
cache_dir
=
f
"/root/lzw/tmp_0603_replay_cache/videos_cache"
,
task_log_dir
=
f
"/root/lzw/tmp_0603_replay_cache/tasks_log"
),
save_frames_enable
=
True
,
)
...
...
@@ -102,8 +102,9 @@ def test_match_by_time_success():
replays_and_events_pair
=
get_replays_and_events_pair
()
for
replays_mp4_dir
,
events_mp4_dir
in
replays_and_events_pair
:
# replays_mp4_dir = "/root/lzw/finished/69e5102bfd87d43d09bba90d-auto-10154993/replays/videos"
# events_mp4_dir = r"/root/lzw/finished/69e5102bfd87d43d09bba90d-auto-10154993/live/videos"
replays_mp4_dir
=
r"/root/lzw/69e4ed7c872d573c9554510b-auto-10154973/replay"
events_mp4_dir
=
r"/root/lzw/69e4ed7c872d573c9554510b-auto-10154973/goal"
print
(
100
*
"="
)
print
(
f
"replays_mp4_dir: {replays_mp4_dir}, events_mp4_dir: {events_mp4_dir}"
)
...
...
@@ -136,7 +137,7 @@ def test_match_by_time_success():
print
(
100
*
"#"
)
print
(
f
"max_time: {max_time}"
)
print
(
f
"all_time: {all_time}"
)
#
exit()
exit
()
if
__name__
==
"__main__"
:
test_match_by_time_success
()
...
...
src/football_replay_match/core/utils/football_replay_match_live.py
View file @
4f51c65
...
...
@@ -129,7 +129,10 @@ class FootballReplayMatchLive:
# self.model = ChatOpenAI(base_url="http://192.168.1.59:11434/v1", model="qwen3.6:35b-a3b-q8_0", temperature=0.7,
# api_key='no_key')
self
.
model
=
ChatOpenAI
(
base_url
=
base_url
,
model
=
model
,
temperature
=
temperature
,
api_key
=
api_key
,
extra_body
=
{
"chat_template_kwargs"
:
{
"enable_thinking"
:
False
}}
extra_body
=
{
# "repetition_penalty": 1.0,
"chat_template_kwargs"
:
{
"enable_thinking"
:
False
},
}
)
#extra_body={"chat_template_kwargs": {"enable_thinking": False}})
self
.
cache_dir
=
cache_dir
...
...
@@ -312,7 +315,7 @@ class FootballReplayMatchLive:
start
=
event_start
,
end
=
event_end
,
roi
=
None
,
max_px_area
=
3
00
_000
,
max_px_area
=
4
00
_000
,
prompt_start
=
"
\n
【回放片段信息】
\n
"
,
prompt_end
=
f
"
\n
回放解说内容:无
\n
"
)
...
...
Please
register
or
login
to post a comment