Spaces:
Runtime error
Runtime error
Commit
·
59e722f
1
Parent(s):
7489eab
up 10
Browse files- preprocessing.py +14 -14
preprocessing.py
CHANGED
|
@@ -66,20 +66,20 @@ def get_mask(image_mask: np.ndarray) -> np.ndarray:
|
|
| 66 |
return mask
|
| 67 |
|
| 68 |
|
| 69 |
-
def get_image() -> np.ndarray:
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
|
| 84 |
|
| 85 |
# def make_enhance_config(segmentation, objects=None):
|
|
|
|
| 66 |
return mask
|
| 67 |
|
| 68 |
|
| 69 |
+
# def get_image() -> np.ndarray:
|
| 70 |
+
#
|
| 71 |
+
# """Get the image from the session state.
|
| 72 |
+
# Returns:
|
| 73 |
+
# np.ndarray: image
|
| 74 |
+
# """
|
| 75 |
+
# if 'initial_image' in st.session_state and st.session_state['initial_image'] is not None:
|
| 76 |
+
# initial_image = st.session_state['initial_image']
|
| 77 |
+
# if isinstance(initial_image, Image.Image):
|
| 78 |
+
# return np.array(initial_image.resize((WIDTH, HEIGHT)))
|
| 79 |
+
# else:
|
| 80 |
+
# return np.array(Image.fromarray(initial_image).resize((WIDTH, HEIGHT)))
|
| 81 |
+
# else:
|
| 82 |
+
# return None
|
| 83 |
|
| 84 |
|
| 85 |
# def make_enhance_config(segmentation, objects=None):
|