# Segformer -encode images with more 3 channels

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsegformer-encode-images-with-more-3-channels%2F29803%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 16, 2023, 3:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsegformer-encode-images-with-more-3-channels%2F29803 "2023-01-16T15:02:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alanoix](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/alanoix/32/13170_2.png) [@alanoix](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Falanoix)%5C
**Post date:** [January 16, 2023, 3:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsegformer-encode-images-with-more-3-channels%2F29803%2F1 "2023-01-16T15:02:48Z")

</div>

Hi everyone,  
Thank you for the work of HuggingFace Team !

I try to use the model Segformer with images with more 3 channels.

image.shape  
(7, 512, 512)

from transformers import SegformerForSemanticSegmentation, SegformerFeatureExtractor  
feature\_extractor = SegformerFeatureExtractor(align=False, reduce\_zero\_label=False)

inputs = feature\_extractor(images=image, return\_tensors=“pt”)  
ValueError: Unable to infer channel dimension format

Anyone for help me ?  
Thank you
