-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing preprocessor_config.json file after training segformer model #29790
Comments
Hi, thanks for your interest in SegFormer. This is because when training the model, one could also provide the image processor to the Trainer class, so that it gets saved along the model weights to the Trainer's The pipeline expects a path to a folder containing both the modeling files (model weights, a config.json) and the image preprocessor file (preprocessor_config.json). |
When passing the tokenizer=image_processor parameter into the trainer, I get an attribute error:
|
Ok thanks for reporting. Noticed that currently, when you pass from transformers import default_data_collator
trainer = Trainer(...
tokenizer=image_processor,
data_collator=default_data_collator
) However, this should be fixed:
|
System Info
transformers
version: 4.37.2Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Follow the Image Classification example in the HuggingFace docs: https://huggingface.co/docs/transformers/tasks/semantic_segmentation
Upon reaching the code segment
You should end up with an error that says
OSError: segformer-b0-scene-parse-150 does not appear to have a file named preprocessor_config.json. Checkout 'https://huggingface.co/segformer-b0-scene-parse-150/None' for available files.
Expected behavior
I'd assume a preprocessor_config.json file should be generated in the training process.
The text was updated successfully, but these errors were encountered: