HoleMakerAttention
HoleMakerAttention
selects the region to be replaced using the information of that region. The region must have at least p
pixels belowing to any relevant class (not the background), where p
is a ratio fixed by the user.
HoleMakerAttention
HoleMakerAttention (attention_threshold:float=0.1, hole_size:tuple=(100, 100))
Defines the size of the hole.
Type | Default | Details | |
---|---|---|---|
attention_threshold | float | 0.1 | The ratio of relevant pixels in the selected region. |
hole_size | tuple | (100, 100) | The size of the hole in a tuple like (y, x). |
HoleMakerAttention.get_hole
HoleMakerAttention.get_hole (mask:numpy.ndarray)
Defines how to make the hole.
Type | Details | |
---|---|---|
mask | ndarray | The mask associated with the image where the hole is going to be made. |