Draft: MaskFormer Changes
Summary
This MR introduces the following changes
- disabling the error if the
maskformer_config.constituent.nameis not in the labels already since that labels are gather via theinput-namesof the tasks. Since I do not have a task which uses the same input as my maskformer configuration, that caused an issue. (see changes incli.py) - changes the way the dimension of
pad_maskare being checked in the forward pass of the maskformer. I had the issue that mypad_maskwould be a dictionary with two keys:maskformer_config.constituent.nameandREGISTERS, now picking only the one with the constituent name (seemaskformer.py) - change the way the
pad_maskis being padded to match dimensionality issues I had (seemaskformer.py) - cast
obj_class_tgt * valid_obj_masktolongbecausetorch.gathercomplained (seematcher.py) - change the ways the weights are parsed to the cross entropy in the maskformer because there was in issue that I had less classes in my mask former config than in my classification task (see
maskformer_loss.py)
I have been trying to debug to my and ChatGPT's best knowledge, but I would appreciate if an expert can have a look if the changes make sense.
Conformity
-
Documentation Updated? -
Development Guidelines followed? -
Pipeline Passes?