-
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.
add new versions of classifier models for the shoreline segmentation …
…filters and image filters
- Loading branch information
1 parent
996680c
commit f0e15ba
Showing
5 changed files
with
416 additions
and
65 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from coastseg import classifier | ||
import os | ||
|
||
input_path =r'C:\development\doodleverse\coastseg\CoastSeg\data\ID_1_datetime06-04-24__12_09_54\jpg_files\preprocessed\RGB' | ||
output_path = input_path | ||
output_csv=os.path.join(input_path,'classification_results.csv') | ||
|
||
# classifier_path = classifier.get_image_classifier('RGB') | ||
classifier_path = classifier.get_image_classifier('rgb') | ||
print(f"Classifier path: {classifier_path}") | ||
classifier.run_inference_rgb_image_classifier(classifier_path, | ||
input_path, | ||
output_path, | ||
output_csv, | ||
threshold=0.40) | ||
|
||
# try the gray | ||
# classifier_path = classifier.get_image_classifier('gray') | ||
# print(f"Classifier path: {classifier_path}") | ||
# classifier.run_inference_gray_image_classifier(classifier_path, | ||
# input_path, | ||
# output_path, | ||
# output_csv, | ||
# threshold=0.40) | ||
|
||
|
||
|
||
|
||
# apply good bad classifier to the downloaded imagery | ||
# for key in roi_settings.keys(): | ||
# data_path = os.path.join(roi_settings[key]['filepath'],roi_settings[key]['sitename']) | ||
# RGB_path = os.path.join(data_path,'jpg_files','preprocessed','RGB') | ||
# print(f"Sorting images in {RGB_path}") | ||
# input_path =RGB_path | ||
# output_path = RGB_path | ||
# output_csv=os.path.join(RGB_path,'classification_results.csv') | ||
# # model_path = os.path.join(r'C:\development\doodleverse\coastseg\CoastSeg\src\coastseg\classifier_model','best.h5') | ||
# model_path = classifier.get_classifier() | ||
# classifier.run_inference(model_path, | ||
# input_path, | ||
# output_path, | ||
# output_csv, | ||
# threshold=0.10) |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from coastseg import classifier | ||
import os | ||
|
||
input_path =r'C:\development\doodleverse\coastseg\CoastSeg\sessions\coreg_session2\good' | ||
output_path = input_path | ||
output_csv=os.path.join(input_path,'classification_results.csv') | ||
|
||
segmentation_classifier = classifier.get_segmentation_classifier() | ||
classifier.run_inference_segmentation_classifier(segmentation_classifier, | ||
input_path, | ||
output_path, | ||
output_csv, | ||
threshold=0.40) | ||
|
||
|
||
|
||
# apply good bad classifier to the downloaded imagery | ||
# for key in roi_settings.keys(): | ||
# data_path = os.path.join(roi_settings[key]['filepath'],roi_settings[key]['sitename']) | ||
# RGB_path = os.path.join(data_path,'jpg_files','preprocessed','RGB') | ||
# print(f"Sorting images in {RGB_path}") | ||
# input_path =RGB_path | ||
# output_path = RGB_path | ||
# output_csv=os.path.join(RGB_path,'classification_results.csv') | ||
# # model_path = os.path.join(r'C:\development\doodleverse\coastseg\CoastSeg\src\coastseg\classifier_model','best.h5') | ||
# model_path = classifier.get_classifier() | ||
# classifier.run_inference(model_path, | ||
# input_path, | ||
# output_path, | ||
# output_csv, | ||
# threshold=0.10) |
Oops, something went wrong.