Skip to content

Commit

Permalink
cached results
Browse files Browse the repository at this point in the history
  • Loading branch information
papalotis committed Apr 5, 2023
1 parent 92b947b commit a7d0e30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drawing_to_fsd_layout/image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def load_image_and_preprocess(
return image_unsharp


@st.cache(show_spinner=False)
def reorder_track_edge(
g: nx.Graph, cc_idxs: Iterable[int], all_nodes_positions: FloatArrayNx2
) -> FloatArrayNx2:
Expand All @@ -168,6 +169,7 @@ def reorder_track_edge(
return cc_positions_ordered_low_res


@st.cache(show_spinner=False, suppress_st_warning=True)
def extract_track_edges(
image: Image,
show_steps: bool = False,
Expand Down Expand Up @@ -226,7 +228,7 @@ def extract_track_edges(

return outer_ordered, inner_ordered


@st.cache(show_spinner=False)
def fix_edges_orientation_and_scale_to_unit(
edge_a: FloatArrayNx2, edge_b: FloatArrayNx2
) -> tuple[FloatArrayNx2, FloatArrayNx2]:
Expand Down

0 comments on commit a7d0e30

Please sign in to comment.