Update app.py
Browse files
app.py
CHANGED
|
@@ -67,10 +67,9 @@ def segment(rgb: np.ndarray):
|
|
| 67 |
"latency_ms": int((time.time()-t0)*1000),
|
| 68 |
}
|
| 69 |
|
| 70 |
-
# --- 3. GRADIO INTERFACE
|
| 71 |
|
| 72 |
# Define the paths to your example images
|
| 73 |
-
# Ensure the folder "examples" exists and contains these specific files
|
| 74 |
example_files = [
|
| 75 |
["examples/1.jpg"],
|
| 76 |
["examples/2.jpg"],
|
|
@@ -81,7 +80,7 @@ example_files = [
|
|
| 81 |
|
| 82 |
with gr.Blocks(title="Panoramic Radiograph Segmentation") as demo:
|
| 83 |
gr.Markdown("## Dental X-Ray Segmentation App")
|
| 84 |
-
gr.Markdown("Upload a panoramic radiograph (or click an example below) to detect teeth
|
| 85 |
|
| 86 |
with gr.Row():
|
| 87 |
# --- Left Column: Input ---
|
|
@@ -105,5 +104,17 @@ with gr.Blocks(title="Panoramic Radiograph Segmentation") as demo:
|
|
| 105 |
# Link the button to the function
|
| 106 |
submit_btn.click(fn=segment, inputs=img_in, outputs=[img_out, json_out], api_name="/predict")
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
if __name__ == "__main__":
|
| 109 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 67 |
"latency_ms": int((time.time()-t0)*1000),
|
| 68 |
}
|
| 69 |
|
| 70 |
+
# --- 3. GRADIO INTERFACE ---
|
| 71 |
|
| 72 |
# Define the paths to your example images
|
|
|
|
| 73 |
example_files = [
|
| 74 |
["examples/1.jpg"],
|
| 75 |
["examples/2.jpg"],
|
|
|
|
| 80 |
|
| 81 |
with gr.Blocks(title="Panoramic Radiograph Segmentation") as demo:
|
| 82 |
gr.Markdown("## Dental X-Ray Segmentation App")
|
| 83 |
+
gr.Markdown("Upload a panoramic radiograph (or click an example below) to detect teeth.")
|
| 84 |
|
| 85 |
with gr.Row():
|
| 86 |
# --- Left Column: Input ---
|
|
|
|
| 104 |
# Link the button to the function
|
| 105 |
submit_btn.click(fn=segment, inputs=img_in, outputs=[img_out, json_out], api_name="/predict")
|
| 106 |
|
| 107 |
+
# --- CITATIONS SECTION ---
|
| 108 |
+
gr.Markdown("---")
|
| 109 |
+
gr.Markdown(
|
| 110 |
+
"""
|
| 111 |
+
### Credits & Citations
|
| 112 |
+
Credits & Citations:
|
| 113 |
+
* **Methodology:** Brahmi, W., & Jdey, I. (2024). Automatic tooth instance segmentation and identification from panoramic X-Ray images using deep CNN. *Multimedia Tools and Applications, 83*(18), 55565–55585.
|
| 114 |
+
* **Literature Review:** Brahmi, W., Jdey, I., & Drira, F. (2024). Exploring the role of Convolutional Neural Networks (CNN) in dental radiography segmentation: A comprehensive Systematic Literature Review. *Engineering Applications of Artificial Intelligence, 133*, 108510.
|
| 115 |
+
* **Dataset:** [Panoramic Dental X-rays (Mendeley Data)](https://data.mendeley.com/datasets/73n3kz2k4k/3)
|
| 116 |
+
"""
|
| 117 |
+
)
|
| 118 |
+
|
| 119 |
if __name__ == "__main__":
|
| 120 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|