File size: 1,329 Bytes
aef4429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import streamlit as st


def default_UI():
    st.file_uploader("Upload image file or directory:", key="img_upload", accept_multiple_files=True)

    st.checkbox("Turn on **precise visualization**", key="turn_on_visualize")
    st.checkbox("Viualize **position box**", key="show_rectangle_position")

    st.radio(
        "Select sample size for model input and save output:",
        key="img_size",
        options=[
            "512x512",
            "640x640",
            "1280x1280",
        ],
        index=1
    )
    st.slider(
        "Select sample width size for visualization:",
        key="width_visual",
        min_value=80, max_value=1000,
        value=560,
    )
    st.checkbox("Show all **main** faces", key="show_all_main_faces")
    st.checkbox("Show all **sub** faces", key="show_all_sub_faces")

    st.write("**Advanced options**")
    st.slider(
        "Adjust position horizontal thresholds:",
        key="position_horizontal_thresholds",
        min_value=0.0, max_value=1.0,
        value=(0.33, 0.66),
    )
    st.slider(
        "Adjust position vertical thresholds:",
        key="position_vertical_thresholds",
        min_value=0.0, max_value=1.0,
        value=(0.33, 0.66),
    )
    st.checkbox(
        "Using **local cache** for results saving",
        key="using_local_cache"
    )