kanguyen-vn commited on
Commit
8295c96
·
verified ·
1 Parent(s): db95ece

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: transformers
5
+ tags:
6
+ - computer-vision
7
+ - image-segmentation
8
+ - semantic-segmentation
9
+ - co-segmentation
10
+ - part-segmentation
11
+ - multi-image-reasoning
12
+ - vision-language
13
+ pipeline_tag: image-segmentation
14
+ datasets:
15
+ - PLAN-Lab/MixedParts
16
+ ---
17
+
18
+ # CALICO
19
+
20
+ CALICO is a large vision-language model for part-focused semantic co-segmentation. Given a pair of images and a natural-language prompt, CALICO identifies common objects, common parts, or unique parts and predicts segmentation masks for the referenced regions.
21
+
22
+ This repository contains the released CALICO checkpoint. It is intended to be loaded with the [CALICO codebase](https://github.com/PLAN-Lab/CALICO).
23
+
24
+ ## Model Details
25
+
26
+ - **Model name:** CALICO
27
+ - **Dataset:** Mixed Parts
28
+ - **Task:** part-focused semantic co-segmentation and segmentation-grounded vision-language reasoning
29
+ - **Checkpoint format:** merged Hugging Face checkpoint with safetensors shards
30
+ - **Vision-language image encoder:** Q-Former over EVA-CLIP-G visual features
31
+ - **Grounding decoder:** SAM ViT-H mask decoder
32
+ - **Correspondence features:** frozen DINOv2 features used by CALICO correspondence modules
33
+
34
+ CALICO includes two correspondence modules in the language-model forward pass:
35
+
36
+ - **Correspondence Extraction Module (CEM):** fuses Q-Former visual patch embeddings with frozen DINOv2 correspondence features.
37
+ - **Correspondence Adaptation Module (CAM):** adapts Q-Former queries from the current language state and reintegrates correspondence-aware visual features into image-token hidden states.
38
+
39
+ ## Intended Use
40
+
41
+ Use CALICO for research on multi-image part-focused segmentation, semantic co-segmentation, and vision-language grounding. The model is released for evaluation and fine-tuning with the CALICO repository.
42
+
43
+ ## Quick Start
44
+
45
+ Install the CALICO environment and prepare Mixed Parts following the repository docs:
46
+
47
+ - [Installation](https://github.com/PLAN-Lab/CALICO/blob/main/docs/INSTALL.md)
48
+ - [Data preparation](https://github.com/PLAN-Lab/CALICO/blob/main/docs/DATA.md)
49
+ - [Mixed Parts dataset](https://huggingface.co/datasets/PLAN-Lab/MixedParts)
50
+
51
+ Run evaluation from the CALICO repository root:
52
+
53
+ ```bash
54
+ python evaluate.py \
55
+ --merged_ckpt_path PLAN-Lab/CALICO \
56
+ --dataset_dir ./data \
57
+ --output_save_path ./evaluate_results/calico_mixed_parts \
58
+ --val_dataset "MixedPartsObjectVal|MixedPartsPartVal" \
59
+ --multi_image_filepath_prefix ./data/mixed_parts_data/mixed_parts_test.json \
60
+ --mode test \
61
+ --compute_metrics
62
+ ```
63
+
64
+ `--dataset_dir ./data` should contain:
65
+
66
+ ```text
67
+ data/
68
+ ├── coco_2017/
69
+ └── mixed_parts_data/
70
+ ```
71
+
72
+ ## Training and Fine-Tuning
73
+
74
+ Fine-tuning is supported through `train.py` in the CALICO repository. See [docs/TRAINING.md](https://github.com/PLAN-Lab/CALICO/blob/main/docs/TRAINING.md) for recommended arguments and data layout.
75
+
76
+ ## Citation
77
+
78
+ If you use CALICO or Mixed Parts, please cite:
79
+
80
+ ```bibtex
81
+ @article{nguyen2025calico,
82
+ title={CALICO: Part-Focused Semantic Co-Segmentation with Large Vision-Language Models},
83
+ author={Nguyen, Kiet A. and Juvekar, Adheesh and Yu, Tianjiao and Wahed, Muntasir and Lourentzou, Ismini},
84
+ journal={In Proceedings for the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
85
+ year={2025}
86
+ }
87
+ ```
added_tokens.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</p>": 32006,
3
+ "<bbox>": 32002,
4
+ "<im_end>": 32001,
5
+ "<im_start>": 32000,
6
+ "<p>": 32005,
7
+ "<point>": 32003,
8
+ "[SEG]": 32004
9
+ }
config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "PLAN-Lab/CALICO",
3
+ "architectures": [
4
+ "CALICOForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "auto_initialize_adaptors": true,
9
+ "auto_initialize_qformer": true,
10
+ "bbox_token_idx": 32002,
11
+ "bos_token_id": 1,
12
+ "dino_hidden_size": 768,
13
+ "dino_model_name": "dinov2_vitb14_reg",
14
+ "eos_token_id": 2,
15
+ "global_image_size": 224,
16
+ "grounding_encoder": "sam_vit_h",
17
+ "grounding_image_size": 1024,
18
+ "hidden_act": "silu",
19
+ "hidden_size": 4096,
20
+ "image_aspect": "square",
21
+ "image_aspect_ratio": "square",
22
+ "initializer_range": 0.02,
23
+ "intermediate_size": 11008,
24
+ "layer_type": "linear",
25
+ "max_position_embeddings": 4096,
26
+ "mlp_bias": false,
27
+ "mm_projector_type": "linear",
28
+ "model_type": "calico",
29
+ "num_attention_heads": 32,
30
+ "num_attn_heads": 8,
31
+ "num_hidden_layers": 32,
32
+ "num_key_value_heads": 32,
33
+ "num_level_reg_features": 4,
34
+ "num_query_tokens": 32,
35
+ "out_dim": 256,
36
+ "pad_token_id": 0,
37
+ "pretraining_tp": 1,
38
+ "q_former_model": "",
39
+ "qformer_hidden_size": 768,
40
+ "qformer_vision_encoder": "eva_clip_g",
41
+ "qformer_vision_width": 1408,
42
+ "rms_norm_eps": 1e-05,
43
+ "rope_scaling": null,
44
+ "rope_theta": 10000.0,
45
+ "seg_image_tokens": [
46
+ [
47
+ 32004,
48
+ 313,
49
+ 2382,
50
+ 29896
51
+ ],
52
+ [
53
+ 32004,
54
+ 313,
55
+ 2382,
56
+ 29906
57
+ ]
58
+ ],
59
+ "seg_token_idx": 32004,
60
+ "tie_word_embeddings": false,
61
+ "torch_dtype": "bfloat16",
62
+ "train_mask_decoder": true,
63
+ "transformers_version": "4.42.3",
64
+ "update_layers": [
65
+ 11,
66
+ 22
67
+ ],
68
+ "use_cache": false,
69
+ "use_mm_proj": true,
70
+ "vocab_size": 32007,
71
+ "with_region": true
72
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "max_length": 4096,
6
+ "pad_token_id": 0,
7
+ "transformers_version": "4.42.3",
8
+ "use_cache": false
9
+ }
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a417a84fac860be7e6c606a3b1b66462dc481199df410655162415343aee6585
3
+ size 4939091944
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:272d9186b3b45696e68c1ffa0dce3ab7aba618de3fa61126fd04e5e9cdea462c
3
+ size 4947390880
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f71b674f01ebb20a2f9d44c3ec83803a6e95a285c97d3e70d498f710829008a
3
+ size 4991144144
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:399403a0245d505e31b04076d65155999909907766e558d856e3d26e2a456b8b
3
+ size 2147217712
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<unk>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "32000": {
31
+ "content": "<im_start>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "32001": {
39
+ "content": "<im_end>",
40
+ "lstrip": false,
41
+ "normalized": true,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "32002": {
47
+ "content": "<bbox>",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "32003": {
55
+ "content": "<point>",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "32004": {
63
+ "content": "[SEG]",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "32005": {
71
+ "content": "<p>",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "32006": {
79
+ "content": "</p>",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ }
86
+ },
87
+ "bos_token": "<s>",
88
+ "clean_up_tokenization_spaces": false,
89
+ "eos_token": "</s>",
90
+ "legacy": false,
91
+ "model_max_length": 2300,
92
+ "pad_token": "<unk>",
93
+ "padding_side": "right",
94
+ "sp_model_kwargs": {},
95
+ "spaces_between_special_tokens": false,
96
+ "tokenizer_class": "LlamaTokenizer",
97
+ "unk_token": "<unk>",
98
+ "use_default_system_prompt": false
99
+ }