Spaces:
Runtime error
Runtime error
haya-alwarthan
commited on
Commit
·
eac0473
1
Parent(s):
a9f2454
roboflow install
Browse files
app.py
CHANGED
@@ -146,6 +146,7 @@ def predict_fn(img_path):
|
|
146 |
og_img=cv2.imread(img_path)
|
147 |
img=binary_mask_img(p,og_img)
|
148 |
outputs = kp_predictor(img) # format is documented at https://detectron2.readthedocs.io/tutorials/models.html#model-output-format
|
|
|
149 |
p=np.asarray(outputs["instances"].to("cpu").pred_keypoints, dtype='float32')[0].reshape(-1)
|
150 |
pairss=convert_to_pairs(p)
|
151 |
output=visualize(img,pairss)
|
@@ -167,7 +168,7 @@ gr.Interface(
|
|
167 |
inputs=inputs_image,
|
168 |
outputs=outputs_image,
|
169 |
title="Coordinates of the Landmarks",
|
170 |
-
).launch()
|
171 |
|
172 |
|
173 |
|
|
|
146 |
og_img=cv2.imread(img_path)
|
147 |
img=binary_mask_img(p,og_img)
|
148 |
outputs = kp_predictor(img) # format is documented at https://detectron2.readthedocs.io/tutorials/models.html#model-output-format
|
149 |
+
print("outputs==".format(outputs["instances"].to("cpu")))
|
150 |
p=np.asarray(outputs["instances"].to("cpu").pred_keypoints, dtype='float32')[0].reshape(-1)
|
151 |
pairss=convert_to_pairs(p)
|
152 |
output=visualize(img,pairss)
|
|
|
168 |
inputs=inputs_image,
|
169 |
outputs=outputs_image,
|
170 |
title="Coordinates of the Landmarks",
|
171 |
+
).launch(debug=True)
|
172 |
|
173 |
|
174 |
|