Instructions to use An-Xiao/QUAKE-CD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use An-Xiao/QUAKE-CD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="An-Xiao/QUAKE-CD") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("An-Xiao/QUAKE-CD") model = AutoModelForMultimodalLM.from_pretrained("An-Xiao/QUAKE-CD", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use An-Xiao/QUAKE-CD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "An-Xiao/QUAKE-CD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "An-Xiao/QUAKE-CD", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/An-Xiao/QUAKE-CD
- SGLang
How to use An-Xiao/QUAKE-CD with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "An-Xiao/QUAKE-CD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "An-Xiao/QUAKE-CD", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "An-Xiao/QUAKE-CD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "An-Xiao/QUAKE-CD", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use An-Xiao/QUAKE-CD with Docker Model Runner:
docker model run hf.co/An-Xiao/QUAKE-CD
QUAKE-CD
QUAKE-CD is a vision-language model for bi-temporal remote-sensing change detection. Given a pair of co-registered images, it generates a textual rationale, a concise change summary, and a binary change mask encoded as a structured QUAKE sequence.
Paper: From Pixels to Hierarchical Sequences: Quadtree Mask Encoding for Vision-Language Binary Change Detection โ accepted to AAAI 2027.
Abstract
Dense change detection in remote sensing requires vision-language models (VLMs) to compare bi-temporal images and generate accurate pixel-level masks. Existing VLMs are largely confined to change captioning outputs, and the few that produce pixel-level masks still rely on external decoders or flat text-as-mask serialization, which are less effective for small and fragmented changes. We introduce QUAKE-CD, a framework that recasts dense change prediction as syntax-verifiable structured generation. QUAKE-CD represents binary change masks as grammar-constrained quadtree token sequences, making the masks compact, syntactically checkable, and deterministically decodable within an autoregressive generation space. We further construct QUAKE-CoT, which pairs these sequences with chain-of-thought traces grounded in visual evidence, and jointly optimizes textual reasoning and spatial dense prediction through a progressive curriculum followed by grammar-gated dual-reward reinforcement learning. On QUAKE-CoT, QUAKE-CD achieves 78.31% accumulated F1, outperforming decoder-based and flat text-as-mask VLMs while producing more faithful bi-temporal reasoning.
Method
The model is initialized from Qwen3-VL-8B-Instruct and fine-tuned with a two-stage curriculum: first learning the QUAKE mask syntax, then integrating bi-temporal reasoning and summaries. Grammar-gated reinforcement learning combines a spatial reward for valid, accurate decoded masks with a learned reward for the reasoning and answer.
The QUAKE representation divides a mask into 32 ร 32 tiles. Uniform tiles use <BG> or <FG>; mixed tiles are serialized as preorder quadtree tokens. The sequence can be deterministically decoded to a binary mask.
QUAKE-CD pipeline: dataset construction, curriculum learning, and dual-reward reinforcement learning.
Intended use
Research on bi-temporal remote-sensing change detection, structured mask generation, and visually grounded change descriptions.
For dataset splits, annotation details, and loading instructions, see the QUAKE-CoT dataset card. For training and evaluation code, see the QUAKE-CD repository.
Citation
@misc{an2026pixelshierarchicalsequencesquadtree,
title = {From Pixels to Hierarchical Sequences: Quadtree Mask Encoding for Vision-Language Binary Change Detection},
author = {Xiao An and Ruikang Zhang and Chen Zhong and Xuli Shen and Jiaxing Sun and Jiang Wu and Wei He},
year = {2026},
eprint = {2609.09876},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2609.09876}
}
License
This model repository is marked Apache-2.0. The code repository uses MIT for project-specific code; the included ms-swift source retains its separate Apache-2.0 license. Check the original dataset and base-model terms before reuse.
- Downloads last month
- -