- Enhancement: Use GitHub Actions to publish the package.
The major innovations are
- New model loading framework using HuggingFace. DeepForest models are now available on https://huggingface.co/weecology. The models can be loaded using load_model() and used for inference.
- An all purpose read_file method is introduced to read annotations from various formats including CSV, JSON, and Pascal VOC.
- The CropModel class is introduced to classify detected objects using a trained classification model. Use when a multi-class DeepForest model is not sufficiently flexible, such as when new data sources are used for fine-grained classification and class imbalance.
- deepforest.visualize.plot_results is now the primary method for visualizing predictions. The function is more flexible and allows for customizing the plot using supervision package.
Additional features and enhancements include:
- New Feature: A crop_raster function is introduced to crop a raster image using a bounding box.
- New Feature: Added beta support for multiple annotation types including point, box, and polygon.
- New Feature: Added support for learning rates scheduling using the
torch.optim.lr_scheduler
module. The learning rate scheduler can be specified in the configuration file. - New Utility: Created
utilities.download_ArcGIS_REST
function to download tiles from the ArcGIS REST API (e.g., NAIP imagery). - Enhancement: The training module better matches torchvision negative anchors format for empty frames.
- Deprecation:
shapefile_to_annotations
indeepforest/utilities.py
is deprecated in favor of the more generalread_file
method. - Deprecation:
predict
indeepforest/main.py
. Thereturn_plot
argument is deprecated and will be removed in version 2.0. Usevisualize.plot_results
instead. - Deprecation:
predict_tile
indeepforest/main.py
. Deprecated argumentsreturn_plot
,color
, andthickness
will be removed in version 2.0. - Deprecation:
crop_function
indeepforest/preprocess.py
. Thebase_dir
argument is deprecated and will be removed in version 2.0. Usesave_dir
instead. - Deprecation: The deepforest.visualize.
IoU_Callback
for better alignment with the PyTorch Lightning API (see issue). - Deprecation:
deepforest.main.use_release
anddeepforest.main.use_bird_release
are deprecated in favor of the new model loading framework, for example using deepforest.main.load_model("weecology/deepforest-bird").
- Enhancement:
split_raster
now allowsannotations_file
to beNone
, enabling flexibility during data preprocessing.
- Deprecation: Removed
IoU_Callback
for better alignment with the PyTorch Lightning API (see issue). - Refactor: Evaluation code now leverages the PyTorch Lightning evaluation loop for result calculation during training.
- Refactor: Simplified
image_callbacks
by using predictions directly. No need to specify the root directory or CSV file, as the evaluation file is assumed.
- Enhancement: Added box coordinates to the evaluation results frame for better result tracking.
- Bug Fix: Fixed incorrect precision calculation in
class_recall.csv
when multiple classes were present.
- Update:
project_boxes
now includes output options for bothpredict_tile
andpredict_image
. - New Feature: Introduced
annotations_to_shapefile
, which reversesshapefile_to_annotations
functionality. Thanks to @sdtaylor for this contribution.
Enhancement: Empty frames are now allowed by passing annotations with 0's for all coordinates. Example format:
image_path, 0, 0, 0, 0, "Tree"
New Feature: Introduced
check_release
to reduce GitHub rate limit issues. When usinguse_release()
, the local model will be used ifcheck_release = False
.
- Enhancement: Improved default dtype for Windows users, thanks to @ElliotSalisbury for the contribution.
- Major Update: Transitioned from TensorFlow to a PyTorch backend, enhancing performance and flexibility.
- Optimization: Profiled dataset and evaluation code, significantly improving evaluation performance.
- Bug Fix: Resolved issues to allow learning rate monitoring and decay based on
val_classification_loss
.