This is a major update to AgML that includes a new agml.models
API, new datasets, new tools, and a suite of bugfixes and improvements across the board.
Major Changes
- The
agml.models.Detector
API has been introduced. This API wraps the Ultralytics YOLO11 model (see ultralytics for more information) and provides an easy-to-use interface for training and inference with state-of-the-art object detection models.- Use
agml.models.Detector.train(loader, 'yolo_model')
to quickly train an AgML dataset using your choice of YOLO model - all right within the AgML API. - Use
agml.models.Detector.load('model_name')
to load a trained model easily, stored directly within the AgML local model repository. - Use
agml.models.Detector.load_benchmark('dataset_name', 'yolo_name')
to access a pre-trained agricultural object detection model from a set of available pretrained benchmarks. - Note: If you want fine-grained transfer learning and finetuning capabilities, use the standard
agml.models.DetectionModel
API, but theagml.models.Detector
API is a much more user-friendly quick-start for quick training and inference.
- Use
- We have added four new datasets:
tomato_ripeness_detection
: Object Detectioncorn_maize_leaf_disease
: Image Classificationtomato_leaf_disease
: Image Classificationvine_virus_photo_dataset
: Image Classification
- A new export tool has been added
agml.data.extensions.restructure_cvat_annotations
, that automatically reformats the exported COCO annotations from the CVAT tool into the format used in AgML. This increases AgML's interoperability with existing machine learning frameworks.
Major Bugfixes
- Helios compilation and execution is now fixed and works for Windows systems - Windows users can now use the
agml.synthetic
API to generate their own simulated data.
Other Changes and Improvements
- The documentation for AgML datasets has been improved to show more representative samples, and datasets without documentation now have theirs added.
- Improvements have been made to the
agml.data.ImageLoader
, and there is now a new methodagml.data.AgMLDataLoader.take_images()
which enables you to extract just the images from anAgMLDataLoader
, useful for inference and other image-only applications. - A bug which prevented saving and loading splits for object detection has been fixed: you can now load and save object detection data splits successfully.
- Some small errors with visualization have been fixed, including orientation and number of images in certain methods.
- The
agml.data.tools.convert_bbox_format
tool now has new formatsxyxy
andyxyx
which wrap longer strings, for ease of use.