Skip to content

Commit

Permalink
Merge pull request #885 from weecology/plot_results_flips_BGR
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwhite authored Jan 15, 2025
2 parents 7d0a0bb + 6d0c5c3 commit dc51ef5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/deepforest/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ def plot_results(results,
results.image_path.unique()[0]))[0]
image_name = "{}.png".format(basename)
image_path = os.path.join(savedir, image_name)
# Flip RGB to BGR
annotated_scene = annotated_scene[:, :, ::-1]
cv2.imwrite(image_path, annotated_scene)
else:
# Display the image using Matplotlib
Expand Down

0 comments on commit dc51ef5

Please sign in to comment.