Skip to content

Simplify scripts #45

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

Merged
merged 12 commits into from
Mar 10, 2025
Merged

Simplify scripts #45

merged 12 commits into from
Mar 10, 2025

Conversation

GwenaelleSa
Copy link
Member

I tried to simplify the tileset generation by dividing it into several scripts. Everything is called by the script generate_tilesets.py, so the commands are still the same.
I tested the result on the roads and border points. I did not check the functionality for FP and empty tiles and I would have to find some files to do so.

@GwenaelleSa GwenaelleSa self-assigned this Jan 30, 2025

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@GwenaelleSa GwenaelleSa requested a review from clmarmy January 30, 2025 14:55
@GwenaelleSa GwenaelleSa marked this pull request as ready for review January 30, 2025 14:55
@GwenaelleSa GwenaelleSa requested a review from acerioni January 31, 2025 14:11
Ensure the fp, fn, tp gdf have the necessary columns so we don't have to check when calculating the metrics

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@GwenaelleSa
Copy link
Member Author

GwenaelleSa commented Mar 7, 2025

I found out that the saved global metrics where always computed with the macro-average method and I changed the code to make it dependant on the chosen method.

Copy link
Contributor

@clmarmy clmarmy left a comment

Choose a reason for hiding this comment

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

Everything works well !

Just spotted to places that need your review.

@@ -336,13 +336,13 @@ def main(cfg_file_path):
# we select the threshold which maximizes the f1-score on the val dataset
if 'val' in metrics_cl_df_dict.keys() and CONFIDENCE_THRESHOLD:
logger.error('The confidence score was determined over the val dataset, but a confidence score is given in the config file.')
Copy link
Contributor

Choose a reason for hiding this comment

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

"confidence threshold" and not "confidence score" ?


if tested_seed == max_seed-1:
logger.warning(f'No satisfying seed found between 0 and {max_seed}.')
logger.info(f'The best seed was {seed} with ~{best_split} class subsets containing the correct proportion (trn~0.7, val~0.15, tst~0.15).')
Copy link
Contributor

Choose a reason for hiding this comment

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

rather test_seed ?

Copy link

Passed

Analysis Details

2 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 2 Code Smells

Coverage and Duplications

  • Coverage No coverage information (0.00% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: swiss-territorial-data-lab_object-detector_AYZ4zWIzr7JdaaSXwexc

View in SonarQube

@clmarmy clmarmy merged commit f278881 into master Mar 10, 2025
1 check passed
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