mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-01-29 13:46:58 +01:00
fix: prevent crash when printspace is missing in xmls used for label generation
This commit is contained in:
parent
6ae244bf9b
commit
33f6a231bc
1 changed files with 8 additions and 5 deletions
|
|
@ -737,9 +737,12 @@ def get_images_of_ground_truth(gt_list, dir_in, output_dir, output_type, config_
|
|||
|
||||
cnt_size = np.array([cv2.contourArea(contours[j]) for j in range(len(contours))])
|
||||
|
||||
try:
|
||||
cnt = contours[np.argmax(cnt_size)]
|
||||
|
||||
x, y, w, h = cv2.boundingRect(cnt)
|
||||
except:
|
||||
x, y , w, h = 0, 0, x_len, y_len
|
||||
|
||||
bb_xywh = [x, y, w, h]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue