-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#260 add doctree to how to filter out bad imagery and link guide in c…
…ase study 2. Explain with more detail how downloaded data is loaded to extract shorelines in the getting started guide and extract shorelines guide
- Loading branch information
1 parent
c17d7a9
commit 5181aeb
Showing
4 changed files
with
61 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,65 @@ | ||
# Filtering Imagery | ||
|
||
Extracting the best shorelines requires that only the best imagery is used which means that bad imagery needs to be sorted out. You should filter out bad imagery in `data/roi_id/jpg_files/preprocessed/RGB` by moving any bad imagery to a designated subdirectory named 'bad'. | ||
|
||
It is important to note that this operation does not delete any TIFF files, but rather helps to improve the efficiency of shoreline extraction and enhance the quality of the extracted shorelines. Check out the [wiki page about the shoreline extraction process](https://github.com/Doodleverse/CoastSeg/wiki/6.-How-to-Extract-Shorelines) for more information about how to extract shorelines. | ||
To extract the best shorelines, it's essential to use only high-quality imagery, which means filtering out any poor-quality images. You should filter out bad imagery in `data/roi_id/jpg_files/preprocessed/RGB` by moving any undesirable images to a designated subdirectory named 'bad'. | ||
|
||
## Step by Step Guide | ||
Filtering the RGB images does not delete any TIFF files but helps to improve the efficiency of shoreline extraction and enhance the quality of the extracted shorelines. For more information on the shoreline extraction process, check out the [wiki page about the shoreline extraction process](https://github.com/Doodleverse/CoastSeg/wiki/6.-How-to-Extract-Shorelines). | ||
|
||
### Before you begin | ||
|
||
Download data with the `SDS_coastsat_classifier.ipynb` and make sure it downloaded to your `data` directory within coastseg | ||
## Step-by-Step Guide | ||
|
||
1. Open the `data` directory within coastseg | ||
2. Navigate to the ROI directory | ||
### Before You Begin | ||
|
||
- If you're not sure which ROI directory you used for a particular session go to the `sessions` directory, click the session you are interested in and open the `config.json` file. Look for the variable `sitename` and the sitename will be in a format similar to `ID_yvk1_datetime06-05-23__07_07_42`. This is the name of the ROI directory containing the downloaded data in the `data` directory within coastseg | ||
Download data with the `SDS_coastsat_classifier.ipynb` and ensure it is saved to your `data` directory within CoastSeg. | ||
|
||
### Example config file from data | ||
### 1. Open the `data` Directory | ||
|
||
![config_json_example_screenshot_sitename_from_data](https://github.com/SatelliteShorelines/CoastSeg/assets/61564689/cc172608-895d-456b-8789-0725fb338805) | ||
1. Navigate to the `data` directory within CoastSeg. | ||
2. Click on the ROI directory you want to sort | ||
|
||
### Example config file from sessions | ||
In this example, you can see that ROI 3 is located within the `CoastSeg/data` folder. The `jpg_files > preprocessed > RGB` directory contains all the RGB imagery for all the satellites. | ||
|
||
![config_json_sitename_from_session](https://github.com/SatelliteShorelines/CoastSeg/assets/61564689/45d2f48e-abe9-4dd7-bcd0-8253092c6613) | ||
``` | ||
├── CoastSeg | ||
| | ||
|___data | ||
| |_ ID_3_datetime11-22-22__11_15_15 | ||
│ | |_ L8 | ||
│ | |_ L9 | ||
│ | |_ S2 | ||
│ | |_ jpg_files | ||
│ | | |_ preprocessed | ||
| │ | | |_ RGB | ||
| | │ | | |_ 2018-12-06-19-04-16_RGB_S2.jpg | ||
| | │ | | |_ 2018-12-06-19-04-16_RGB_L8.jpg | ||
| | │ | | |_ 2018-12-06-19-04-16_RGB_L9.jpg | ||
| │ | | |_ NIR | ||
| | │ | | |_ 2018-12-06-19-04-16_NIR_S2.jpg | ||
| | │ | | |_ <rest of images...> | ||
| │ | | |_ SWIR | ||
| | │ | | |_ 2018-12-06-19-04-16_SWIR_S2.jpg | ||
| | │ | | |_ <rest of images...> | ||
│ | | |_detection | ||
| │ | | |_<jpgs of detected shorelines> | ||
│ | |_config.json | ||
│ | |_config_gdf.json | ||
│ | |_extracted_shorelines.geojson | ||
``` | ||
|
||
3. In the ROI directory navigate to `jpg_files>preprocessed>RGB` | ||
|
||
- Example on windows: `CoastSeg\data\ID_yvk1_datetime06-05-23__06_57_26\jpg_files\preprocessed\RGB` | ||
### 2. Navigate to the RGB Directory | ||
|
||
4. Remove the files the you don't like | ||
1. Create a new subdirectory named 'bad' within the data/roi_id/jpg_files/preprocessed/RGB directory if it does not already exist. | ||
2. Identify the files within the data/roi_id/jpg_files/preprocessed/RGB directory that you want to remove. | ||
3. Copy the files you wish to remove and paste them into the 'bad' subdirectory created in step 1. - Confirm that the files are successfully copied to the 'bad' subdirectory. | ||
1. Go to `jpg_files > preprocessed > RGB` within the ROI directory. | ||
- Example on Windows: `CoastSeg\data\ID_yvk1_datetime06-05-23__06_57_26\jpg_files\preprocessed\RGB` | ||
|
||
### 3. Move Bad Imagery | ||
|
||
1. Create a subdirectory named 'bad' within the `data/roi_id/jpg_files/preprocessed/RGB` directory if it does not already exist. | ||
2. Identify the images you want to remove. | ||
3. Move these images to the 'bad' subdirectory. | ||
|
||
![coastseg_screenshot_bad_subdir](https://github.com/SatelliteShorelines/CoastSeg/assets/61564689/f0423605-b8bc-4c1d-8eb2-c79be81e9a91) | ||
|
||
5. Test the shoreline extraction process to verify that the removal of files from the `data/roi_id/jpg_files/preprocessed/RGB` directory has improved the efficiency and quality of the extracted shorelines. Check out the [wiki page about the shoreline extraction process](https://github.com/Doodleverse/CoastSeg/wiki/6.-How-to-Extract-Shorelines) for more information about how to extract shorelines. | ||
### 4. Test Shoreline Extraction | ||
|
||
Load your ROIs in CoastSeg and run `extract shorelines` again. None of the images that were sorted into the 'bad' directory will have their shorelines extracted. For more details, refer to the guide [How to Extract Shorelines](https://github.com/Doodleverse/CoastSeg/wiki/6.-How-to-Extract-Shorelines). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters