Tutorial loading Deepforest#

[ ]:
!pip install ../../ -U
[ ]:
from deepforest import get_data
from deepforest import main

model = main.deepforest()
model.load_model(model_name="weecology/deepforest-tree", revision="main")
image_path = get_data('OSBS_029.tif')
results = model.predict_image(path=image_path)
# plot_results(results)
[ ]:
# To save a model you can use
# model.save_pretrained("Path/to/model/folder")
# This will give config.json for the configuration and model.safetensors for the weights