When i run the code :
pred_page_coords = boxes_detection.find_boxes(bin_upscaled.astype(np.uint8, copy=False),
mode='min_rectangle', n_max_boxes=1)
i get the error:
ValueError Traceback (most recent call last)
in ()
1 pred_page_coords = boxes_detection.find_boxes(bin_upscaled.astype(np.uint8, copy=False), mode='min_rectangle', n_max_boxes=1)
----> 2
/content/dh_segment/post_processing/boxes_detection.py in find_boxes(boxes_mask, mode,min_area, p_arc_length, n_max_boxes)
26 'Input mask must be a 2D array ! Mask is now of shape {}'.format(boxes_mask.shape)
27
---> 28 contours, _ = cv2.findContours(boxes_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
29 if contours is None:
30 print('No contour found')
**ValueError: too many values to unpack (expected 2)**
In Demo folder when i run interactive_demo.ipynb
When i run the code : pred_page_coords = boxes_detection.find_boxes(bin_upscaled.astype(np.uint8, copy=False), mode='min_rectangle', n_max_boxes=1)
i get the error:
ValueError Traceback (most recent call last)