Closed Hommoner closed 1 year ago
@Hommoner thanks for contribution!
this feature sounds good for me, but we might still need some modify.
Could u please make 1 edit?
like for Shifts, if we don't want shifts in augmentation just disable it:
INPUT:
SHIFTS:
ENABLED: True
SHIFT_PIXELS: 1.2
INPUT:
SHIFTS:
ENABLED: false
SHIFT_PIXELS: 1.2
same as Random Flip, only append when users implicit defines ENABLED as True in config.
I agree with SHIFTS add ENABLED Flag is a good idea , but we should consider that flip parameters initial to cfg.INPUT.RANDOM_FLIP = "horizontal" in cfg = get_cfg() , where derived from detectron2.config import get_cfg. so even we change RANDOM_FLIP like this this
RANDOM_FLIP_HORIZONTAL: ENABLED: False RANDOM_FLIP_VERTICAL: ENABLED: False
after cfg initialized, user will still see the cfg paramter cfg.INPUT.RANDOM_FLIP = "horizontal"
@Hommoner thanks for the modify. It looks good to me.
It would be better if there is a PRO
field under RNADOM_FLIP_HORIZONTAL, so that we can append new aug in datamapper like this:
T.RandomFlip(prob=cfg.INPU.RANDOM_FLIP_HORIZONTAL.PROB, horizontal=cfg.INPU.RANDOM_FLIP_HORIZONTAL.ENABLED, vertical=False),
done, please check
allow not using SHIFT_PIXELS by config cfg.INPUT.SHIFT.SHIFT_PIXELS=0 allow RandomFlip and achieve horizontal and vertical by config cfg.INPUT.RANDOM_FLIP = "horizontal,vertical"