forked from meituan-longcat/LongCat-Flash-Omni
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples_dict.py
More file actions
115 lines (108 loc) · 3.6 KB
/
Copy pathexamples_dict.py
File metadata and controls
115 lines (108 loc) · 3.6 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
def get_test_case_dict():
text_case = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Is there anything delicious or fun to do in Beijing?",
}
],
}
]
audio_case = [
{
"role": "user",
"content": [
{"type": "audio", "audio": "examples/audio_case.wav"},
{"type": "text", "text": "What can you hear in the audio?"},
],
}
]
image_case = [
{
"role": "user",
"content": [
{"type": "image", "image": "examples/image_case.png", "meta": {}},
{"type": "text", "text": "What can you see in the image?"},
],
}
]
text_video_case = [
{
"role": "user",
"content": [
{
"type": "video",
"video": "examples/wurenche_3s.mp4",
"meta": {
"read_image_fps": 1,
"bound": [2.0, 5.0],
"frame_sample_strategy": None,
"average_sample_num_frame_per_video": 8,
"sequential_sample_num_frame_per_sec": 1,
"sequential_max_num_sample_frame": 32,
},
},
{"type": "text", "text": "视频里出现了哪些物体?"},
],
}
]
video_audio_case = [
{
"role": "user",
"content": [
{
"type": "multimodal_interleaved",
"multimodal_interleaved": {
"video": "examples/wurenche_3s.mp4",
"audio": "examples/audio_question_3s.wav"
},
"meta": {
"frame_sample_strategy": 'sequential',
"average_sample_num_frame_per_video": 8,
"sequential_sample_num_frame_per_sec": 1,
"use_audio_track": False,
"time_offset": 0.0,
"video_frame_pre_resize": False,
"video_max_resolution": 720,
"sequential_max_num_sample_frame": -1,
"bound": None
}
}
]
}
]
video_case = [
{
"role": "user",
"content": [
{
"type": "multimodal_interleaved",
"multimodal_interleaved": {
"video": "examples/wurenche_3s_interleaved.mp4",
},
"meta": {
"frame_sample_strategy": 'sequential',
"average_sample_num_frame_per_video": 8,
"sequential_sample_num_frame_per_sec": 1,
"use_audio_track": True,
"time_offset": 0.0,
"video_frame_pre_resize": False,
"video_max_resolution": 720,
"sequential_max_num_sample_frame": -1,
"bound": None
}
}
]
}
]
result_dict = {
"text_case": text_case,
"audio_case": audio_case,
"image_case": image_case,
"text_video_case": text_video_case,
"video_audio_case": video_audio_case,
"video_case": video_case,
}
return result_dict