-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outputs should attach geometry if available #608
Comments
Thanks for the request @Keenan-Nicholson Is the from deepforest import main
from deepforest import get_data
from deepforest.utilities import boxes_to_shapefile
model = main.deepforest()
model.use_release()
raster_dir = get_data("")
raster_path = get_data("OSBS_029.tif")
predictions = model.predict_tile(raster_path, return_plot = False, patch_size=300, patch_overlap=0.25)
predictions_projected = boxes_to_shapefile(predictions, raster_dir) Or were you thinking that it should be integrated into |
This is exactly what I was looking for, thank you! I think integration into predict_tile (or both) would make a lot of sense :) |
Glad that took care of it for you @Keenan-Nicholson! I'm going to reopen this to facilitate a quick discussion on integrating into predict tile. |
@bw4sz any objections to adding an optional argument in |
okay, I think that's reasonable. As part of the PR #590 may touch on this in places, but we can deal with that as we merge farther down the road. Let's add this 2.0 milestone, it should be pretty straightfoward. In general, i'm not sure when we want to have both geometry types in the dataframe for that PR. Lots of users come without projected data, so it can be annoying to make sense of this for all users. |
👍
I think this observation supports the idea of it being an optional argument defaulting to false. If you have projected data you'll go looking for it in the function docs, if you don't have projected data you won't even think about it and things will just work as expected. |
Hi @ethanwhite I don't know if I understand what do you need to implement here correctly, but I will make a new PR to discuss it more |
@Mu-Magdy - sounds good. The basic idea is to allow the use of |
Currently the output method is a simple plot and
boxes.head()
will givex_min
x_max
y_min
y_max
bounding boxes around detections. It would be great if, in the case the input image has geometry (i.e., .tiff images), the output also contain the geometry.This way the image and detections can be referenced on a map easily without the need for post process georeferencing.
The text was updated successfully, but these errors were encountered: