p1atdev commited on
Commit
e781444
·
verified ·
1 Parent(s): c9bea16

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -5
README.md CHANGED
@@ -1,5 +1,31 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- tags:
4
- - timm
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ tags:
4
+ - timm
5
+ - transformers
6
+ base_model:
7
+ - timm/vit_base_patch16_siglip_384.v2_webli
8
+ ---
9
+
10
+ ```py
11
+ import torchvision.transforms.v2 as T
12
+
13
+ image_size = 448
14
+ preprocessor = T.Compose(
15
+ [
16
+ T.Resize(
17
+ size=None,
18
+ max_size=image_size,
19
+ interpolation=T.InterpolationMode.NEAREST,
20
+ ),
21
+ T.Pad(
22
+ padding=image_size // 2,
23
+ fill=0, # black
24
+ ),
25
+ T.CenterCrop(
26
+ size=(image_size, image_size),
27
+ ),
28
+ T.ToDtype(dtype=torch.float32, scale=True), # 0~255 -> 0~1
29
+ ]
30
+ )
31
+ ```