Skip to content

Commit

Permalink
Added new dataset ghai_strawberry_fruit_detection
Browse files Browse the repository at this point in the history
  • Loading branch information
amogh7joshi committed Jul 14, 2023
1 parent b217352 commit cfd4acf
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
28 changes: 28 additions & 0 deletions agml/_assets/public_datasources.json
Original file line number Diff line number Diff line change
Expand Up @@ -1230,5 +1230,33 @@
0.08992248773574829
]
}
},
"ghai_strawberry_fruit_detection": {
"classes": {
"1": "Bud",
"2": "Calyx",
"3": "Detached Fruit",
"4": "Flower",
"5": "Large green",
"6": "Leaf",
"7": "Ripe fruit",
"8": "Small Green",
"9": "Stem",
"10": "Unripe fruit"
},
"ml_task": "object_detection",
"ag_task": "crop_detection",
"location": {
"continent": "north_america",
"country": "usa"
},
"sensor_modality": "rgb",
"real_synthetic": "real",
"platform": "handheld/ground",
"input_data_format": "jpg",
"annotation_format": "coco_json",
"n_images": "500",
"docs_url": "https://github.com/AxisAg/GHAIDatasets/blob/main/datasets/strawberry.md",
"external_image_sources": []
}
}
4 changes: 4 additions & 0 deletions agml/_assets/source_citations.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,9 @@
"bean_synthetic_earlygrowth_aerial": {
"license": "MIT",
"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}"
},
"ghai_strawberry_fruit_detection": {
"license": "CC BY-SA 4.0",
"citation": ""
}
}
13 changes: 13 additions & 0 deletions agml/_internal/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,19 @@ def ghai_broccoli_detection(self, dataset_name):
shutil.move(os.path.join(original_dir, 'coco.json'),
os.path.join(processed_dir, 'annotations.json'))

def ghai_strawberry_fruit_detection(self, dataset_name):
# Create processed directories
original_dir = os.path.join(self.data_original_dir, dataset_name)
processed_dir = os.path.join(self.data_processed_dir, dataset_name)
processed_image_dir = os.path.join(processed_dir, 'images')
os.makedirs(processed_image_dir, exist_ok = True)

# Move images
for image in tqdm(glob.glob(os.path.join(original_dir, '*.jpg'))):
shutil.move(image, processed_image_dir)
shutil.move(os.path.join(original_dir, 'coco.json'),
os.path.join(processed_dir, 'annotations.json'))


if __name__ == '__main__':
# Initialize program arguments.
Expand Down

0 comments on commit cfd4acf

Please sign in to comment.