Skip to content

Commit cfd4acf

Browse files
committed
Added new dataset ghai_strawberry_fruit_detection
1 parent b217352 commit cfd4acf

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

agml/_assets/public_datasources.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,5 +1230,33 @@
12301230
0.08992248773574829
12311231
]
12321232
}
1233+
},
1234+
"ghai_strawberry_fruit_detection": {
1235+
"classes": {
1236+
"1": "Bud",
1237+
"2": "Calyx",
1238+
"3": "Detached Fruit",
1239+
"4": "Flower",
1240+
"5": "Large green",
1241+
"6": "Leaf",
1242+
"7": "Ripe fruit",
1243+
"8": "Small Green",
1244+
"9": "Stem",
1245+
"10": "Unripe fruit"
1246+
},
1247+
"ml_task": "object_detection",
1248+
"ag_task": "crop_detection",
1249+
"location": {
1250+
"continent": "north_america",
1251+
"country": "usa"
1252+
},
1253+
"sensor_modality": "rgb",
1254+
"real_synthetic": "real",
1255+
"platform": "handheld/ground",
1256+
"input_data_format": "jpg",
1257+
"annotation_format": "coco_json",
1258+
"n_images": "500",
1259+
"docs_url": "https://github.com/AxisAg/GHAIDatasets/blob/main/datasets/strawberry.md",
1260+
"external_image_sources": []
12331261
}
12341262
}

agml/_assets/source_citations.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,9 @@
138138
"bean_synthetic_earlygrowth_aerial": {
139139
"license": "MIT",
140140
"citation": "@ARTICLE{10.3389/fpls.2019.01185,\n \nAUTHOR={Bailey, Brian N.}, \n\t \nTITLE={Helios: A Scalable 3D Plant and Environmental Biophysical Modeling Framework}, \n\t\nJOURNAL={Frontiers in Plant Science}, \n\t\nVOLUME={10}, \n\t\nYEAR={2019}, \n\t \nURL={https://www.frontiersin.org/article/10.3389/fpls.2019.01185}, \n\t\nDOI={10.3389/fpls.2019.01185}, \n\t\nISSN={1664-462X}, \n \nABSTRACT={This article presents an overview of Helios, a new three-dimensional (3D) plant and environmental modeling framework. Helios is a model coupling framework designed to provide maximum flexibility in integrating and running arbitrary 3D environmental system models. Users interact with Helios through a well-documented open-source C++ API. Version 1.0 comes with model plug-ins for radiation transport, the surface energy balance, stomatal conductance, photosynthesis, solar position, and procedural tree generation. Additional plug-ins are also available for visualizing model geometry and data and for processing and integrating LiDAR scanning data. Many of the plug-ins perform calculations on the graphics processing unit, which allows for efficient simulation of very large domains with high detail. An example modeling study is presented in which leaf-level heterogeneity in water usage and photosynthesis of an orchard is examined to understand how this leaf-scale variability contributes to whole-tree and -canopy fluxes.}\n}"
141+
},
142+
"ghai_strawberry_fruit_detection": {
143+
"license": "CC BY-SA 4.0",
144+
"citation": ""
141145
}
142146
}

agml/_internal/preprocess.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,19 @@ def ghai_broccoli_detection(self, dataset_name):
10161016
shutil.move(os.path.join(original_dir, 'coco.json'),
10171017
os.path.join(processed_dir, 'annotations.json'))
10181018

1019+
def ghai_strawberry_fruit_detection(self, dataset_name):
1020+
# Create processed directories
1021+
original_dir = os.path.join(self.data_original_dir, dataset_name)
1022+
processed_dir = os.path.join(self.data_processed_dir, dataset_name)
1023+
processed_image_dir = os.path.join(processed_dir, 'images')
1024+
os.makedirs(processed_image_dir, exist_ok = True)
1025+
1026+
# Move images
1027+
for image in tqdm(glob.glob(os.path.join(original_dir, '*.jpg'))):
1028+
shutil.move(image, processed_image_dir)
1029+
shutil.move(os.path.join(original_dir, 'coco.json'),
1030+
os.path.join(processed_dir, 'annotations.json'))
1031+
10191032

10201033
if __name__ == '__main__':
10211034
# Initialize program arguments.

0 commit comments

Comments
 (0)