Often users don't have annotations for entire images with annotated bounding boxes, but just have individual point locations. It would be helpful to have a fine-tuning workflow that allows users to take a torchvision classification model (e.g resnet-50) and apply it predicted class locations based on an existing retinanet model. We would need to a workflow to train a classification model and deliver crops from a deepforest model for prediction.
For example, I have used this approach to be predict whether trees are alive/dead.
train_classifier would convert a shapefile of point locations into labeled crops and run a finetuning on a resnet model.
create_crops would cut an unlabeled tile into predicted locations of some deepforest baseline model (like trees -> use_release) and return a pytorch dataloader
predict_dataloader would take in the dataloader and return a shapefile of bounding box locations and predicted class.
Often users don't have annotations for entire images with annotated bounding boxes, but just have individual point locations. It would be helpful to have a fine-tuning workflow that allows users to take a torchvision classification model (e.g resnet-50) and apply it predicted class locations based on an existing retinanet model. We would need to a workflow to train a classification model and deliver crops from a deepforest model for prediction.
For example, I have used this approach to be predict whether trees are alive/dead.
Model definition
Predict locations of 'Tree'
Crop the predicted tree locations into chips
Classify each of those chips using the alive/dead model
This particular example is nested with a larger project. It would be great to generalize it, formalize it for the deepforest repo.
I am imagine a set of functions like
Where we have a config block that points to a folder that follows the https://pytorch.org/vision/main/generated/torchvision.datasets.ImageFolder.html conventions for model training.