Closed nickponline closed 8 months ago
@amyeroberts is the issue potentially: preprocessor.image_processor.num_text = model.config.num_queries - model.config.text_encoder_n_ctx
line? Does that not work for instance segmentation?
Additionally here: https://github.com/NielsRogge/Transformers-Tutorials/issues/370
It's still an issue, forward pass for instance segmentation
using Oneformer.
Hi @nickponline, thanks for raising this issue!
In the example provided, the error is occurring because none of the objects in the image correspond to a "thing" as defined in the metadata.
So, when preparing the inputs to the model, all of the masks are filtered out in this check here. The class_ids of the image being passed in don't correspond to the model's mapping.
Although this behaviour is expected - it does highlight a general difficulty of using this model, and is an issue that's been raised in the past. We should be able to load in alternative (local or repo) metadata paths and load those in. I've opened a PR to address this - #28398
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.
transformers
version: 4.35.0.dev0Who can help?
@amyeroberts @NielsRogge @praeclarumjj3
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
inputs.zip
Expected behavior
No exception.