-
Notifications
You must be signed in to change notification settings - Fork 3
/
example.py
64 lines (56 loc) · 1.65 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
"""
Example configurations for the models that worked well
"""
import enum
from typing import Dict
import numpy as np
from reconstruction.model.bunny import FixedBunny
from reconstruction.model.dragon import Dragon
from reconstruction.model.model_mesh import MeshModelLoader
from reconstruction.model.model_pts import PtsModelLoader
class Example(enum.Enum):
BunnyFixed = 0
Bunny = 1
Dragon = 2
Cat = 3
Dog = 4
Camel = 5
example_config: Dict[Example, Dict] = {
Example.BunnyFixed: dict(
dilations_max=5,
dilations_reverse=1
),
Example.Bunny: dict(
dilations_max=30,
dilations_reverse=3
),
Example.Dragon: dict(
dilations_max=20,
dilations_reverse=3
),
Example.Cat: dict(
dilations_max=20,
dilations_reverse=4
),
Example.Dog: dict(
dilations_max=20,
dilations_reverse=4
),
Example.Camel: dict(
dilations_max=20,
dilations_reverse=3
)
}
def example_load(example: Example) -> np.ndarray:
if example == Example.BunnyFixed:
return FixedBunny.bunny()
if example == Example.Bunny:
return PtsModelLoader().load("models/bunny/bunnyData.pts")
if example == Example.Dragon:
return Dragon().load()
if example == Example.Cat:
return MeshModelLoader(samples=30000, noise=0.01).load("models/cat/cat_reference.obj")
if example == Example.Dog:
return MeshModelLoader(samples=30000, noise=0.01).load("models/dog/dog_reference.obj")
if example == Example.Camel:
return MeshModelLoader(samples=60000, noise=0.01).load("models/camel-poses/camel-reference.obj")