Skip to content

Commit 06cc681

Browse files
authored
Merge pull request #78 from siddhawan/master
Update heatmap.py
2 parents e8c98ac + a6bf6ea commit 06cc681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

surya/postprocessing/heatmap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def detect_boxes(linemap, text_threshold, low_text):
143143

144144
mask = np.zeros_like(linemap).astype(np.uint8)
145145
cv2.fillPoly(mask, [np.int32(box)], 255)
146-
mask = mask.astype(np.float16) / 255
146+
mask = mask.astype(np.float32) / 255
147147

148148
roi = np.where(mask == 1, linemap, 0)
149149
confidence = np.mean(roi[roi != 0])

0 commit comments

Comments
 (0)