Merge branch 'main' of hf.co:jfang/mars-vit-base-ctx2m
Browse files- README.md +4 -3
- preprocessor_config.json +9 -0
README.md
CHANGED
@@ -18,6 +18,9 @@ Model Card for Mars ViT Base Model
|
|
18 |
|
19 |
## Usage Examples
|
20 |
### Using timm
|
|
|
|
|
|
|
21 |
```python
|
22 |
import timm
|
23 |
import torch
|
@@ -27,7 +30,7 @@ model = timm.create_model(
|
|
27 |
in_chans=1,
|
28 |
num_classes=0,
|
29 |
global_pool='',
|
30 |
-
checkpoint_path="
|
31 |
)
|
32 |
|
33 |
model.eval()
|
@@ -54,8 +57,6 @@ inputs = image_processor(image, return_tensors="pt")
|
|
54 |
outputs = model(**inputs)
|
55 |
```
|
56 |
|
57 |
-
### Model Performance
|
58 |
-
The model is optimized for feature extraction from CTX images. Detailed performance metrics on specific tasks or datasets are not provided in this card.
|
59 |
|
60 |
### Limitations
|
61 |
The model is trained specifically on CTX images and may not generalize well to other types of images without further fine-tuning.
|
|
|
18 |
|
19 |
## Usage Examples
|
20 |
### Using timm
|
21 |
+
|
22 |
+
First download checkpoint-1199.pth (backbone only)
|
23 |
+
|
24 |
```python
|
25 |
import timm
|
26 |
import torch
|
|
|
30 |
in_chans=1,
|
31 |
num_classes=0,
|
32 |
global_pool='',
|
33 |
+
checkpoint_path="./checkpoint-1199.pth" # must use local path
|
34 |
)
|
35 |
|
36 |
model.eval()
|
|
|
57 |
outputs = model(**inputs)
|
58 |
```
|
59 |
|
|
|
|
|
60 |
|
61 |
### Limitations
|
62 |
The model is trained specifically on CTX images and may not generalize well to other types of images without further fine-tuning.
|
preprocessor_config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_resize": true,
|
4 |
+
"feature_extractor_type": "ViTFeatureExtractor",
|
5 |
+
"image_mean": [0.5],
|
6 |
+
"image_std": [0.5],
|
7 |
+
"resample": 2,
|
8 |
+
"size": 224
|
9 |
+
}
|