Datasets:
pain
/

Modalities:
Image
Languages:
Arabic
Size:
n<1K
ArXiv:
Tags:
License:
pain commited on
Commit
769d07b
1 Parent(s): 3a29040

Update AASL.py

Browse files
Files changed (1) hide show
  1. AASL.py +21 -8
AASL.py CHANGED
@@ -1,5 +1,6 @@
1
  import datasets
2
  from datasets.tasks import ImageClassification
 
3
 
4
  _CITATION = """\
5
  @misc{https://doi.org/10.48550/arxiv.2301.11932,
@@ -22,7 +23,7 @@ _CITATION = """\
22
  """
23
 
24
  _DESCRIPTION = "RGB Arabic Alphabet Sign Language (AASL) dataset comprises 7,857 raw and fully labelled RGB images of the Arabic sign language alphabets, which to our best knowledge is the first publicly available RGB dataset. The dataset is aimed to help those interested in developing real-life Arabic sign language classification models. AASL was collected from more than 200 participants and with different settings such as lighting, background, image orientation, image size, and image resolution. Experts in the field supervised, validated and filtered the collected images to ensure a high-quality dataset."
25
- _URL = "https://huggingface.co/datasets/pain/AASL/blob/main/archive.zip"
26
  _HOMEPAGE = "https://www.kaggle.com/datasets/muhammadalbrham/rgb-arabic-alphabets-sign-language-dataset"
27
  _LICENSE = "CC BY-SA 4.0"
28
 
@@ -38,7 +39,7 @@ class AASL(datasets.GeneratorBasedBuilder):
38
 
39
  {
40
  "image": datasets.Image(),
41
- "label": datasets.features.ClassLabel(names=['Ain','Al','Alef','Beh','Dad','Dal','Feh','Ghain','Hah','Heh','Jeem','Kaf','Khah','Laa','Lam','Meem','Noon','Qaf','Reh','Sad','Seen','Sheen','Tah','Teh','Teh_Marbuta','Theh','Waw','Yeh','Zah','Zain','thal'])
42
  }
43
  ),
44
  supervised_keys=("image", "label"),
@@ -54,10 +55,22 @@ class AASL(datasets.GeneratorBasedBuilder):
54
  )
55
 
56
  def _split_generators(self, dl_manager):
57
- downloaded_files = dl_manager.download(_URL)
58
- extracted_file = dl_manager.extract(downloaded_files)
59
- print(extracted_file)
60
- return datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"files":downloaded_files})
 
61
 
62
- def _generate_examples(self):
63
- pass
 
 
 
 
 
 
 
 
 
 
 
 
1
  import datasets
2
  from datasets.tasks import ImageClassification
3
+ import os
4
 
5
  _CITATION = """\
6
  @misc{https://doi.org/10.48550/arxiv.2301.11932,
 
23
  """
24
 
25
  _DESCRIPTION = "RGB Arabic Alphabet Sign Language (AASL) dataset comprises 7,857 raw and fully labelled RGB images of the Arabic sign language alphabets, which to our best knowledge is the first publicly available RGB dataset. The dataset is aimed to help those interested in developing real-life Arabic sign language classification models. AASL was collected from more than 200 participants and with different settings such as lighting, background, image orientation, image size, and image resolution. Experts in the field supervised, validated and filtered the collected images to ensure a high-quality dataset."
26
+ _URL = "https://huggingface.co/datasets/pain/AASL/blob/main/images.zip"
27
  _HOMEPAGE = "https://www.kaggle.com/datasets/muhammadalbrham/rgb-arabic-alphabets-sign-language-dataset"
28
  _LICENSE = "CC BY-SA 4.0"
29
 
 
39
 
40
  {
41
  "image": datasets.Image(),
42
+ "label": datasets.features.ClassLabel(names=['Ain','Al','Alef','Beh','Dad','Dal','Feh','Ghain','Hah','Heh','Jeem','Kaf','Khah','Laa','Lam','Meem','Noon','Qaf','Reh','Sad','Seen','Sheen','Tah','Teh','Teh_Marbuta','Theh','Waw','Yeh','Zah','Zain'])
43
  }
44
  ),
45
  supervised_keys=("image", "label"),
 
55
  )
56
 
57
  def _split_generators(self, dl_manager):
58
+ archive_path = dl_manager.download(_URL)
59
+
60
+ return [datasets.SplitGenerator(
61
+ name=datasets.Split.TRAIN, gen_kwargs={"images":archive_path}
62
+ )]
63
 
64
+ def _generate_examples(self, images):
65
+
66
+ x = len(list(images))
67
+ print("Length")
68
+ print(x)
69
+ print(images)
70
+
71
+ for file_path, file_obj in images:
72
+
73
+ yield file_path, {
74
+ "image": {"path": file_path, "bytes": file_obj.read()},
75
+ "label": 'x',
76
+ }