Skip to content

Commit 10a0f0d

Browse files
authored
Update README.md
1 parent 189abf4 commit 10a0f0d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,25 @@ train_ds = loader.train_data
9696
train_ds.as_torch_dataset()
9797
```
9898

99-
You're now ready to use AgML for training your own models!
99+
You're now ready to use AgML for training your own models! Luckily, AgML comes with a training module that enables quick-start training of standard deep learning models on agricultural datasets. Training a grape detection model is as simple as the following code:
100+
101+
```
102+
import agml
103+
import agml.models
104+
105+
import albumentations as A
106+
107+
loader = agml.data.AgMLDataLoader('grape_detection_californiaday')
108+
loader.split(train = 0.8, val = 0.1, test = 0.1)
109+
processor = agml.models.preprocessing.EfficientDetPreprocessor(
110+
image_size = 512, augmentation = [A.HorizontalFlip(p=0.5)]
111+
)
112+
loader.transform(processor)
113+
114+
model = agml.models.DetectionModel(num_classes=loader.num_classes)
115+
116+
model.run_training(loader)
117+
```
100118

101119
## Public Dataset Listing
102120

@@ -168,4 +186,4 @@ a bug or feature that you would like to see implemented, please don't hesitate t
168186
See the [contributing guidelines](/CONTRIBUTING.md) for more information.
169187

170188
## Funding
171-
This project is partly funded by the [National AI Institute for Food Systems (AIFS)](https://aifs.ucdavis.ed
189+
This project is partly funded by the [National AI Institute for Food Systems (AIFS)](https://aifs.ucdavis.ed

0 commit comments

Comments
 (0)