Spaces:
Sleeping
Sleeping
winfred2027
commited on
Commit
•
f215771
1
Parent(s):
3ac8880
Update openshape/__init__.py
Browse files- openshape/__init__.py +7 -5
openshape/__init__.py
CHANGED
@@ -2,7 +2,6 @@ import torch
|
|
2 |
import torch.nn as nn
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
from .ppat_rgb import Projected, PointPatchTransformer
|
5 |
-
from .Minkowski import MinkResNet34
|
6 |
|
7 |
|
8 |
def module(state_dict: dict, name):
|
@@ -33,16 +32,19 @@ def B32(s):
|
|
33 |
return model
|
34 |
|
35 |
|
36 |
-
def
|
37 |
-
model =
|
38 |
-
|
|
|
|
|
|
|
39 |
return model
|
40 |
|
41 |
model_list = {
|
42 |
"openshape-pointbert-vitb32-rgb": B32,
|
43 |
"openshape-pointbert-vitl14-rgb": L14,
|
44 |
"openshape-pointbert-vitg14-rgb": G14,
|
45 |
-
"tripletmix-
|
46 |
}
|
47 |
|
48 |
|
|
|
2 |
import torch.nn as nn
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
from .ppat_rgb import Projected, PointPatchTransformer
|
|
|
5 |
|
6 |
|
7 |
def module(state_dict: dict, name):
|
|
|
32 |
return model
|
33 |
|
34 |
|
35 |
+
def G14_shapenet_mix(s):
|
36 |
+
model = Projected(
|
37 |
+
PointPatchTransformer(512, 12, 8, 512*3, 256, 384, 0.2, 64, 6),
|
38 |
+
nn.Linear(512, 1280)
|
39 |
+
)
|
40 |
+
model.load_state_dict(module(s['state_dict'], 'module'))
|
41 |
return model
|
42 |
|
43 |
model_list = {
|
44 |
"openshape-pointbert-vitb32-rgb": B32,
|
45 |
"openshape-pointbert-vitl14-rgb": L14,
|
46 |
"openshape-pointbert-vitg14-rgb": G14,
|
47 |
+
"tripletmix-pointbert-shapenet": G14_shapenet_mix,
|
48 |
}
|
49 |
|
50 |
|