<jupyter_start><jupyter_text>Instantiate a model<jupyter_code>model = main.deepforest()
model.use_release()<jupyter_output>Reading config file: /usr/local/lib/python3.8/site-packages/deepforest/data/deepforest_config.yml
Model from DeepForest release https://github.com/weecology/DeepForest/releases/tag/1.0.0 was already downloaded. Loading model from file.
Loading pre-built model: https://github.com/weecology/DeepForest/releases/tag/1.0.0<jupyter_text>Import labels and predict image<jupyter_code>xml_path = get_data('OSBS_029.xml')
annotations = utilities.xml_to_annotations(xml_path)
# load the image file corresponding to the annotaion file
image_path = get_data('OSBS_029.png')
image = cv.imread(image_path)
predictions = model.predict_image(path=image_path)
predictions.head()<jupyter_output><empty_output><jupyter_text>Plot Labels, Predictions, False Positives<jupyter_code>plt.figure(figsize=(8, 8))
img = image.copy()
# plot labels
plot_bboxes(img, annotations, color=(255, 0, 0))

# plot predictions
plot_bboxes(img, predictions, color=(0, 255, 0))

# plot false positives
fp_predictions_df = find_false_positives(predictions, annotations)
plot_bboxes(img, fp_predictions_df, color=(0, 0, 255))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11721907841552143, 'fraction_numerical': 0.025060630557801132, 'mean_word_length': 8.036496350364963, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '130549', 'license': 'MIT', 'n_tokens_mistral': 466, 'n_tokens_neox': 425, 'n_words': 79, 'path': 'notebooks/01-at-plot_false_positives.ipynb', 'repo_name': 'octavflorescu/tree-counting-and-classification-in-images', 'size': '1237'}