-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwizart-example.py
92 lines (77 loc) · 2.19 KB
/
wizart-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import cv2
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent
from wizart.vision import ComputerVisionClient as vc
client = vc(
token="Your Token"
)
# -------- SEMANTIC MASK ----------
# mask = client.segmentation(
# resource=str(BASE_DIR.joinpath('test1.jpg'))
# )
# cv2.imshow('Segmentation Example', mask)
# cv2.waitKey()
# -------- SINGLE MASK ----------
mask = client.segmentation(
resource=str(BASE_DIR.joinpath('test1.jpg')),
feature=vc.feature.CEILING
)
cv2.imshow('Segmentation Example', mask)
cv2.waitKey()
# -------- VECTORIZED MASK ----------
# vectorized = client.segmentation(
# resource=str(BASE_DIR.joinpath('test1.jpg')),
# feature=vc.feature.CEILING,
# vectorized=True
# )
# print(vectorized)
# -------- DETECTION ALL -----------
# detection_all = client.detection(
# resource=str(BASE_DIR.joinpath('test1.jpg'))
# )
# print(detection_all)
# -------- DETECTION BY FEATURE -----------
# feature = client.detection(
# resource=str(BASE_DIR.joinpath('test1.jpg')),
# feature=vc.feature.WALL
# )
# print(feature)
# -------- RECONSTRUCTION ALL -----------
# reconstruction_all = client.reconstruction(
# resource=str(BASE_DIR.joinpath('test1.jpg'))
# )
# print(reconstruction_all)
# -------- RECONSTRUCTION BY FEATURE -----------
# feature = client.reconstruction(
# resource=str(BASE_DIR.joinpath('test1.jpg')),
# feature=vc.feature.CEILING
# )
# print(feature)
# -------- ANALYZE ALL -----------
# data = client.analysis(
# resource=str(BASE_DIR.joinpath('test1.jpg'))
# )
# print(data)
# -------- ANALYZE CAMERA -----------
# data = client.analysis(
# resource=str(BASE_DIR.joinpath('test1.jpg')),
# feature=vc.analysis_types.CAMERA
# )
# print(data)
# -------- ANALYZE IMAGE INFO -----------
# data = client.analysis(
# resource=str(BASE_DIR.joinpath('test1.jpg')),
# feature=vc.analysis_types.IMAGE_INFO
# )
# print(data)
# -------- INTERIOR ALL -----------
# data = client.interior(
# resource=str(BASE_DIR.joinpath('test1.jpg'))
# )
# print(data)
# -------- INTERIOR FEATURE -----------
# data = client.interior(
# resource=str(BASE_DIR.joinpath('test1.jpg')),
# feature=vc.feature.CEILING
# )
# print(data)