-
Notifications
You must be signed in to change notification settings - Fork 0
/
readPkl.py
72 lines (60 loc) · 2.06 KB
/
readPkl.py
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
import pickle
# # 确认数据格式
import numpy as np
# audioFeature = np.load("D:\SHU\大论文\老人数据集\AudioFeature\\audioFeature.npz")
# print(audioFeature['audio_id']) # 'video_0001'
# print(audioFeature['audio_clip_id']) # '0001'
# print(audioFeature['audio_id_clip_id']) # 'video_00010001'
# for i in range(100):
# print(audioFeature['feature_A'][i][0])
#
#
#
# import numpy as np
#
# text = np.load('D:\SHU\大论文\老人数据集\TextFeature\\textFeature.npz')
# print(text['text_id'])
# print(len(text['text_id']))
# print(text['raw_text'])
#
# with open("D:\Search\MSA\Dataset\MOSI/unaligned_50.pkl", 'rb') as file:
with open("D:\Search\MSA\Dataset\SIMS/unaligned.pkl", 'rb') as file:
data = pickle.load(file)
print(data.keys())
print(data['train'].keys())
# print(data['train']['raw_text'][0])
print(data['train']['text'].shape)
print(data['train']['audio'].shape)
print(data['train']['vision'].shape)
# MOSI是先pad再bert
# SIMS是先bert再pad
# print(data['train']['text_bert'][0])
# 应该是转化成id
# print((data['train']['regression_labels']).shape)
#
# # "F:\MIntRec-main\MIA-datasets\MOSI\unaligned_50.pkl"
# with open("F:/dataset\household\mesic.pkl", 'rb') as file:
# data = pickle.load(file)
# print(data.keys())
# print((data['train']['label_M']).shape)
with open("D:\Search\MSA\data\\unaligned_unsplit_data.pkl", 'rb') as file:
data = pickle.load(file)
print(data['text_mask'].shape)
print(data['audio'].shape)
print(data['vision'].shape)
with open("D:\Search\MSA\data/unaligned.pkl", 'rb') as file:
data = pickle.load(file)
print(data.keys())
print(data['train'].keys())
# print(data['train']['raw_text'][0])
print(data['train']['text_mask'].shape)
print(data['train']['audio'].shape)
print(data['train']['vision'].shape)
print(data['train']['video_id'][0])
print(data['train']['video_clip_id'][0])
print(data['train']['video_id_clip_id'][0])
print(data['train']['text_raw'][0])
print(data['train']['label_M'][0])
print(data['train']['label_A'][0])
print(data['train']['label_T'][0])
print(data['train']['label_V'][0])