|
a |
|
b/pages/3_UNet++.py |
|
|
1 |
import streamlit as st |
|
|
2 |
import functions as f |
|
|
3 |
import components.components as comp |
|
|
4 |
from pathlib import Path |
|
|
5 |
import pandas as pd |
|
|
6 |
|
|
|
7 |
# TITLE TAB |
|
|
8 |
st.set_page_config(page_title="UNet++") |
|
|
9 |
|
|
|
10 |
# FUNCTIONS |
|
|
11 |
f.modelsCheck() |
|
|
12 |
description_UNetPP = Path('models/UNet++/description_UNet++.md').read_text() |
|
|
13 |
evaluation_unetpp_df = pd.read_csv('./models/UNet++/csv_logger_UNet++.csv') |
|
|
14 |
test_iou = evaluation_unetpp_df.iloc[-1]['test_iou'] |
|
|
15 |
testing_time = evaluation_unetpp_df.iloc[-1]['testing_time'] |
|
|
16 |
# HEADER |
|
|
17 |
def header_page(): |
|
|
18 |
st.markdown("<h1 style='text-align: center;'>UNet++ Architecture</h1>", unsafe_allow_html=True) |
|
|
19 |
st.image('models/UNet++/UNet++.png') |
|
|
20 |
|
|
|
21 |
# BODY |
|
|
22 |
def body_page(): |
|
|
23 |
st.markdown(description_UNetPP, unsafe_allow_html=True) |
|
|
24 |
|
|
|
25 |
# SIDEBAR |
|
|
26 |
with st.sidebar: |
|
|
27 |
description = "UNet++ is a convolutional neural network architecture designed for biomedical image segmentation tasks. It consists of an encoding path that extracts features through convolutions and downsampling, and a decoding path that restores the image resolution through upsampling and information merging. UNet++'s unique architecture effectively combines local image details with global contextual information, resulting in improved segmentation accuracy." |
|
|
28 |
model_result = 'The UNet++ model in the Modern Lung Segmentation application achieved an Intersection over Union (IoU) of {:.3f} during testing, with a training time of {:.3f}s.'.format(test_iou, testing_time) |
|
|
29 |
|
|
|
30 |
st.markdown(f'<p style="font-size:15px; text-align:justify">{description}', unsafe_allow_html=True) |
|
|
31 |
st.markdown(f'<p style="font-size:15px; text-align:justify">{model_result}', unsafe_allow_html=True) |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
# FOOTER |
|
|
35 |
def footer_page(): |
|
|
36 |
# st.markdown("<p><br></p>", unsafe_allow_html=True) |
|
|
37 |
# st.markdown("<div style='margin-top:200px;'></div>", unsafe_allow_html=True) |
|
|
38 |
comp.margin_top(200) |
|
|
39 |
st.markdown("<p style='text-align: center; font-style:italic;'>Copyright ⓒ 2023 - By Achmad Bauravindah</p>", unsafe_allow_html=True) |
|
|
40 |
|
|
|
41 |
if __name__ == '__main__': |
|
|
42 |
header_page() |
|
|
43 |
body_page() |
|
|
44 |
footer_page() |