Spaces:
Sleeping
Sleeping
Nischal Suresh commited on
Commit ·
ceab024
1
Parent(s): 58342dc
Updating CSV file
Browse files- app.py +2 -2
- density_veytel.csv +6 -0
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def new__cxr(max_dense_0, max_dense_1, max_dense_2):
|
|
| 86 |
dense_1 = np.where(((textured_cxr<scaled_thresh2) & (textured_cxr>=scaled_thresh1)), textured_cxr, 0)
|
| 87 |
dense_2 = np.where(((textured_cxr<scaled_thresh3) & (textured_cxr>=scaled_thresh2)), textured_cxr, 0)
|
| 88 |
dense_3 = np.where(((textured_cxr<255) & (textured_cxr>=scaled_thresh3)), textured_cxr, 0)
|
| 89 |
-
return cxr, textured_cxr, lung_noised, dense_0, dense_1, dense_2, dense_3, count
|
| 90 |
|
| 91 |
def create_csv():
|
| 92 |
global count, fieldnames, image_id, index, csv_path
|
|
@@ -209,7 +209,7 @@ with gr.Blocks() as demo:
|
|
| 209 |
with gr.Column(): # adding additional for better visualization
|
| 210 |
im3_1 = gr.Image(lung_noised, label="Synthetic CXR")
|
| 211 |
|
| 212 |
-
button1.click(new__cxr, inputs = [max_dense_0, max_dense_1, max_dense_2], outputs = [im1, im2, im3, dense0, dense1, dense2, dense3, progress_log])
|
| 213 |
button1.click(change_vis,outputs=[label1, button1])
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
|
|
|
| 86 |
dense_1 = np.where(((textured_cxr<scaled_thresh2) & (textured_cxr>=scaled_thresh1)), textured_cxr, 0)
|
| 87 |
dense_2 = np.where(((textured_cxr<scaled_thresh3) & (textured_cxr>=scaled_thresh2)), textured_cxr, 0)
|
| 88 |
dense_3 = np.where(((textured_cxr<255) & (textured_cxr>=scaled_thresh3)), textured_cxr, 0)
|
| 89 |
+
return cxr, textured_cxr, lung_noised, lung_noised, dense_0, dense_1, dense_2, dense_3, count
|
| 90 |
|
| 91 |
def create_csv():
|
| 92 |
global count, fieldnames, image_id, index, csv_path
|
|
|
|
| 209 |
with gr.Column(): # adding additional for better visualization
|
| 210 |
im3_1 = gr.Image(lung_noised, label="Synthetic CXR")
|
| 211 |
|
| 212 |
+
button1.click(new__cxr, inputs = [max_dense_0, max_dense_1, max_dense_2], outputs = [im1, im2, im3, im3_1, dense0, dense1, dense2, dense3, progress_log])
|
| 213 |
button1.click(change_vis,outputs=[label1, button1])
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
density_veytel.csv
CHANGED
|
@@ -66,3 +66,9 @@ count,thresh_1,thresh_2,thresh_3
|
|
| 66 |
count,thresh_1,thresh_2,thresh_3
|
| 67 |
|
| 68 |
count,thresh_1,thresh_2,thresh_3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
count,thresh_1,thresh_2,thresh_3
|
| 67 |
|
| 68 |
count,thresh_1,thresh_2,thresh_3
|
| 69 |
+
1,50,100,150
|
| 70 |
+
2,50,100,150
|
| 71 |
+
3,50,100,150
|
| 72 |
+
4,29,56,143
|
| 73 |
+
|
| 74 |
+
count,thresh_1,thresh_2,thresh_3
|