-
Notifications
You must be signed in to change notification settings - Fork 18
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
implement segmentation method for green view score #41
Conversation
Thanks for working on this! It will be a valuable addition to the project.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part sounds like a new feature, since we would be editing the main script and pipeline. Let's have this PR be for integrating the standalone module.
I think what Dan is asking for is for this code to be better integrated into the rest of the project. I get that the current implementation is standalone and self-contained, but I think if we want to merge code into the main
branch, it should be consistent and well-integrated with the rest of the project—specifically the rest of the source code in the project's Python package that's located in src/
.
Some specifics:
- The code in the PR should go into the
src/gvi/segmentation
submodule. - There should be a function implemented that matches the API from the existing
get_gvi_score
function. This function should take the path to a non-segmented image and output the GVI score for the image. (Both the segmenting and the GVI calculation should be encapsulated in that function.) Then we can easily implement the swapping when they have the same API.
street-view-green-view/src/assign_gvi_to_points.py
Lines 24 to 33 in 24d4159
def get_gvi_score(image_path): """ Calculate the Green View Index (GVI) for a given image file. Args: image_path (str): Path to the image file. Returns: float: The Green View Index (GVI) score for the given image. """ - I think it could be reasonable to consider the swapping functionality to be a separate feature, like what you've said, in order to keep this PR smaller.
- The requirements should be integrated into the package's requirements in
pyproject.toml
.
Agree with Jay, here's how I did something similar for image sources in #42 :
|
this PR addresses #10 |
it would also be good to save the green score from this segmentation method to a column with a specific header so that the user could run both the "pixel-counting" method and this method on the same files, end up with both result columns, and then compare. |
this is superseded by #55 |
Created a new module to calculate GVI based on the method from the StreetView-NatureVisibility project
README provides steps to install and run locally.