yifanzhang114 commited on
Commit
70ee7ff
0 Parent(s):

Reinitializing and uploading files to Hugging Face repository

Browse files
.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
56
+ # Video files - compressed
57
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
58
+ *.webm filter=lfs diff=lfs merge=lfs -text
59
+ *.json filter=lfs diff=lfs merge=lfs -text
MME-RealWorld-Base64.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ from datasets import Dataset, DatasetDict, Features, Value, Sequence
4
+
5
+ def load_json_lines(file_path):
6
+ with open(file_path, 'r') as f:
7
+ for line in f:
8
+ yield json.loads(line)
9
+
10
+ def _generate_examples(chunk_files):
11
+ for file in chunk_files:
12
+ for example in load_json_lines(file):
13
+ yield example['Question_id'], example
14
+
15
+ def load_dataset(*args, **kwargs):
16
+ dataset_dir = kwargs['data_dir'] # The directory containing JSON chunks
17
+ chunk_files = [os.path.join(dataset_dir, f) for f in os.listdir(dataset_dir) if f.endswith('.json')]
18
+ features = Features({
19
+ 'index': Value(dtype='string'),
20
+ 'image': Value(dtype='string'),
21
+ 'question': Value(dtype='string'),
22
+ 'multi-choice options': Sequence(Value(dtype='string')),
23
+ 'answer': Value(dtype='string'),
24
+ 'category': Value(dtype='string'),
25
+ 'l2-category': Value(dtype='string'),
26
+ })
27
+ dataset = DatasetDict({
28
+ 'train': Dataset.from_generator(lambda: _generate_examples(chunk_files), features=features)
29
+ })
30
+ return dataset
MME-RealWorld-CN/MME_RealWorld_CN_base64_0.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3093f3a3af034df2d1d90cc6de5978c4638a83089ba0fbbf3f882918c26e6bf0
3
+ size 4174999380
MME-RealWorld-CN/MME_RealWorld_CN_base64_1.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e369737e105ea5bd94c11bde63a2288592736a885a4a5dd8df8fb87f3a5c816
3
+ size 2209850160
MME-RealWorld/MME_RealWorld_base64_0.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb933494d4be23fa2859bab882ac70999067f6ef083feb64d7dc41adf2845aea
3
+ size 4189305921
MME-RealWorld/MME_RealWorld_base64_1.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ddcbb8120fb10c9042db39a96ac7458c196047d14b0ad9b6bbc86da877878af
3
+ size 4185547686
MME-RealWorld/MME_RealWorld_base64_2.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:180154f62ab56ed1ff3d4de00fe3c70a91b8e6bd13c8fe5afffe164d55b1177e
3
+ size 4184630252
MME-RealWorld/MME_RealWorld_base64_3.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11911a9c92ec757e18bf7fcbb95046e49017b1c255ec9c3446fd6eb43732919d
3
+ size 4186695809
MME-RealWorld/MME_RealWorld_base64_4.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:479c15598a299261b5ae011aaa7b0774fd268ec9e137f3477de9d9cb27c05f19
3
+ size 4187442465
MME-RealWorld/MME_RealWorld_base64_5.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:926902add2df836300d6ba19abeaca9dbc834b296cf037352a8fb8fe82f2e7f0
3
+ size 4179256570
MME-RealWorld/MME_RealWorld_base64_6.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51f3dd102580f0b25c4e9afe55c274677714b14c965b0ecf8b3489d4c9f76f00
3
+ size 4185832480
MME-RealWorld/MME_RealWorld_base64_7.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5913c2b244a3dc4f38b67291a8ca97f6a431bf884b8c96843152c7cb3643dd3
3
+ size 4185881576
MME-RealWorld/MME_RealWorld_base64_8.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1083e62f26699c7a875b98aab55e6d0cd98d1b5cb33b97dfa8af757e4039c993
3
+ size 1392593525
README.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MME-RealWorld Dataset
2
+
3
+ This dataset contains multiple JSON files split into chunks. It includes information such as questions, images encoded in base64, and other related metadata.
4
+
5
+ ## Usage
6
+
7
+ You can load the dataset using the `datasets` library:
8
+
9
+ ```python
10
+ from datasets import load_dataset
11
+
12
+ dataset = load_dataset('yifanzhang114/MME-RealWorld-Base64', data_dir='MME-RealWorld')
13
+ dataset = load_dataset('yifanzhang114/MME-RealWorld-Base64', data_dir='MME-RealWorld-CN')
14
+
15
+ ## the image can be decoded by
16
+
17
+ def decode_base64_to_image(base64_string, target_size=-1):
18
+ image_data = base64.b64decode(base64_string)
19
+ image = Image.open(io.BytesIO(image_data))
20
+ if image.mode in ('RGBA', 'P'):
21
+ image = image.convert('RGB')
22
+ if target_size > 0:
23
+ image.thumbnail((target_size, target_size))
24
+ return image
25
+
26
+ ```
dataset_info.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:585506df014c1561dd9347b438ca64ef9633628c0b9000fbf93658e5cb7aa987
3
+ size 193
nohup.out ADDED
File without changes