Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
pipeline_tag: zero-shot-image-classification
|
| 6 |
-
tags:
|
| 7 |
-
- point-cloud
|
| 8 |
-
- contrastive-learning
|
| 9 |
-
- multi-modal
|
| 10 |
-
- clip
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# CTP: Contrastive Tensor Pre-training
|
| 14 |
[](https://arxiv.org/abs/2603.07874)
|
|
@@ -36,36 +38,23 @@ The checkpoints are organized by experiment configuration. We use the following
|
|
| 36 |
| `192_cos_matrix_pc` | Pairwise (Frozen) | 3× Pairwise Similarity Matrices |
|
| 37 |
| `192_cos_matrix_IP_pc`| Image-Point Only | 1× Similarity Matrix (I-L) |
|
| 38 |
|
| 39 |
-
##
|
| 40 |
|
| 41 |
-
You can
|
| 42 |
|
| 43 |
-
### Prerequisites
|
| 44 |
-
```bash
|
| 45 |
-
pip install torch huggingface_hub
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
-
### Loading a Specific Checkpoint
|
| 49 |
```python
|
| 50 |
-
import torch
|
| 51 |
from huggingface_hub import hf_hub_download
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
FILENAME = "ckpt_epoch9.pt"
|
| 57 |
|
| 58 |
checkpoint_path = hf_hub_download(
|
| 59 |
-
repo_id=
|
| 60 |
-
subfolder=
|
| 61 |
-
filename=
|
|
|
|
| 62 |
)
|
| 63 |
-
|
| 64 |
-
# Load CTP model
|
| 65 |
-
# model = ctp(text_encoder, image_encoder, lidar_encoder, loss_fn)
|
| 66 |
-
checkpoint = torch.load(checkpoint_path, map_location="cpu")
|
| 67 |
-
model.load_state_dict(checkpoint)
|
| 68 |
-
model.eval()
|
| 69 |
```
|
| 70 |
Source code: https://github.com/TAMU-CVRL/CTP
|
| 71 |
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: zero-shot-image-classification
|
| 6 |
+
tags:
|
| 7 |
+
- point-cloud
|
| 8 |
+
- contrastive-learning
|
| 9 |
+
- multi-modal
|
| 10 |
+
- clip
|
| 11 |
+
datasets:
|
| 12 |
+
- Ximeng0831/CTP-Dataset
|
| 13 |
+
---
|
| 14 |
|
| 15 |
# CTP: Contrastive Tensor Pre-training
|
| 16 |
[](https://arxiv.org/abs/2603.07874)
|
|
|
|
| 38 |
| `192_cos_matrix_pc` | Pairwise (Frozen) | 3× Pairwise Similarity Matrices |
|
| 39 |
| `192_cos_matrix_IP_pc`| Image-Point Only | 1× Similarity Matrix (I-L) |
|
| 40 |
|
| 41 |
+
## Download the Checkpoints
|
| 42 |
|
| 43 |
+
You can download pretrained checkpoints using the `huggingface_hub` library:
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
```python
|
|
|
|
| 46 |
from huggingface_hub import hf_hub_download
|
| 47 |
|
| 48 |
+
# Available: ["192_l2_tensor_all", "192_l2_tensor_nm_all", "192_cos_tensor_all", "192_cos_matrix_all", "192_l2_tensor_pc", "192_cos_matrix_pc", "192_cos_matrix_IP_pc"]
|
| 49 |
+
|
| 50 |
+
config_name = "192_l2_tensor_all"
|
|
|
|
| 51 |
|
| 52 |
checkpoint_path = hf_hub_download(
|
| 53 |
+
repo_id="Ximeng0831/CTP",
|
| 54 |
+
subfolder=config_name,
|
| 55 |
+
filename="ckpt_epoch9.pt",
|
| 56 |
+
# local_dir="checkpoints"
|
| 57 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
```
|
| 59 |
Source code: https://github.com/TAMU-CVRL/CTP
|
| 60 |
|