Skip to content
Snippets Groups Projects
Commit 6fd952ca authored by Nattapon Jaroenchai's avatar Nattapon Jaroenchai
Browse files

Update inference.py

parent 6bcd6fc6
No related branches found
No related tags found
1 merge request!1updated main for release
......@@ -62,7 +62,7 @@ def prediction_mask(prediction_result, map_name, legend, outputPath):
contour = sorted(contours, key=cv2.contourArea, reverse=True)[0]
wid, hight = prediction_result.shape[0], prediction_result.shape[1]
mask = np.zeros([wid, hight])
mask = cv2.fillPoly(mask, pts=[contour], color=(1)).astype(int)
mask = cv2.fillPoly(mask, pts=[contour], color=(1,1,1)).astype(int)
# Threshold prediction results and convert to int
prediction_result_int = (prediction_result > 0.5).astype(int)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment