Skip to content
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

Ch/dev #1

Merged
merged 9 commits into from
Apr 26, 2024
Merged

Ch/dev #1

merged 9 commits into from
Apr 26, 2024

Conversation

cleherny
Copy link
Collaborator

Small changes to the library segment-geospatial were made for the project.

The mask sorting was performed according to the mask area, hidding the smaller mask in the mask visualisation. The option reverse has been set to True in the save_masks function
The simplified geometry parameter is added in an odd way. It has to be done in a cleaner way
GwenaelleSa added a commit to swiss-territorial-data-lab/proj-rooftops that referenced this pull request Apr 23, 2024
Update the README and the script segment_images.py to match the changes in swiss-territorial-data-lab/segment-geospatial#1
Copy link
Member

@GwenaelleSa GwenaelleSa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried my best to understand, but it is still hard to understand the code enough to be sure that I get all the implications and the usefulness of the proposed modifications.
It looks like it makes sense, so I trust you.

@@ -251,12 +256,11 @@ def save_masks(
dtype = np.uint16
else:
dtype = np.uint32

# Generate a mask of objects with unique values
if unique:
# Sort the masks by area in ascending order
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"descending order" since you switched the sorting order.
What difference does it make?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the masks are sorted in ascending order by area, the larger ones are at the end of the list. When visualising the masks, the smaller ones were hidden by the larger ones. This caused problems when vectorising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants