vkashko commited on
Commit
33b79cc
·
1 Parent(s): 2c4e303

feat: upload script docs: readme

Browse files
README.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: id
5
+ dtype: string
6
+ - name: image
7
+ dtype: image
8
+ - name: mask
9
+ dtype: image
10
+ - name: bboxes
11
+ dtype: string
12
+ splits:
13
+ - name: train
14
+ num_bytes: 56575701
15
+ num_examples: 46
16
+ download_size: 56584366
17
+ dataset_size: 56575701
18
+ ---
face_segmentation.py → helmet_detection.py RENAMED
@@ -3,7 +3,7 @@ import pandas as pd
3
 
4
  _CITATION = """\
5
  @InProceedings{huggingface:dataset,
6
- title = {face_segmentation},
7
  author = {TrainingDataPro},
8
  year = {2023}
9
  }
@@ -14,7 +14,7 @@ An example of a dataset that we've collected for a photo edit App.
14
  The dataset includes 20 selfies of people (man and women)
15
  in segmentation masks and their visualisations.
16
  """
17
- _NAME = 'face_segmentation'
18
 
19
  _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
20
 
@@ -30,11 +30,10 @@ class FaceSegmentation(datasets.GeneratorBasedBuilder):
30
  return datasets.DatasetInfo(
31
  description=_DESCRIPTION,
32
  features=datasets.Features({
 
33
  'image': datasets.Image(),
34
  'mask': datasets.Image(),
35
- 'id': datasets.Value('string'),
36
- 'gender': datasets.Value('string'),
37
- 'age': datasets.Value('int8')
38
  }),
39
  supervised_keys=None,
40
  homepage=_HOMEPAGE,
@@ -57,11 +56,12 @@ class FaceSegmentation(datasets.GeneratorBasedBuilder):
57
  ]
58
 
59
  def _generate_examples(self, images, masks, annotations):
60
- annotations_df = pd.read_csv(annotations, sep=';')
61
 
62
  for idx, ((image_path, image),
63
  (mask_path, mask)) in enumerate(zip(images, masks)):
64
  yield idx, {
 
65
  "image": {
66
  "path": image_path,
67
  "bytes": image.read()
@@ -70,7 +70,5 @@ class FaceSegmentation(datasets.GeneratorBasedBuilder):
70
  "path": mask_path,
71
  "bytes": mask.read()
72
  },
73
- 'id': annotations_df['id'].iloc[idx],
74
- 'gender': annotations_df['gender'].iloc[idx],
75
- 'age': annotations_df['age'].iloc[idx]
76
  }
 
3
 
4
  _CITATION = """\
5
  @InProceedings{huggingface:dataset,
6
+ title = {helmet_detection},
7
  author = {TrainingDataPro},
8
  year = {2023}
9
  }
 
14
  The dataset includes 20 selfies of people (man and women)
15
  in segmentation masks and their visualisations.
16
  """
17
+ _NAME = 'helmet_detection'
18
 
19
  _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
20
 
 
30
  return datasets.DatasetInfo(
31
  description=_DESCRIPTION,
32
  features=datasets.Features({
33
+ 'id': datasets.Value('string'),
34
  'image': datasets.Image(),
35
  'mask': datasets.Image(),
36
+ 'bboxes': datasets.Value('string')
 
 
37
  }),
38
  supervised_keys=None,
39
  homepage=_HOMEPAGE,
 
56
  ]
57
 
58
  def _generate_examples(self, images, masks, annotations):
59
+ annotations_df = pd.read_csv(annotations)
60
 
61
  for idx, ((image_path, image),
62
  (mask_path, mask)) in enumerate(zip(images, masks)):
63
  yield idx, {
64
+ 'id': annotations_df['image_id'].iloc[idx],
65
  "image": {
66
  "path": image_path,
67
  "bytes": image.read()
 
70
  "path": mask_path,
71
  "bytes": mask.read()
72
  },
73
+ 'bboxes': annotations_df['bboxes'].iloc[idx]
 
 
74
  }