Yuhan Hou commited on
Commit
f3fb371
1 Parent(s): ab0e48f
Files changed (1) hide show
  1. FracAtlas_dataset.py +1 -7
FracAtlas_dataset.py CHANGED
@@ -94,7 +94,7 @@ class FracAtlasDataset(datasets.GeneratorBasedBuilder):
94
  "image_id": datasets.Value("string"),
95
  #"image_path": datasets.Value("string"),
96
  "image": datasets.Image(),
97
- "hand": datasets.Value("int32"),
98
  "leg":datasets.Value("int32"),
99
  "hip": datasets.Value("int32"),
100
  "shoulder": datasets.Value("int32"),
@@ -106,9 +106,6 @@ class FracAtlasDataset(datasets.GeneratorBasedBuilder):
106
  "frontal": datasets.Value("int32"),
107
  "lateral": datasets.Value("int32"),
108
  "oblique": datasets.Value("int32"),
109
- "segmentation": datasets.Sequence(datasets.Sequence(datasets.Value("float"))) or None,
110
- "bbox": datasets.Sequence(datasets.Value("float")) or None,
111
- "area": datasets.Value("float") or None,
112
  "localization_metadata": datasets.Features({
113
  "width": datasets.Value("int32"),
114
  "height": datasets.Value("int32"),
@@ -253,9 +250,6 @@ class FracAtlasDataset(datasets.GeneratorBasedBuilder):
253
  "frontal": row["frontal"],
254
  "lateral": row["lateral"],
255
  "oblique": row["oblique"],
256
- "segmentation": segmentation,
257
- "bbox": bbox,
258
- "area": area,
259
  "localization_metadata": localization_metadata,
260
  'segmentation_metadata': segmentation_metadata
261
  }
 
94
  "image_id": datasets.Value("string"),
95
  #"image_path": datasets.Value("string"),
96
  "image": datasets.Image(),
97
+ "hand": datasets.ClassLabel(num_classes=2,names=['hand','no hand']),
98
  "leg":datasets.Value("int32"),
99
  "hip": datasets.Value("int32"),
100
  "shoulder": datasets.Value("int32"),
 
106
  "frontal": datasets.Value("int32"),
107
  "lateral": datasets.Value("int32"),
108
  "oblique": datasets.Value("int32"),
 
 
 
109
  "localization_metadata": datasets.Features({
110
  "width": datasets.Value("int32"),
111
  "height": datasets.Value("int32"),
 
250
  "frontal": row["frontal"],
251
  "lateral": row["lateral"],
252
  "oblique": row["oblique"],
 
 
 
253
  "localization_metadata": localization_metadata,
254
  'segmentation_metadata': segmentation_metadata
255
  }