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

ENH update Scene Segmentation Tutorial using Proglearn on ISIC #542

Open
wants to merge 31 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ee5bbc0
fixed typo line 81
amyvanee Apr 23, 2022
f3cccbd
Add files via upload
amyvanee Apr 24, 2022
d07ea4f
Update progressive_learner.py
amyvanee Apr 24, 2022
9dcab2b
refixed typo in line 81
amyvanee Apr 24, 2022
4e4b0c6
FIX update CircleCI version
PSSF23 Apr 24, 2022
923ce4c
black formatting
amyvanee Apr 24, 2022
0e349ca
visualize proglearn segmented images
amyvanee Apr 24, 2022
c364bc5
fixed typo
amyvanee Apr 24, 2022
145cb8c
fixed image cmap scheme
amyvanee Apr 24, 2022
df6509d
final touches on wording/organization
amyvanee Apr 24, 2022
5a519d6
changes of phrasing/organization
amyvanee Apr 24, 2022
fc40a6f
DOC fix typo
PSSF23 Apr 25, 2022
8d5ccb5
DOC fix typo
PSSF23 Apr 25, 2022
b737dc3
added multi-task learning
amyvanee Apr 29, 2022
2e008f1
added setup for multitask learning
amyvanee May 2, 2022
3a15ac4
black formatting
amyvanee May 2, 2022
81f2781
added fte, bte, te, acc results for multi-task
amyvanee May 5, 2022
903bca4
black formatting
amyvanee May 5, 2022
af90f8d
removed unnecessary lines
amyvanee May 5, 2022
4a2a095
added multitask learning with output graphs
amyvanee Jun 2, 2022
479fd0d
added a function to support new tutorial
amyvanee Jun 2, 2022
804c918
updated to allow for multidimensional input
amyvanee Jun 2, 2022
70fb091
fix for CircleCI check
amyvanee Jun 2, 2022
2fdd9dd
updated notebook
amyvanee Jun 2, 2022
64f70b1
updated comments
amyvanee Jun 2, 2022
d595180
restore old version
amyvanee Jun 2, 2022
c0714b2
fixed typo in the comments
amyvanee Jun 2, 2022
531309e
Update scene_segmentation_rf_isic_tutorial.ipynb
amyvanee Jun 2, 2022
5da98cb
fixed typo
amyvanee Jun 2, 2022
5a7e85c
fixed x-axis of multitask learning graphs
amyvanee Jun 4, 2022
c1c7e68
black formatting
amyvanee Jun 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- checkout
- restore_cache:
key: v2-<< parameters.version >>-min-dependency-cache-{{ checksum "dev-requirements.txt" }}
key: v3-<< parameters.version >>-min-dependency-cache-{{ checksum "dev-requirements.txt" }}
- run:
name: install python dependencies
command: |
Expand All @@ -22,7 +22,7 @@ jobs:
pip install --upgrade pip
pip install -r dev-requirements.txt
- save_cache:
key: v2-<< parameters.version >>-min-dependency-cache-{{ checksum "dev-requirements.txt" }}
key: v3-<< parameters.version >>-min-dependency-cache-{{ checksum "dev-requirements.txt" }}
paths:
- "venv"
- run:
Expand All @@ -45,7 +45,7 @@ jobs:
steps:
- checkout
- restore_cache:
key: v2-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
key: v3-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
- run:
name: install python dependencies
command: |
Expand All @@ -54,7 +54,7 @@ jobs:
pip install -r dev-requirements.txt
pip install -e .
- save_cache:
key: v2-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
key: v3-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
paths:
- "venv"
- run:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
steps:
- checkout
- restore_cache:
key: v2-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
key: v3-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
- run:
name: install python dependencies
command: |
Expand All @@ -91,7 +91,7 @@ jobs:
pip install -r dev-requirements.txt
pip install -e .
- save_cache:
key: v2-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
key: v3-3.9-dependency-cache-{{ checksum "dev-requirements.txt" }}
paths:
- "venv"
- run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###########################################################
# Contributor: Amy van Ee
# Functions to run scene_segmentation_rf_isic_tutorial
# March 2022
# 2022
###########################################################


Expand Down Expand Up @@ -41,7 +41,7 @@ def get_dice(true, test):
# N/A


def perform_scene_seg(img, lbl, clf):
def perform_sceneseg(img, lbl, clf):

# set up parameters for training
sigma_min = 1
Expand Down Expand Up @@ -93,3 +93,24 @@ def perform_scene_seg(img, lbl, clf):
fig.tight_layout()

plt.show()


# ========================================================#
# FUNCTION III

# performs scene segmentation on multidimensional input
# Input(s):
# classifier - trained classifier
# features - ndarray of features, first dimension is number of features, others
# are compatible with shape of image to segment
# Output(s):
# output - ndarray of predictions


def predict_sceneseg(classifier, features, task_id):
sh = features.shape
if features.ndim > 2:
features = features.reshape((-1, sh[-1]))
predicted_labels = classifier.predict(features, task_id)
output = predicted_labels.reshape(sh[:-1])
return output
411 changes: 360 additions & 51 deletions docs/tutorials/scene_segmentation_rf_isic_tutorial.ipynb

Large diffs are not rendered by default.

Loading