microsoft / satellite-imagery-labeling-tool

This is a lightweight web-interface for creating and sharing vector annotations over satellite/aerial imagery scenes.
MIT License
263 stars 31 forks source link

Unable to label a feature as a different secondary class by selecting it on the side-menu in the labeling tool #11

Closed lsaloio closed 1 year ago

lsaloio commented 1 year ago

Summary

Unable to label a feature as a different secondary class by selecting it on the side-menu in the labeling tool

Overview

In the labeling tool, I selected one of the secondary class properties that I had defined in the project builder and drew a shape around a building. When I saved the labeled task files and loaded them onto the project viewer, the shapes were not labeled as the secondary class property that I selected before drawing them. The secondary class options were 0, 1, 2, 3, 4, and 5, but no matter what I selected each shape remained labeled as 0, which seemed to be the default since it was the first secondary class that I added. The only way I was able to successfully apply a different secondary class in the labeler was to draw the shapes first, click the rectangle select button, and then click the shapes and edit the secondary class that way (rather than before/as I drew them).

Steps to reproduce

  1. Open the project builder.
  2. On Step 1: Project details, fill in a project name (i.e. “testing”) and click next.
  3. On Step 2: Add layers, keep the default layers and click next.
  4. On Step 3: Create focus area, draw a focus area of the University of Massachusetts Amherst (or anywhere). Adjust the grid size and focus area so that they align with each other.
  5. On Step 4: Define classes, change the Primary class display name and Primary class property name to “building”.
  6. Under primary classes, add the primary class “building” and press the green plus(+) sign to add it.
  7. Click Capture secondary class.
  8. Change the Secondary class display name to “Damage severity” and the Secondary class property name to “damage_severity”.
  9. Under Secondary classes, add the following secondary classes: 0, 1, 2, 3, 4, and 5.
  10. Click next to Step 5: Complete and download the project files.
  11. Open the project labeler.
  12. Under Import data, load one of the task files from your downloaded project files.
  13. Under Damage severity on the right-hand side menu, select “5” as the secondary class.
  14. Select the draw-polygon option and trace one of the buildings.
  15. Select a Damage severity of “3” and trace another building.
  16. Navigate to the Save page and save your labeled task file.
  17. Put the output file that you just saved into the results folder of the project builder output folder and zip the project builder folder.
  18. Open the project viewer.
  19. Load the zipped project builder folder onto the project viewer.
  20. On the left-hand side, change the View to Damage severity.
  21. Notice on the left that two labeled features are listed as having a damage severity of 0.
  22. Click on the labeled buildings.
  23. Notice that the the damage_severity remains at 0 for both buildings.

Expected result:

Before drawing a shape around a building in the labeler, I selected one of the secondary class options that I had previously defined in the project builder to label the building as. Once labeled and loaded into the project viewer, I expected to see the features labeled as the secondary classes that I selected for them.

Actual result:

The features were not labeled as the secondary classes that I selected for them, but instead remained labeled as the default secondary class that was already selected before I changed the selection.

Helpful screenshots

Project builder configuration:

project-builder-config

Labeling features with secondary class selected on side-menu:

labeling-features-with-secondary-class

Results of labeled features in project viewer:

labeled-task-results-in-project-viewer
rbrundritt commented 1 year ago

Thank you for the detailed issue report. I'll try and look into this next week.

rbrundritt commented 1 year ago

Found the issue, checked in the fix. A single line of missing code related to the bulk edit functionality that was added a few months back was the source of the issue. Thanks again for highlighting this issue.

lsaloio commented 1 year ago

No problem, glad it was solved!