# SegformerImageProcesser only supports uint8 masks

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsegformerimageprocesser-only-supports-uint8-masks%2F60871%3E%5C
**Category:** 🤗Transformers\
**Created:** [November 2, 2023, 8:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsegformerimageprocesser-only-supports-uint8-masks%2F60871 "2023-11-02T20:06:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsjstc](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dsjstc/32/15569_2.png) [@dsjstc](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdsjstc)%5C
**Post date:** [November 2, 2023, 8:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsegformerimageprocesser-only-supports-uint8-masks%2F60871%2F1 "2023-11-02T20:06:11Z")

</div>

I have a semantic segmentation problem with several hundred classes. It appears that SegformerImageProcesser needs to be able to trivially convert masks to an 8-bit PIL. If I pass in an RGB pil, then I get pixel\_values.shape = (3,512,512), and labels.shape = (512,512,3). That makes me think this isn’t an intended usage.

AFAIK the only transform I need to apply to the mask is a resize, so I can easily do that on my own, but it seems like an odd limitation.

Am I misunderstanding something here?
