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 extra tiles #8

Closed
wants to merge 202 commits into from
Closed

Ch/dev extra tiles #8

wants to merge 202 commits into from

Conversation

cleherny
Copy link
Contributor

@cleherny cleherny commented Mar 3, 2023

What?
New development of the object-detector in order to give the possibility to add empty tiles (not intersecting labels) to the images dataset to train the model.
This version allows the end-user to specify directly in configuration files the number of tiles to download in when debug mode is enabled.
A quarry detection and monitoring example has been added. It provides the possibility to add or not empty tiles

Why?
Adding empty tiles might help the model learning performance and avoid FP detection. Add empty tiles to confront the model with landscape not being the object to detect.
Give the possibility to set in the config files the amount of tiles to download avoid to change it in the script generate_tilesets.py

How?
EPT tiles are defined in the prepare_data.py file to prepare data for model training (config-trne.yaml of the quarry example). The option can be enabled or not. The number of tiles to be added are defined as a percentage (tiles_frac) of the initial tiles number. Random tiles are selected within a given AOI discarding tiles intersecting the labels. The script generate_tilesets.py has been modified with the addition of a new dataset 'EPT_tiles' in order to distribute the empty tiles in the following datasets: trn, val, tst or oth with a given fraction. The fraction of empty tiles added to each dataset is set in the config file where the end-user can choose the fraction of empty tiles to add to the trn dataset. The rest is divided between the val and tst datasets. If the 'empty_tiles' option is disabled in the config files while empty tiles were computed previously, then the tiles are assigned to oth dataset.
An example 'quarry-detection-monitoring' has been added to the example folder of the project. README.md instructions help to run the workflow and allow testing the add empty tiles option.

Issue?
The main downside of the current example is the requirement of a DEM raster to execute prediction_filter.py. This raster file cannot be added to the git repo (too heavy) and has to be dl from another github repo (or it is stored on S3 and STDL kDrive for STDL people). A link is given to dl the file is provided but a projection conversion from EPSG:4326 to EPSG:2056 must be performed to be consistent with the other dataset projection. So far this re-projection is not included in the script and was done via QGIS. This should be added in further developments. Info about that is present in the README.md file.

acerioni and others added 30 commits September 28, 2020 08:26
Former-commit-id: 8bf04a8
Former-commit-id: f4bbcbd
Former-commit-id: 43b8d9e
Former-commit-id: cf05795
Former-commit-id: 0f9b775
Former-commit-id: f9b898a
…d on the ALL dataset yet, only on the TRN, VAL, TST datasets

Former-commit-id: f9482ea
Former-commit-id: 72f9767
Former-commit-id: a7d7402
Former-commit-id: afabcb8
Copy link

Passed

Analysis Details

6 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 6 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

@cleherny
Copy link
Contributor Author

Outdated, branch replaced by ch/empty-tiles.

@cleherny cleherny closed this May 21, 2024
@cleherny cleherny deleted the ch/dev_extra-tiles branch May 21, 2024 13:50
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.

5 participants