Edit json files with BCP-47 code as 'en'

#1
README.md CHANGED
@@ -28,7 +28,14 @@ import cv2
28
 
29
 
30
  def main():
31
- dataset = wds.WebDataset("https://huggingface.co/datasets/bridgeconn/sign-dictionary-isl/resolve/main/chunk_{00001..00005}.tar").decode()
 
 
 
 
 
 
 
32
  for sample in dataset:
33
  ''' Each sample contains:
34
  'mp4', 'pose-animation.mp4',
@@ -38,8 +45,7 @@ def main():
38
  # print(sample.keys())
39
 
40
  # JSON metadata
41
- json_str = sample['json'].decode('utf-8')
42
- json_data = json.loads(json_str)
43
  print(json_data['filename'])
44
  print(json_data['transcripts'])
45
  print(json_data['glosses'])
@@ -53,8 +59,7 @@ def main():
53
  process_video(pose_data)
54
 
55
  # dwpose results
56
- npz_bytes = sample["pose-dwpose.npz"]
57
- dwpose_coords = = np.load(BytesIO(npz_bytes))
58
 
59
  frame_poses = dwpose_coords['frames'].tolist()
60
  print(f"Frames in dwpose coords: {len(frame_poses)} poses")
 
28
 
29
 
30
  def main():
31
+ buffer_size = 1024
32
+ dataset = (
33
+ wds.WebDataset(
34
+ "https://huggingface.co/datasets/bridgeconn/sign-dictionary-isl/resolve/main/chunk_{00001..00002}.tar",
35
+ shardshuffle=False)
36
+ .shuffle(buffer_size)
37
+ .decode()
38
+ )
39
  for sample in dataset:
40
  ''' Each sample contains:
41
  'mp4', 'pose-animation.mp4',
 
45
  # print(sample.keys())
46
 
47
  # JSON metadata
48
+ json_data = sample['json']
 
49
  print(json_data['filename'])
50
  print(json_data['transcripts'])
51
  print(json_data['glosses'])
 
59
  process_video(pose_data)
60
 
61
  # dwpose results
62
+ dwpose_coords = sample["pose-dwpose.npz"]
 
63
 
64
  frame_poses = dwpose_coords['frames'].tolist()
65
  print(f"Frames in dwpose coords: {len(frame_poses)} poses")
chunk_00001.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ea645575d7093fafd06daaac8e35374ee8c5417b90ed60ef39871a85e6a1503b
3
  size 1074124800
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1011cd3adefce10caa37aa3ab5c607be07f2be338217682c5eef0f9b9d57d501
3
  size 1074124800
chunk_00002.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:749d9c834a6be786d74a9ce643db983d1004525d0abf61f980d8d9da04f10224
3
  size 1073192960
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cef9112c7d771319a29865980a58af32ca35520ea03300a954a1109571a86fdb
3
  size 1073192960
chunk_00003.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e902a4521339d7089d2dddf87ea5aab2d2ae26a1419cc2473072082a6682685d
3
  size 1074309120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1a0d07802b26a7a31708f5624a33104eb45b3a9f3600ee72bde69b8eb10b1ec
3
  size 1074309120
chunk_00004.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:25bc5900fa31ef64d2ff6cfecfc3b29edcf5ddd0581b8fbbe853f76a0c876581
3
  size 1076295680
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05e8aa82907447ba9d4cfdf1600ad5fd98fc522362325851452d6fa1ea7f86df
3
  size 1076295680
chunk_00005.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a2fc98d390faa51514ef37385f6a9e3457eb0de7404b502cd315e501ee0099b1
3
  size 1075599360
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b861466ce8b703a19ca1e5f2f051f955c722137951f78942a389538b1fed65a
3
  size 1075599360
chunk_00006.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:90fe669ec80f7057e2363f091b93879a13a7e1b784676563a2050846133de315
3
  size 1076367360
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3395987ab706df66beb2d637bbcf7ca6a4c0427a3be08c691b72fdd87727201
3
  size 1076367360
chunk_00007.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:34aeeba5a33cdda4c79c7f2d91d142d6611ee879b362dfd4ff2770b9f79c7f6d
3
  size 1076234240
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1235cc38a4a3ea123af3b156d2e4dc72d795f4cf67e0430a6437d2bd4f8adfff
3
  size 1076234240
chunk_00008.tar CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a44bada52860ce72e660285bdd2cd6896576cdb005521524c9931d6cc0e2b900
3
  size 1033881600
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3d97c1f6be41704656382419227ead1a8d7d5959855dbb770578ef5a24526ad
3
  size 1033881600