Update src/streamlit_app.py
Browse files- src/streamlit_app.py +12 -0
src/streamlit_app.py
CHANGED
|
@@ -44,3 +44,15 @@ if uploaded_file is not None:
|
|
| 44 |
|
| 45 |
st.subheader("Predicted Keypoints (x, y)")
|
| 46 |
st.write(keypoints)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
st.subheader("Predicted Keypoints (x, y)")
|
| 46 |
st.write(keypoints)
|
| 47 |
+
|
| 48 |
+
import matplotlib.pyplot as plt
|
| 49 |
+
|
| 50 |
+
fig, ax = plt.subplots()
|
| 51 |
+
ax.imshow(image, cmap='gray')
|
| 52 |
+
|
| 53 |
+
# Let op: x = kolom, y = rij
|
| 54 |
+
ax.scatter(keypoints[:, 0], keypoints[:, 1], c='red', s=20)
|
| 55 |
+
|
| 56 |
+
ax.axis("off")
|
| 57 |
+
st.pyplot(fig)
|
| 58 |
+
|