Skip to content

showitems cannot overlay a mask on an image #146

Done

Description

@CarloLucibello

showitems draws the items in order, and a mask is drawn with opaque colors on every pixel, including the first class. In showitems((image, mask)) the image is therefore completely hidden, and showgrid of (image, mask) pairs only shows the masks.

using DataAugmentation, Images

image = Image(rand(RGB{N0f8}, 20, 20))
mask = MaskMulti(rand(1:3, 20, 20), 1:3)

shown = showitems((image, mask))

all(==(1), alpha.(shown))   # true
shown == showitems(mask)    # true

Overlaying a mask on its image is a common way to check that they are still aligned after a transformation, and the Gallery already does this with a BoundingBox, which is drawn on top of the image. Julia 1.13.4, DataAugmentation master (e389a2f).

A possible change is to draw masks with partial transparency, and perhaps leave the first class (the background) transparent, optionally controlled by a keyword. In #142 the Pipelines page works around this by showing images and masks next to each other with mosaicview.

🧔‍♂️🤖 Assisted by AI

Activity

  1. added
    enhancement
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions