XintongHe commited on
Commit
02b5ff2
1 Parent(s): dc5f584

Update Populus_Stomatal_Images_Datasets.py

Browse files
Files changed (1) hide show
  1. Populus_Stomatal_Images_Datasets.py +25 -25
Populus_Stomatal_Images_Datasets.py CHANGED
@@ -80,32 +80,32 @@ class NewDataset(datasets.GeneratorBasedBuilder):
80
  # DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
81
 
82
  def _info(self):
83
- features = datasets.Features({
84
- "image_id": datasets.Value("string"),
85
- "species": datasets.Value("string"),
86
- "scientific_name": datasets.Value("string"),
87
- "pics_array": datasets.Array3D(dtype="uint8", shape=(3, 768, 1024)), # Assuming images are RGB with shape 768x1024
88
- "image_resolution": {
89
- "width": datasets.Value("int32"),
90
- "height": datasets.Value("int32"),
91
- },
92
- "annotations": datasets.Sequence({
93
- "category_id": datasets.Value("int32"),
94
- "bounding_box": {
95
- "x_min": datasets.Value("float32"),
96
- "y_min": datasets.Value("float32"),
97
- "x_max": datasets.Value("float32"),
98
- "y_max": datasets.Value("float32"),
99
  },
100
- }),
101
- })
102
- return datasets.DatasetInfo(
103
- description=_DESCRIPTION,
104
- features=features, # Here we define them because they are different between the two configurations
105
- homepage=_HOMEPAGE,
106
- license=_LICENSE,
107
- citation=_CITATION,
108
- )
 
 
 
 
 
 
 
 
109
 
110
  def _split_generators(self, dl_manager):
111
  # Only download data, no need to split
 
80
  # DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
81
 
82
  def _info(self):
83
+ features = datasets.Features({
84
+ "image_id": datasets.Value("string"),
85
+ "species": datasets.Value("string"),
86
+ "scientific_name": datasets.Value("string"),
87
+ "pics_array": datasets.Array3D(dtype="uint8", shape=(3, 768, 1024)), # Assuming images are RGB with shape 768x1024
88
+ "image_resolution": {
89
+ "width": datasets.Value("int32"),
90
+ "height": datasets.Value("int32"),
 
 
 
 
 
 
 
 
91
  },
92
+ "annotations": datasets.Sequence({
93
+ "category_id": datasets.Value("int32"),
94
+ "bounding_box": {
95
+ "x_min": datasets.Value("float32"),
96
+ "y_min": datasets.Value("float32"),
97
+ "x_max": datasets.Value("float32"),
98
+ "y_max": datasets.Value("float32"),
99
+ },
100
+ }),
101
+ })
102
+ return datasets.DatasetInfo(
103
+ description=_DESCRIPTION,
104
+ features=features, # Here we define them because they are different between the two configurations
105
+ homepage=_HOMEPAGE,
106
+ license=_LICENSE,
107
+ citation=_CITATION,
108
+ )
109
 
110
  def _split_generators(self, dl_manager):
111
  # Only download data, no need to split