-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDesign.kv
125 lines (105 loc) · 2.5 KB
/
Design.kv
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
MDBottomNavigation:
panel_color : 138 / 255, 43 / 255, 226 / 255, 1
text_color_normal : 0, 128 / 255, 128 / 255, 1
text_color_active : 0, 1, 1, 1
MDBottomNavigationItem:
name : "camera"
text : "CAM"
icon : "brain"
MDGridLayout:
cols : 2
size_hint_x : 1
MDBoxLayout:
orientation : "vertical"
size_hint_x : 0.5
Camera:
id : cam
play : True
index : 1
#resolution : (640, 640)
size_hint_y : 0.75
pos_hint : {"center_x" : 0.5}
MDBoxLayout:
cols : 2
size_hint_y : 0.25
spacing : 20
padding : 20
orientation : "horizontal"
MDRoundFlatButton:
text : "Detect"
size_hint : 0.3, 0.8
on_press : app.predict_faces()
MDRoundFlatButton:
text : "Verify"
size_hint : 0.3, 0.8
on_press : app.verify_faces()
MDCard:
elevation : 7
padding : 25
spacing : 25
orientation : "vertical"
size_hint_x : 0.45
Image:
id : img_detected
source : "images/security_cam.png"
MDBottomNavigationItem:
name : "images"
text : "FACES"
icon : "image-multiple"
MDScrollView:
do_scroll_y : True
MDGridLayout:
id : faces
cols : 2
row_default_height : (self.width - self.cols * self.spacing[0]) / self.cols
row_force_default : True
adaptive_height : True
padding : dp(10), dp(10)
spacing : dp(10)
MDBottomNavigationItem:
name : "status"
text : "STATUS"
icon : "lock"
MDGridLayout:
rows : 2
size_hint : 1, 1
MDLabel:
id : status_label
text : "locked"
halign : "center"
theme_text_color : "Custom"
text_color : 1, 0, 0, 1
font_style : "H3"
pos_hint : {"center_y" : 0.6}
size_hint_y : 0.8
MDLabel:
id : identified_person
text : "Identified : None"
halign : "center"
theme_text_color : "Custom"
text_color : 211 / 255, 211 / 255, 211 / 255, 1
font_style : "H4"
pos_hint : {"center_y" : 0.2}
size_hint_y : 0.2
MDBottomNavigationItem:
name : "command"
text : "COMMAND"
icon : "alpha-o-box"
MDGridLayout:
rows : 2
size_hint : 1, 1
MDLabel:
id : object_label
text : "Predicted : None"
halign : "center"
theme_text_color : "Custom"
text_color : 0, 0, 1, 1
font_style : "H3"
pos_hint : {"center_x" : 0.5}
size_hint_y : 0.7
MDRoundFlatButton:
text : "Command"
size_hint_y : 0.15
size_hint_x : 0.5
pos_hint : {"center_x" : 0.5}
on_press : app.predict_object()