Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Commit c4965ae

Browse files
gitbeamshuxuan
authored andcommitted
Text Edits (#21)
* Update panel_detection.py Edited the text of the label. * Update panel_find_similar.py Edited the text of the label. * Update panel_group.py Edited the text of the label. * Update panel_identification.py Edited the text of the label. * Update panel_subscription.py Edited the text of the label and those of the two key-related events. * Update panel_verification.py Edited the text of the two labels.
1 parent 655554f commit c4965ae

6 files changed

+42
-43
lines changed

sample/view/panel_detection.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ def __init__(self, parent):
2626
self.hvsizer.SetMinSize((util.INNER_PANEL_WIDTH, -1))
2727

2828
label = (
29-
"Locate faces in an image. You can pick an image by 'Choose Image"
30-
"'. Detected faces will be shown on the image by rectangles "
31-
"surrounding the face, and related attributes will be shown in a "
32-
"list."
29+
"To detect faces in an image, click the 'Choose Image' "
30+
"button. You will see a rectangle surrounding every face "
31+
"that the Face API detects. You will also see a list of "
32+
"attributes related to the faces."
3333
)
3434
self.static_text = wx.StaticText(self, label=label)
3535
self.static_text.Wrap(util.INNER_PANEL_WIDTH)

sample/view/panel_find_similar.py

+6-13
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,12 @@ def __init__(self, parent):
3939
self.hvsizer.SetMinSize((util.INNER_PANEL_WIDTH, -1))
4040

4141
label = (
42-
"Find similar faces for the query face from all the candidates. "
43-
"You can pick an image folder, and all detected faces inside the "
44-
"folder will be treated as candidate. Use 'Open Query Face' to "
45-
"pick the query faces. The result will be list as 'query face's "
46-
"thumbnail', 'similar faces' thumbnails with similarity ranked'. "
47-
"Both of 'MatchPerson' mode and 'MatchFace' mode results will be "
48-
"listed. 'MatchPerson' mode return the top candidate faces among "
49-
"those recognized as the same person with the query face, so if "
50-
"no candidate faces are recognized as the same person with the "
51-
"query face, no one will be returned, while 'MatchFace' mode "
52-
"returns the top candidate faces with highest similarity "
53-
"confidence without checking if the returned face belong to the "
54-
"same person with the query face. "
42+
'Find faces that are similar to a given face (the query '
43+
'face).\nClick "Load Candidate Faces" to select a folder '
44+
'containing images of the faces you want to compare to the '
45+
'query face.\nNext, click "Open Query Face" to select the '
46+
'query face image.\nScroll down to see the results '
47+
'displayed under the query face.\n'
5548
)
5649
self.static_text = wx.StaticText(self.panel, label=label)
5750
self.static_text.Wrap(util.INNER_PANEL_WIDTH)

sample/view/panel_group.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def __init__(self, parent):
3434
self.hvsizer.SetMinSize((util.INNER_PANEL_WIDTH, -1))
3535

3636
label = (
37-
"Put similar faces to same group according to appearance "
38-
"similarity. You can pick an image folder for grouping by "
39-
"'Group', doing this will group all detected faces and shown "
40-
"under Grouping Result."
37+
'Click the button below to select a folder containing face '
38+
'images.\nThe images will be grouped based on similarity.\n'
39+
'You will see the different groups under the '
40+
'"Grouping Results" label.'
4141
)
4242
self.static_text = wx.StaticText(self.panel, label=label)
4343
self.static_text.Wrap(util.INNER_PANEL_WIDTH)

sample/view/panel_identification.py

+11-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ def __init__(self, parent):
3838
self.hvsizer.SetMinSize((util.INNER_PANEL_WIDTH, -1))
3939

4040
label = (
41-
"Tell whom an input face belongs to given a tagged person database"
42-
". Here we only handle tagged person database in following "
43-
"format: 1). One root folder. 2). Sub-folders are named as "
44-
"person's name. 3). Each person's images are put into their own "
45-
"sub-folder. Pick the root folder, then choose an image to "
46-
"identify, all faces will be shown on the image with the "
47-
"identified person's name."
41+
'1) Place face images of one person in a folder and give '
42+
'the folder the same name as that person.\n'
43+
'2) Repeat the step above one or more times, creating '
44+
'different folders for different people.\n'
45+
'3) Place all of the person folders in one root folder.\n'
46+
'4) Click "Load PersonGroup" and select the root folder '
47+
'you created above.\n'
48+
'5) Click "Choose Image" to select a different image '
49+
'representing one of the people for whom you created '
50+
'folders above. The face in the image will be framed and '
51+
'tagged with the name of the person.'
4852
)
4953
self.static_text = wx.StaticText(self.panel, label=label)
5054
self.static_text.Wrap(util.INNER_PANEL_WIDTH)

sample/view/panel_subscription.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def __init__(self, parent):
2020
self.sizer = wx.BoxSizer(wx.VERTICAL)
2121

2222
label = (
23-
'To use the service, you need to ensure that you have right '
24-
'subscription key.\nPlease note that each service (Face, Emotion, '
25-
'Speech, etc) has its own subscription key.\nIf you do not have '
26-
'key yet, please use the link to get a key first, then paste the '
27-
'key into the textbox below.'
23+
'To use the service, make sure you have a valid '
24+
'subscription key.\nNote that each service (Face, Emotion, '
25+
'Speech, etc.) has its own subscription keys.\nYou can use '
26+
'the link below to get a key.\nWhen ready, paste your key '
27+
'into the textbox below.'
2828
)
2929
style = wx.ALIGN_LEFT | wx.ST_ELLIPSIZE_END
3030
self.static_text = wx.StaticText(self, label=label, style=style)
@@ -68,7 +68,7 @@ def OnSaveKey(self, evt):
6868
"""Save the key."""
6969
util.SubscriptionKey.set(self.text.GetValue().encode('utf-8'))
7070
text = (
71-
'Subscription key is saved in your disk.\n'
71+
'Subscription key successfully saved on your disk.\n'
7272
'You do not need to paste the key next time.'
7373
)
7474
title = 'Subscription Key'
@@ -79,7 +79,7 @@ def OnDeleteKey(self, evt):
7979
"""Delete the key."""
8080
self.text.Clear()
8181
util.SubscriptionKey.delete()
82-
text = 'Subscription key is deleted from your disk.'
82+
text = 'Subscription key successfully deleted from your disk.'
8383
title = 'Subscription Key'
8484
style = wx.OK | wx.ICON_INFORMATION
8585
wx.MessageBox(text, title, style)

sample/view/panel_verification.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ def __init__(self, parent):
4343
self.hvsizer.SetMinSize((util.INNER_PANEL_WIDTH, -1))
4444

4545
label = (
46-
"Demo 1: Face to Face Verification determines whether two faces"
47-
"belong to the same person. You can pick single face image, the"
48-
"detected face will be shown on the image. Then click 'Verify' to"
49-
"get the verification result."
46+
"Demo 1: Face-to-face verification determines whether "
47+
"two faces belong to the same person. Choose two images "
48+
"with a single face each. Then click 'Verify' to get "
49+
"the verification result."
5050
)
5151
self.static_text = wx.StaticText(self.panel, label=label)
5252
self.static_text.Wrap(util.INNER_PANEL_WIDTH)
@@ -108,10 +108,12 @@ def __init__(self, parent):
108108
self.hvsizer.Add(self.vhsizer1)
109109

110110
label = (
111-
"Demo 2: Face to person verification determines whether one face "
112-
"belongs to one person. You can pick an image folder containing "
113-
"one person's single face, and another single face image. Then "
114-
"click 'Verify' to get the verification result."
111+
"Demo 2: Face-to-person verification determines whether a "
112+
"face belongs to a given person. Click 'Load Person' to "
113+
"pick a folder containing the images of one person's face. "
114+
"Next, click 'Choose Image' to pick a face image of the "
115+
"same person (or of a different person). Finally, click "
116+
"'Verify' to see the verification result."
115117
)
116118
self.static_text = wx.StaticText(self.panel, label=label)
117119
self.static_text.Wrap(util.INNER_PANEL_WIDTH)

0 commit comments

Comments
 (0)