Skip to content

Commit 91711ae

Browse files
committed
Updated datasets, backend choice, and added new dataset bean_synthetic_earlygrowth_aerial
1 parent cb6b1d1 commit 91711ae

File tree

5 files changed

+30
-18
lines changed

5 files changed

+30
-18
lines changed

agml/_assets/public_datasources.json

+22-2
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@
627627
"ml_task": "object_detection",
628628
"ag_task": "fruit_detection",
629629
"location": {
630-
"continent": "north_america",
631-
"country": "usa"
630+
"continent": "digital",
631+
"country": "digital"
632632
},
633633
"sensor_modality": "rgb",
634634
"real_synthetic": "synthetic",
@@ -1198,5 +1198,25 @@
11981198
0.23829665780067444
11991199
]
12001200
}
1201+
},
1202+
"bean_synthetic_earlygrowth_aerial": {
1203+
"classes": {
1204+
"1": "leaves",
1205+
"2": "branches"
1206+
},
1207+
"ml_task": "semantic_segmentation",
1208+
"ag_task": "plant_segmentation",
1209+
"location": {
1210+
"continent": "digital",
1211+
"country": "digital"
1212+
},
1213+
"sensor_modality": "rgb",
1214+
"real_synthetic": "synthetic",
1215+
"platform": "aerial",
1216+
"input_data_format": "jpg",
1217+
"annotation_format": "image",
1218+
"n_images": "2500",
1219+
"docs_url": "https://github.com/Project-AgML/AgML/blob/main/docs/datasets/bean_synthetic_earlygrowth_aerial.md",
1220+
"external_image_sources": []
12011221
}
12021222
}

agml/_assets/source_citations.json

+4
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,9 @@
134134
"ghai_broccoli_detection": {
135135
"license": "CC BY-SA 4.0",
136136
"citation": ""
137+
},
138+
"bean_synthetic_earlygrowth_aerial": {
139+
"license": "MIT",
140+
"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}"
137141
}
138142
}

agml/backend/tftorch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _check_tf_torch():
6767

6868

6969
# Default backend is PyTorch.
70-
_BACKEND = 'torch'
70+
_BACKEND = None
7171
_USER_SET_BACKEND = False
7272

7373

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ numpy
22
matplotlib
33
tqdm
44
scikit-learn
5+
requests>=2.0.0
56
opencv-python; sys.platform != 'linux'
67
opencv-python-headless; sys.platform == 'linux'
78
pyyaml>=5.4.1

scripts/generate_dataset_markdown.py

+2-15
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,8 @@ def build_table(json):
116116
def generate_example_images(name):
117117
"""Generates the example images for the given dataset."""
118118
agml.backend.set_seed(189)
119-
info = agml.data.source(name)
120119
loader = agml.data.AgMLDataLoader(name)
121-
if info.tasks.ml == 'image_classification':
122-
return agml.viz.visualize_images_with_labels(
123-
loader[:NUM_EXAMPLES], info = info, show = False)
124-
elif info.tasks.ml == 'object_detection':
125-
return agml.viz.visualize_images([
126-
agml.viz.annotate_bboxes_on_image(i, show = False)
127-
for i in loader[:NUM_EXAMPLES]])
128-
elif info.tasks.ml == 'semantic_segmentation':
129-
return agml.viz.visualize_images([
130-
agml.viz.visualize_overlaid_masks(i)
131-
for i in loader[:NUM_EXAMPLES]], show = False)
132-
else:
133-
raise ValueError(f'Unknown ML task: {info.tasks.ml}')
120+
return agml.viz.show_sample(loader, no_show = True)
134121

135122

136123
def build_examples(name):
@@ -140,7 +127,7 @@ def build_examples(name):
140127
LOCAL_AGML_REPO, 'docs/sample_images', f'{name}_examples.png')
141128
save_path_remote = os.path.join(
142129
AGML_REPO, 'docs/sample_images', f'{name}_examples.png')
143-
sample.savefig(save_path_local)
130+
cv2.imwrite(save_path_local, sample)
144131
return f'![Example Images for {name}]({save_path_remote})'
145132

146133

0 commit comments

Comments
 (0)