Skip to content

Commit 7bf932a

Browse files
committed
imgseg: initializing the labels of the full image with the labels of the sub-image
1 parent 80c173a commit 7bf932a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/idc/imgaug/filter/_sub_images_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def transfer_region(full_image, sub_image, region: LocatedObject, rebuild_image:
309309
w = region.width
310310
h = region.height
311311
if (not full_image.has_annotation()) or (not full_image.has_layer(label)):
312-
full_image.new_layer(label)
312+
full_image.new_layer(label, labels=sub_image.annotation.labels)
313313
layer = sub_image.annotation.layers[label]
314314
layer = crop_image(layer, crop_width=crop_width, crop_height=crop_height)
315315
full_image.annotation.layers[label][y:y + h, x:x + w] += layer

0 commit comments

Comments
 (0)