miracleyin
commited on
init demo
Browse files- README.md +50 -0
- blocks/demo.png +3 -0
- blocks/demo.wav +3 -0
- mmdata.ipynb +0 -0
- train.parquet +3 -0
README.md
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## mnbvc mm dataset v2.0
|
2 |
+
|
3 |
+
MNBVC 多模态语料数据格式。原链接:
|
4 |
+
|
5 |
+
|字段名称|字段说明|可选|
|
6 |
+
|-|-|-|
|
7 |
+
|实体ID| | |
|
8 |
+
|块ID| | |
|
9 |
+
|时间| | |
|
10 |
+
|扩展字段| | |
|
11 |
+
|文本| | |
|
12 |
+
|图片| | |
|
13 |
+
|OCR文本| | |
|
14 |
+
|音频| | |
|
15 |
+
|STT文本| | |
|
16 |
+
|块类型| | |
|
17 |
+
|文件md5| | |
|
18 |
+
|页ID| | |
|
19 |
+
|
20 |
+
图片读取代码:
|
21 |
+
|
22 |
+
``` python
|
23 |
+
|
24 |
+
def read_image(image_path):
|
25 |
+
# 打开图像文件
|
26 |
+
with open(image_path, 'rb') as file:
|
27 |
+
image = Image.open(file)
|
28 |
+
# 将图像转换为二进制格式
|
29 |
+
img_byte_arr = io.BytesIO()
|
30 |
+
image.save(img_byte_arr, format=image.format)
|
31 |
+
img_byte_arr = img_byte_arr.getvalue()
|
32 |
+
return img_byte_arr
|
33 |
+
```
|
34 |
+
|
35 |
+
音频读取代码:
|
36 |
+
``` python
|
37 |
+
def read_audio(audio_path):
|
38 |
+
# 使用PyDub读取音频文件
|
39 |
+
audio = AudioSegment.from_wav(audio_path,)
|
40 |
+
# 创建一个BytesIO对象
|
41 |
+
byte_arr = io.BytesIO()
|
42 |
+
# 将音频保存为二进制格式
|
43 |
+
audio.export(byte_arr, format="wav")
|
44 |
+
# 获取二进制数据
|
45 |
+
audio_bytes = byte_arr.getvalue()
|
46 |
+
|
47 |
+
return audio_bytes
|
48 |
+
```
|
49 |
+
|
50 |
+
|
blocks/demo.png
ADDED
Git LFS Details
|
blocks/demo.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:187dd4c9b4cef368a614f12fe4af88a1de718edce1bc6e580924faa6f83424ce
|
3 |
+
size 441044
|
mmdata.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4078523e25d26280be5aeb3c31f2b281356fe70fad96395148a172c1d196639
|
3 |
+
size 569919
|