Diff of /pages/4_R2UNet.py [000000] .. [2a09d1]

Switch to unified view

a b/pages/4_R2UNet.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="R2UNet")
9
10
# FUNCTIONS
11
f.modelsCheck()
12
description_R2UNet = Path('models/R2UNet/description_R2UNet.md').read_text()
13
evaluation_R2UNet_df = pd.read_csv('./models/R2UNet/csv_logger_R2UNet.csv')
14
test_iou = evaluation_R2UNet_df.iloc[-1]['test_iou']
15
testing_time = evaluation_R2UNet_df.iloc[-1]['testing_time']
16
# HEADER
17
def header_page():
18
    st.markdown("<h1 style='text-align: center;'>R2UNet Architecture</h1>", unsafe_allow_html=True)
19
    st.image('models/R2UNet/R2UNet.png')
20
21
# BODY
22
def body_page():
23
    st.markdown(description_R2UNet, unsafe_allow_html=True)
24
25
# SIDEBAR
26
with st.sidebar:
27
    description = "R2UNet is an architecture that combines the concepts of recursion and residual blocks to enhance the performance of image segmentation. Built upon the U-Net framework, R2UNet employs an encoding and decoding path that leverages multi-scale contextual features through recursion and residual blocks. Its objective is to improve segmentation accuracy and effectively handle complex structures in biomedical images."
28
    model_result = 'The R2UNet 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()