Instructions to use shi-labs/oneformer_ade20k_swin_tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shi-labs/oneformer_ade20k_swin_tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="shi-labs/oneformer_ade20k_swin_tiny")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, OneFormerForUniversalSegmentation processor = AutoProcessor.from_pretrained("shi-labs/oneformer_ade20k_swin_tiny") model = OneFormerForUniversalSegmentation.from_pretrained("shi-labs/oneformer_ade20k_swin_tiny", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
text_mapper not initialized
#3
by yuyijiong - opened
I want to fine tune the model, so:
config=OneFormerConfig.from_pretrained("shi-labs/oneformer_ade20k_swin_tiny",is_training=True)
model = OneFormerForUniversalSegmentation.from_pretrained("shi-labs/oneformer_ade20k_swin_tiny",config=config)
But the text_mapper seems not in the model checkpoint:
Some weights of OneFormerForUniversalSegmentation were not initialized from the model checkpoint at shi-labs/oneformer_ade20k_swin_tiny and are newly initialized: ['model.text_mapper.text_encoder.transformer.layers.2.mlp.fc1.bias', ......,'model.text_mapper.text_encoder.transformer.layers.5.self_attn.out_proj.bias']
So that means I must retrain the text_mapper if fine-tuning?