Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files
pages/1_💾_Data_Panel.py
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Read
|
2 |
+
import streamlit as st
|
3 |
+
import sys,os
|
4 |
+
|
5 |
+
|
6 |
+
sys.path.append(f'{os.getcwd()}/utils')
|
7 |
+
from utils.data_users import get_product_dev_page_layout,get_product_manager_page_layout,get_product_practitioner_page_layout
|
8 |
+
|
9 |
+
|
10 |
+
print(os.getcwd())
|
11 |
+
# st.write(st.session_state.user_group)
|
12 |
+
USER_GROUPS = ["Developer", "Manager", "Practitioner"]
|
13 |
+
|
14 |
+
st.set_page_config(layout="wide")
|
15 |
+
|
16 |
+
if 'user_group' not in st.session_state:
|
17 |
+
index_tmp = 0
|
18 |
+
else:
|
19 |
+
index_tmp = USER_GROUPS.index(st.session_state['user_group'])
|
20 |
+
|
21 |
+
#Sidebar for USER GROUPS
|
22 |
+
st.sidebar.title("USER GROUPS")
|
23 |
+
backend = st.sidebar.selectbox(
|
24 |
+
"Select User-Group ", USER_GROUPS, index=index_tmp
|
25 |
+
)
|
26 |
+
|
27 |
+
st.session_state['user_group'] = backend
|
28 |
+
|
29 |
+
# # with st.sidebar:
|
30 |
+
# st.sidebar.title("🎈Explore Data Panel")
|
31 |
+
|
32 |
+
st.title("Data Panel for OCT Image Analysis")
|
33 |
+
|
34 |
+
st.write(
|
35 |
+
"""
|
36 |
+
##
|
37 |
+
To gain a comprehensive understanding of the AI system, examining the data has a crucial role. The Data Panel adopts a data-centric approach, providing detailed information about the following aspects of the data:
|
38 |
+
""")
|
39 |
+
|
40 |
+
|
41 |
+
list_test = """<ul>
|
42 |
+
<li>Data Source Information contains information related to the modality, format, domain, ethical considerations, including licensing and data version. </li>
|
43 |
+
<li>Exploratory Data Stats presents exploratory data analysis information covering train/validation/test data division, summary statistics, and sample visualization from each category. </li>
|
44 |
+
<li>Data Onboarding provides information about the data pre-processing and post-processing steps applied to the dataset before training, as well as any data augmentations that were used.</li>
|
45 |
+
</ul>"""
|
46 |
+
st.markdown(list_test, unsafe_allow_html=True)
|
47 |
+
|
48 |
+
|
49 |
+
if backend == "Developer":
|
50 |
+
get_product_dev_page_layout()
|
51 |
+
|
52 |
+
|
53 |
+
if backend == "Manager":
|
54 |
+
get_product_manager_page_layout()
|
55 |
+
|
56 |
+
if backend == "Practitioner":
|
57 |
+
get_product_practitioner_page_layout()
|
pages/2_📝_Model_Panel.py
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import sys,os
|
3 |
+
|
4 |
+
|
5 |
+
sys.path.append(f'{os.getcwd()}/utils')
|
6 |
+
from utils.model_users import get_product_dev_page_layout,get_product_manager_page_layout,get_product_practitioner_page_layout
|
7 |
+
|
8 |
+
# st.write(st.session_state.user_group)
|
9 |
+
USER_GROUPS = ["Developer", "Manager", "Practitioner"]
|
10 |
+
|
11 |
+
st.set_page_config(layout="wide")
|
12 |
+
|
13 |
+
if 'user_group' not in st.session_state:
|
14 |
+
index_tmp = 0
|
15 |
+
else:
|
16 |
+
index_tmp = USER_GROUPS.index(st.session_state['user_group'])
|
17 |
+
|
18 |
+
#Sidebar for USER GROUPS
|
19 |
+
st.sidebar.title("USER GROUPS")
|
20 |
+
backend = st.sidebar.selectbox(
|
21 |
+
"Select User-Group ", USER_GROUPS, index=index_tmp
|
22 |
+
)
|
23 |
+
|
24 |
+
st.session_state['user_group'] = backend
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
st.title("Model Panel for OCT Image Analysis")
|
29 |
+
st.write(
|
30 |
+
"""
|
31 |
+
The users can find following information regarding the AI model developed for the task: what is the purpose of the model, how it was developed and how it is used. Thus,answers
|
32 |
+
to these questions areprovided via the tabs described below.
|
33 |
+
""")
|
34 |
+
|
35 |
+
list_test = """<ul>
|
36 |
+
<li>Model Generic information contains a summary of the model’s details, including its main features, capabilities, and intended use.
|
37 |
+
It also highlights the model’s behaviour, such as the type of data inputs(image, feature etc) it can handle and the types of outputs it produces.</li>
|
38 |
+
<li>Model Development Information includes information on the hyperparameters, model development framework/library such as Tensorflow or PyTorch, and other technical details. It also includes a complete analysis of the model’s inference performance, such as the model size,
|
39 |
+
hardware-specific (GPU and CPU) inference time,and speed, as well as reproducibility check list.</li>
|
40 |
+
<li>Model Deployment Information provides information on how the model is used in production, including details on the inference speed and latency,
|
41 |
+
and how users can access and interact with the model in production.</li>
|
42 |
+
</ul>"""
|
43 |
+
st.markdown(list_test, unsafe_allow_html=True)
|
44 |
+
|
45 |
+
if backend == "Developer":
|
46 |
+
get_product_dev_page_layout()
|
47 |
+
|
48 |
+
if backend == "Manager":
|
49 |
+
get_product_manager_page_layout()
|
50 |
+
|
51 |
+
if backend == "Practitioner":
|
52 |
+
get_product_practitioner_page_layout()
|
pages/3_🎯_Performance_Evaluation_Panel.py
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import sys,os
|
3 |
+
|
4 |
+
sys.path.append(f'{os.getcwd()}/utils')
|
5 |
+
|
6 |
+
from utils.eval_users import get_product_dev_page_layout
|
7 |
+
|
8 |
+
# st.write(st.session_state.user_group)
|
9 |
+
USER_GROUPS = ["Developer", "Manager", "Practitioner"]
|
10 |
+
|
11 |
+
st.set_page_config(layout="wide")
|
12 |
+
|
13 |
+
if 'user_group' not in st.session_state:
|
14 |
+
index_tmp = 0
|
15 |
+
else:
|
16 |
+
index_tmp = USER_GROUPS.index(st.session_state['user_group'])
|
17 |
+
|
18 |
+
#Sidebar for USER GROUPS
|
19 |
+
st.sidebar.title("USER GROUPS")
|
20 |
+
backend = st.sidebar.selectbox(
|
21 |
+
"Select User-Group ", USER_GROUPS, index=index_tmp
|
22 |
+
)
|
23 |
+
|
24 |
+
st.session_state['user_group'] = backend
|
25 |
+
|
26 |
+
st.title("Performance Evaluation Panel for OCT Image Analysis")
|
27 |
+
st.write(
|
28 |
+
"""
|
29 |
+
This panel provides information on the evaluation of the AI model’s performance, including details on the metrics used and the results of the evaluation. Users can also find
|
30 |
+
our notes regarding the encountered issues. The performance metric visualizations and samples of failure and success cases are given in this panel as well.""")
|
31 |
+
|
32 |
+
list_test = """<ul>
|
33 |
+
<li>Evaluation Metrics explains the details of the performance metrics and how each metric is calculated. </li>
|
34 |
+
<li>Performance Summary includes visualizations of the performance metrics over the test set. Users can also find the characteristics of the evaluation data set</li>
|
35 |
+
<li>Issues and Limitations provides examples of observed failure cases, along with visualizations and any possible observations behind the failure cases.</li>
|
36 |
+
</ul>"""
|
37 |
+
st.markdown(list_test, unsafe_allow_html=True)
|
38 |
+
|
39 |
+
|
40 |
+
get_product_dev_page_layout()
|
41 |
+
# if backend == "Developer":
|
42 |
+
# get_product_dev_page_layout()
|
pages/4_🔬_Decision_Exploration_Panel.py
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import sys,os
|
3 |
+
|
4 |
+
sys.path.append(f'{os.getcwd()}/utils')
|
5 |
+
|
6 |
+
from utils.decisions_users import get_product_dev_page_layout
|
7 |
+
|
8 |
+
# st.write(st.session_state.user_group)
|
9 |
+
USER_GROUPS = ["Developer", "Manager", "Practitioner"]
|
10 |
+
|
11 |
+
st.set_page_config(layout="wide")
|
12 |
+
|
13 |
+
if 'user_group' not in st.session_state:
|
14 |
+
index_tmp = 0
|
15 |
+
else:
|
16 |
+
index_tmp = USER_GROUPS.index(st.session_state['user_group'])
|
17 |
+
|
18 |
+
#Sidebar for USER GROUPS
|
19 |
+
st.sidebar.title("USER GROUPS")
|
20 |
+
backend = st.sidebar.selectbox(
|
21 |
+
"Select User-Group ", USER_GROUPS, index=index_tmp
|
22 |
+
)
|
23 |
+
|
24 |
+
st.session_state['user_group'] = backend
|
25 |
+
|
26 |
+
st.title("Decision Exploration Panel for OCT Image Analysis")
|
27 |
+
st.write(
|
28 |
+
"""
|
29 |
+
This panel provides provides both local and global explanations.
|
30 |
+
""")
|
31 |
+
|
32 |
+
list_test = """<ul>
|
33 |
+
<li>Global Explanations: this tab illustrates both representative samples and task-specific borderline samples in the training data from each category in the classification task. These samples enable users
|
34 |
+
to understand which inputs contribute to the model’s decisions. On the other
|
35 |
+
hand, borderline cases can be used to highlight potential failure cases. Also, one can see a manifold visualization
|
36 |
+
of both representative and borderline samples here.</li>
|
37 |
+
<li>Instance Level Explanations: this panel is intended for model sensitivity analysis, decision correction, and decision highlighting using both local expla-
|
38 |
+
nation methods and presenting samples similar to the target sample from the
|
39 |
+
representative samples of the training set. [GradCAM](https://arxiv.org/abs/1610.02391) method is used as a post-hoc explanation technique to highlight aregion of interest.</li>
|
40 |
+
</ul>"""
|
41 |
+
st.markdown(list_test, unsafe_allow_html=True)
|
42 |
+
|
43 |
+
# if backend == "Developer":
|
44 |
+
# get_product_dev_page_layout()
|
45 |
+
if backend == "Manager":
|
46 |
+
get_product_dev_page_layout(user_type ="Manager")
|
47 |
+
else:
|
48 |
+
get_product_dev_page_layout()
|