Commit
·
b7a73bc
1
Parent(s):
a9bc5e6
Upload app.py
Browse files
app.py
CHANGED
|
@@ -136,8 +136,10 @@ if image_file is not None:
|
|
| 136 |
|
| 137 |
image=cv2.imread(image_file)
|
| 138 |
|
| 139 |
-
st.
|
| 140 |
st.image(image,width=1100)
|
|
|
|
|
|
|
| 141 |
|
| 142 |
img=np.asarray(image)
|
| 143 |
|
|
@@ -159,7 +161,7 @@ if image_file is not None:
|
|
| 159 |
img = cv2.drawContours(img, cnts, -1, (255, 0, 0), 2)
|
| 160 |
|
| 161 |
if img is not None :
|
| 162 |
-
st.subheader("Predicted
|
| 163 |
st.write(img.shape)
|
| 164 |
st.image(img,width=1100)
|
| 165 |
|
|
@@ -168,12 +170,13 @@ if image_file is not None:
|
|
| 168 |
predicted=cv2.imread("predict.png")
|
| 169 |
predicted = cv2.resize(predicted, (image.shape[1],image.shape[0]), interpolation=cv2.INTER_LANCZOS4)
|
| 170 |
cca_result,teeth_count=CCA_Analysis(image,predicted,3,2)
|
|
|
|
| 171 |
if cca_result is not None :
|
| 172 |
-
st.subheader("
|
| 173 |
st.write(cca_result.shape)
|
| 174 |
st.image(cca_result,width=1100)
|
| 175 |
|
| 176 |
-
st.text(
|
| 177 |
|
| 178 |
st.text("DONE ! ....")
|
| 179 |
|
|
|
|
| 136 |
|
| 137 |
image=cv2.imread(image_file)
|
| 138 |
|
| 139 |
+
st.subheader("Original Image")
|
| 140 |
st.image(image,width=1100)
|
| 141 |
+
|
| 142 |
+
st.text("Making A Prediction ....")
|
| 143 |
|
| 144 |
img=np.asarray(image)
|
| 145 |
|
|
|
|
| 161 |
img = cv2.drawContours(img, cnts, -1, (255, 0, 0), 2)
|
| 162 |
|
| 163 |
if img is not None :
|
| 164 |
+
st.subheader("Predicted teeth shape")
|
| 165 |
st.write(img.shape)
|
| 166 |
st.image(img,width=1100)
|
| 167 |
|
|
|
|
| 170 |
predicted=cv2.imread("predict.png")
|
| 171 |
predicted = cv2.resize(predicted, (image.shape[1],image.shape[0]), interpolation=cv2.INTER_LANCZOS4)
|
| 172 |
cca_result,teeth_count=CCA_Analysis(image,predicted,3,2)
|
| 173 |
+
|
| 174 |
if cca_result is not None :
|
| 175 |
+
st.subheader("Seperate predicted teeth")
|
| 176 |
st.write(cca_result.shape)
|
| 177 |
st.image(cca_result,width=1100)
|
| 178 |
|
| 179 |
+
st.text("Teeth Count = " + str(teeth_count))
|
| 180 |
|
| 181 |
st.text("DONE ! ....")
|
| 182 |
|