Artifact from practicing not changed
Browse files
app.py
CHANGED
@@ -93,7 +93,7 @@ def segment_images(model_name,url_input,image_input,threshold):
|
|
93 |
return_string = ""
|
94 |
|
95 |
for r in results["segments_info"]:
|
96 |
-
contour_list, hierarchy = contour_map(results["segmentation"], r["
|
97 |
label_name = model.config.id2label[r["label_id"]]
|
98 |
return_string += f"ID: {r['id']}, Contour Length: {len(contour_list)}, Label Name: {label_name}, Score: {r['score']}\n"
|
99 |
|
|
|
93 |
return_string = ""
|
94 |
|
95 |
for r in results["segments_info"]:
|
96 |
+
contour_list, hierarchy = contour_map(results["segmentation"], r["id"])
|
97 |
label_name = model.config.id2label[r["label_id"]]
|
98 |
return_string += f"ID: {r['id']}, Contour Length: {len(contour_list)}, Label Name: {label_name}, Score: {r['score']}\n"
|
99 |
|