Ximeng0831 commited on
Commit
e92d472
·
verified ·
1 Parent(s): 2fb1d11

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -33
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
  [![arXiv](https://img.shields.io/badge/arXiv-2603.07874-b31b1b.svg)](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
- ## How to Load the Models
40
 
41
- You can load these checkpoints directly into your PyTorch environment using the `huggingface_hub` library.
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
- REPO_ID = "Ximeng0831/CTP"
54
- # Example: Loading the default proposed model
55
- SUBFOLDER = "pointnet2/192_l2_cube_all"
56
- FILENAME = "ckpt_epoch9.pt"
57
 
58
  checkpoint_path = hf_hub_download(
59
- repo_id=REPO_ID,
60
- subfolder=SUBFOLDER,
61
- filename=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
  [![arXiv](https://img.shields.io/badge/arXiv-2603.07874-b31b1b.svg)](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