Downloads · 30 days
154
18% of all-time downloads
UWGZQ/ConCor-1
ConCor-1 is a image segmentation model from UWGZQ. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Jieyu Zhang<sup1</sup\, Ziqi Gao<sup1,2</sup\, Luke Zettlemoyer<sup1,3</sup, Ranjay Krishna<sup1</sup
Downloads · 30 days
154
18% of all-time downloads
All-time downloads
851
Public
Parameters
867M
1.8 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors1.8 GB · 99%
How the weights are stored.
BF16853M · 98%
From the Hugging Face model README
Jieyu Zhang<sup>1</sup>*, Ziqi Gao<sup>1,2</sup>*, Luke Zettlemoyer<sup>1,3</sup>, Ranjay Krishna<sup>1</sup>
<sup>1</sup>University of Washington · <sup>2</sup>Allen Institute for AI · <sup>3</sup>FAIR at Meta
*Equal contribution
Quick links
📄 Paper · 🌐 Project page · 💻 GitHub · 🤗 Data · 🎨 Demo
ConCor-1 is a vision-language grounding model designed to explicitly predict bidirectional concept correspondences between language and visual content. Built on a pretrained Qwen3.5-0.8B vision-language backbone, it introduces a set of learnable bridge tokens, each representing a candidate text–image correspondence. By jointly attending to visual and textual tokens, these bridge tokens aggregate multimodal context to represent potential alignments between image regions and text spans. For each bridge token, ConCor-1 simultaneously predicts a text mask identifying the grounded text segment, an image mask localizing the corresponding visual instance, and a presence score indicating whether the proposed pairing is a valid correspondence.

The released checkpoint is supported with the following core inference stack:
| Dependency | Supported version |
|---|---|
| Python | >=3.11 |
| PyTorch | 2.8.0 |
| torchvision | 0.23.0 |
| Transformers | 5.3.0 |
Install a PyTorch/torchvision build compatible with your CUDA environment first. Then install the remaining inference dependencies:
pip install "transformers==5.3.0" "safetensors>=0.4.0" \
"huggingface_hub>=0.30.0" "numpy>=1.24" "pillow>=10.0" \
"flash-linear-attention>=0.4.1"
The example below uses PyTorch SDPA for the backbone's full-attention layers. To use FlashAttention-2, install flash-attn>=2.8.0 and set attn_implementation="flash_attention_2". causal-conv1d>=1.4.0 is an optional acceleration dependency for the linear-attention layers.
import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor
model_id = "UWGZQ/ConCor-1" # or a local path to this repository
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.bfloat16,
attn_implementation="sdpa", # "flash_attention_2" also works
).to("cuda").eval()
image = Image.open("example.png").convert("RGB")
text = (
"This image depicts a close-up of a brown bear in a natural outdoor setting. "
"The background consists of lush green grass. In the foreground, a large brown bear "
"is positioned centrally."
)
# A referring expression works the same way:
# text = "the large brown bear in the foreground"
inputs = processor(images=image, text=text, return_tensors="pt").to("cuda")
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
outputs = model(**inputs)
correspondences = processor.post_process_correspondences(
outputs, text=text, target_sizes=[(image.height, image.width)]
)[0]
for correspondence in correspondences:
print(
f"{correspondence['presence_score']:.3f}",
correspondence["text_phrases"], # phrases of this correspondence's text mask
correspondence["text_spans"], # character spans into `text`
correspondence["mask"].shape, # bool array, (height, width)
)
post_process_correspondences also takes presence_threshold, text_threshold, image_threshold and nms_iou_threshold (defaults 0.1, 0.45, 0.45, 0.5).
example_inference.py wraps this up as a script, including a mask-overlay renderer:
python example_inference.py \
--image example.png \
--text "This image depicts a close-up of a brown bear in a natural outdoor setting. The background consists of lush green grass. In the foreground, a large brown bear is positioned centrally." \
--output overlay.png
image = Image.open("example_2.png").convert("RGB")
text = "baseball player . baseball glove . grass . fence . dog"
inputs = processor(images=image, text=text, return_tensors="pt").to("cuda")
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
outputs = model(**inputs)
for correspondence in processor.post_process_correspondences(
outputs, text=text, target_sizes=[(image.height, image.width)]
)[0]:
print(f"{correspondence['presence_score']:.3f}", correspondence["text_phrases"])
images = [Image.open("example.png").convert("RGB"), Image.open("example_2.png").convert("RGB")]
texts = [
"This image depicts a close-up of a brown bear in a natural outdoor setting. "
"The background consists of lush green grass. In the foreground, a large brown bear "
"is positioned centrally.",
"baseball player . baseball glove . grass . fence . dog",
]
inputs = processor(images=images, text=texts, return_tensors="pt").to("cuda")
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
outputs = model(**inputs)
results = processor.post_process_correspondences(
outputs,
text=texts, # the same list of texts
target_sizes=[(image.height, image.width) for image in images], # one (height, width) per sample
)
for index, correspondences in enumerate(results):
print(f"sample {index}: {len(correspondences)} correspondence(s)")
for correspondence in correspondences:
print(f" {correspondence['presence_score']:.3f}", correspondence["text_phrases"])
| File | Purpose |
|---|---|
configuration_concor1.py | ConCor1Config |
modeling_concor1.py | ConCor1ForConceptCorrespondence and its heads |
processing_concor1.py | ConCor1Processor: sequence construction + correspondence post-processing |
example_inference.py | image + text → correspondences, with mask overlay |
example.png, example_2.png | the images used in the examples above |
model.jpg | the architecture figure above |
model.safetensors | weights: bf16 backbone, fp32 prediction heads |
requirements.txt | the inference dependencies listed above |
An interactive ZeroGPU demo lives at
UWGZQ/ConCor-1-demo.
The weights and the code in this repository are released under the Apache 2.0 license. The backbone is Qwen3.5-0.8B, also Apache 2.0.
@article{zhang2026concor,
title = {Vision-Language Grounding as Bidirectional Concept Correspondence},
author = {Zhang, Jieyu and Gao, Ziqi and Zettlemoyer, Luke and Krishna, Ranjay},
year = {2026}
}