Open avickars opened 2 years ago
The forward and post-process code is both in the simple_test
of maskformer detector. https://github.com/open-mmlab/mmdetection/blob/master/mmdet/models/detectors/maskformer.py#L111. You can use the outputs of mask2former_head forward which is without postprocess.
@avickars @jbwang1997 Hello, have you successfully trained mask2former? Have you encountered any of the following errors: ValueError: matrix contains invalid numeric entries? For details, see #8155
yup I had no problems training, haven't seen that error.
I am currently about 90% of the way there in converting mask2former into torchscript. The issue I am running into is how to adjust the output of the model as it outputs a list of numpy arrays that are of course incompatible with torchscript. I so far have been unable to find the code relating to the model output in the mm detection code base. My assumption is that since it is a pytorch model, it must be outputting a tensor and the conversion into numpy arrays is happening after the fact during a post-processing step. If someone could point me to the spot where that it is happening it would be greatly appreciated!