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

Update conversion from label studio to ground truth. #64

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

redur
Copy link
Contributor

@redur redur commented Jun 18, 2024

Include metadata (i.e. coordinates) in the instantiation of prediction objects from label studio and the subsequent conversion to ground truth.

Include metadata (i.e. coordinates) in the instantiation of prediction objects from label studio and the subsequent conversion to ground truth.
@redur redur self-assigned this Jun 18, 2024
Copy link

github-actions bot commented Jun 18, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/stratigraphy
   __init__.py8188%11
   extract.py1881880%3–482
   get_files.py21210%3–48
   line_detection.py26260%3–76
   main.py94940%3–237
src/stratigraphy/util
   boundarydepthcolumnvalidator.py412051%47, 57, 60, 81–84, 109–127, 139–148
   coordinate_extraction.py127794%31, 62, 75–76, 80, 205, 328
   dataclasses.py32391%37–39
   depthcolumn.py1946467%26, 30, 51, 57, 60–61, 85, 88, 95, 102, 110–111, 121, 138–154, 192, 229, 248–256, 267, 272, 279, 310, 315–322, 337–338, 381–423
   depthcolumnentry.py26773%12, 15, 29–30, 33, 45, 52
   description_block_splitter.py70297%24, 139
   draw.py80800%3–244
   duplicate_detection.py51510%3–146
   extract_text.py27293%38–39
   find_depth_columns.py91693%42–43, 71, 83, 176–177
   find_description.py632856%27–35, 50–63, 79–95, 172–175
   geometric_line_utilities.py86298%82, 132
   interval.py1065548%24–27, 31–34, 39, 44, 47, 57–59, 99–145, 166, 171–187
   language_detection.py18180%3–45
   layer_identifier_column.py91910%3–227
   line.py49492%25, 42, 51, 98
   linesquadtree.py46198%76
   plot_utils.py43430%3–120
   predictions.py1301300%3–272
   textblock.py74889%27, 51, 63, 75, 98, 119, 127, 155
   util.py401855%22, 40–47, 61–63, 87–88, 100–105
TOTAL182297047% 

Tests Skipped Failures Errors Time
61 0 💤 0 ❌ 0 🔥 1.143s ⏱️

Copy link
Contributor

@stijnvermeeren-swisstopo stijnvermeeren-swisstopo left a comment

Choose a reason for hiding this comment

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

I tested it, and it seems to work well.

I kept all the code the same, but I moved all the method that are directly related to Label Studio from the predictions.py file to the label_studio_annotation_to_ground_truth.py script. This seems to be a cleaner separation of concerns. Like this, the predictions.py code is no longer concerned with the specifics structure of the Label Studio JSON export, nor with the specific string formatting of the coordinate and depth interval values used in Label Studio.

@redur redur merged commit 65b2e05 into main Jun 26, 2024
3 checks passed
@redur redur deleted the feat/add_metadata_to_ground_truth_conversion branch June 26, 2024 06:04
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