AmitMY commited on
Commit
6baf0f5
·
verified ·
1 Parent(s): fc3b6e2

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,7 +1 @@
1
  *.parquet filter=lfs diff=lfs merge=lfs -text
2
- data/game/test-00000.tar filter=lfs diff=lfs merge=lfs -text
3
- data/game/train-00000.tar filter=lfs diff=lfs merge=lfs -text
4
- data/game/validation-00000.tar filter=lfs diff=lfs merge=lfs -text
5
- data/non-game/test-00000.tar filter=lfs diff=lfs merge=lfs -text
6
- data/non-game/train-00000.tar filter=lfs diff=lfs merge=lfs -text
7
- data/non-game/validation-00000.tar filter=lfs diff=lfs merge=lfs -text
 
1
  *.parquet filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
README.md CHANGED
@@ -17,19 +17,19 @@ configs:
17
  - config_name: game
18
  data_files:
19
  - split: train
20
- path: data/game/train-*.tar
21
  - split: validation
22
- path: data/game/validation-*.tar
23
  - split: test
24
- path: data/game/test-*.tar
25
  - config_name: non-game
26
  data_files:
27
  - split: train
28
- path: data/non-game/train-*.tar
29
  - split: validation
30
- path: data/non-game/validation-*.tar
31
  - split: test
32
- path: data/non-game/test-*.tar
33
  ---
34
 
35
  # PopSign Images Dataset
@@ -56,26 +56,15 @@ Each subset contains three splits:
56
 
57
  ## Dataset Structure
58
 
59
- This dataset uses the WebDataset format, storing samples in tar archives with JPEG-compressed images for efficient storage and streaming.
60
-
61
  ### Features
62
 
63
- Each sample in the tar archive contains:
64
-
65
- | File | Type | Description |
66
- |------|------|-------------|
67
- | `{id}.json` | JSON | Metadata: file, start, end, text, num_frames |
68
- | `{id}.pyd` | Pickle | List of JPEG-encoded frame bytes |
69
-
70
- ### JSON Metadata Fields
71
-
72
- | Field | Type | Description |
73
- |-------|------|-------------|
74
  | `file` | string | Original video file path |
75
- | `start` | float | Start time of the sign segment (seconds) |
76
- | `end` | float | End time of the sign segment (seconds) |
77
  | `text` | string | The English gloss/label for the sign |
78
- | `num_frames` | int | Number of frames in this sample |
79
 
80
  ### Frame Extraction
81
 
@@ -89,32 +78,6 @@ All frames are 256x256 pixels.
89
 
90
  ## Usage
91
 
92
- ### Using WebDataset (recommended for training)
93
-
94
- ```python
95
- import webdataset as wds
96
- import json
97
- import pickle
98
- from PIL import Image
99
- import io
100
-
101
- # Stream directly from HuggingFace Hub
102
- url = "https://huggingface.co/datasets/sign/popsign-images/resolve/main/data/game/train-00000.tar"
103
- dataset = wds.WebDataset(url)
104
-
105
- for sample in dataset:
106
- # Parse metadata
107
- metadata = json.loads(sample["json"])
108
- print(f"Sign: {metadata['text']}, Frames: {metadata['num_frames']}")
109
-
110
- # Load frames from pickle (list of JPEG bytes)
111
- frame_bytes = pickle.loads(sample["pyd"])
112
- frames = [Image.open(io.BytesIO(b)) for b in frame_bytes]
113
- break
114
- ```
115
-
116
- ### Using HuggingFace datasets
117
-
118
  ```python
119
  from datasets import load_dataset
120
 
@@ -123,6 +86,15 @@ game_dataset = load_dataset("sign/popsign-images", "game")
123
 
124
  # Load the non-game subset
125
  non_game_dataset = load_dataset("sign/popsign-images", "non-game")
 
 
 
 
 
 
 
 
 
126
  ```
127
 
128
  ## Data Processing
 
17
  - config_name: game
18
  data_files:
19
  - split: train
20
+ path: data/game/train-*.parquet
21
  - split: validation
22
+ path: data/game/validation-*.parquet
23
  - split: test
24
+ path: data/game/test-*.parquet
25
  - config_name: non-game
26
  data_files:
27
  - split: train
28
+ path: data/non-game/train-*.parquet
29
  - split: validation
30
+ path: data/non-game/validation-*.parquet
31
  - split: test
32
+ path: data/non-game/test-*.parquet
33
  ---
34
 
35
  # PopSign Images Dataset
 
56
 
57
  ## Dataset Structure
58
 
 
 
59
  ### Features
60
 
61
+ | Column | Type | Description |
62
+ |--------|------|-------------|
 
 
 
 
 
 
 
 
 
63
  | `file` | string | Original video file path |
64
+ | `start` | float32 | Start time of the sign segment (seconds) |
65
+ | `end` | float32 | End time of the sign segment (seconds) |
66
  | `text` | string | The English gloss/label for the sign |
67
+ | `images` | list[Image] | Sequence of frames extracted from the video at 256x256 resolution |
68
 
69
  ### Frame Extraction
70
 
 
78
 
79
  ## Usage
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  ```python
82
  from datasets import load_dataset
83
 
 
86
 
87
  # Load the non-game subset
88
  non_game_dataset = load_dataset("sign/popsign-images", "non-game")
89
+
90
+ # Access a sample
91
+ sample = game_dataset["train"][0]
92
+ print(f"Sign: {sample['text']}")
93
+ print(f"Duration: {sample['end'] - sample['start']:.2f}s")
94
+ print(f"Number of frames: {len(sample['images'])}")
95
+
96
+ # Display first frame
97
+ sample['images'][0].show()
98
  ```
99
 
100
  ## Data Processing
data/game/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:905830d7c654feccb6d62c4c1e22bb03c72440f99eb401c40fff61b935036004
3
+ size 16509843
data/game/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8abc5a2b60a3eedcfeb65f92b4a1ca8959ecbc4484fc74aec3ab04cabad33be1
3
+ size 18236407
data/game/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcddad686cc5249a2d332eaae5a647a68a656380a9ea56583d24f025bee6d6ed
3
+ size 19464743
data/non-game/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2783c5886be45e586e943e19a1050bf9ba7c85052c5bed557e28dddd0937f046
3
+ size 13457718
data/non-game/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02cc1fcaf0e20caaec11711a84db07fba7d888729074822761ba9b53c3a0e6b2
3
+ size 30093930
data/non-game/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:176d14b39c3dd45de77401ddef39ade82018d4dcdbd652c689dab26aae2c81a6
3
+ size 15628552