Skip to content

Commit 9729426

Browse files
author
Wanbin Song
committed
Initial commit
0 parents  commit 9729426

File tree

81 files changed

+458
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+458
-0
lines changed

AnchorMask.mat

957 Bytes
Binary file not shown.

COVID19_LabelMaskAutomation.mlx

977 KB
Binary file not shown.

COVID19_LiveWebcamMask.mlx

5.03 KB
Binary file not shown.

COVID19_Mask_SSD.mat

42.5 MB
Binary file not shown.

COVID19_Mask_yolo.mat

97.6 MB
Binary file not shown.

COVID19_TestStillImage.mlx

758 KB
Binary file not shown.

COVID19_TrainMaskDetection.mlx

10.7 KB
Binary file not shown.

COVID19_VideoRunning.mlx

4.19 KB
Binary file not shown.

FaceMaskDetection.m

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
classdef FaceMaskDetection < vision.labeler.AutomationAlgorithm
2+
3+
properties(Constant)
4+
5+
Name = 'Face Mask Detection';
6+
Description = 'This is a automatic Mask labeling algorithm.';
7+
8+
UserDirections = {...
9+
['Automation algorithms are a way to automate manual labeling ' ...
10+
'tasks. This AutomationAlgorithm is a template for creating ' ...
11+
'user-defined automation algorithms. Below are typical steps' ...
12+
'involved in running an automation algorithm.'], ...
13+
['Run: Press RUN to run the automation algorithm. '], ...
14+
['Review and Modify: Review automated labels over the interval ', ...
15+
'using playback controls. Modify/delete/add ROIs that were not ' ...
16+
'satisfactorily automated at this stage. If the results are ' ...
17+
'satisfactory, click Accept to accept the automated labels.'], ...
18+
['Change Settings and Rerun: If automated results are not ' ...
19+
'satisfactory, you can try to re-run the algorithm with ' ...
20+
'different settings. In order to do so, click Undo Run to undo ' ...
21+
'current automation run, click Settings and make changes to ' ...
22+
'Settings, and press Run again.'], ...
23+
['Accept/Cancel: If results of automation are satisfactory, ' ...
24+
'click Accept to accept all automated labels and return to ' ...
25+
'manual labeling. If results of automation are not ' ...
26+
'satisfactory, click Cancel to return to manual labeling ' ...
27+
'without saving automated labels.']};
28+
end
29+
30+
properties
31+
32+
AllCategories = {'background'};
33+
FireName
34+
count
35+
36+
37+
end
38+
39+
methods
40+
function isValid = checkLabelDefinition(algObj, labelDef)
41+
42+
disp(['Executing checkLabelDefinition on label definition "' labelDef.Name '"'])
43+
44+
if (strcmpi(labelDef.Name, 'Mask') && labelDef.Type == labelType.Rectangle)
45+
isValid = true;
46+
algObj.FireName = labelDef.Name;
47+
algObj.AllCategories{end+1} = labelDef.Name;
48+
end
49+
50+
51+
end
52+
53+
function isReady = checkSetup(algObj)
54+
55+
isReady = ~isempty(algObj);
56+
57+
58+
59+
end
60+
61+
function settingsDialog(algObj)
62+
63+
disp('Executing settingsDialog')
64+
65+
end
66+
end
67+
68+
methods
69+
70+
function initialize(algObj, I)
71+
72+
disp('Executing initialize on the first image frame')
73+
74+
end
75+
76+
function autoLabels = run(algObj, I)
77+
78+
disp('Executing run on image frame')
79+
80+
[labelCord, label] = MaskLabel(I, algObj);
81+
autoLabels.Name = char(label);
82+
autoLabels.Type = labelType('Rectangle');
83+
autoLabels.Position = labelCord;
84+
algObj.count = algObj.count+1;
85+
86+
end
87+
88+
function terminate(algObj)
89+
90+
disp('Executing terminate')
91+
92+
end
93+
end
94+
end
95+
% Copyright 2020 The MathWorks, Inc.

GitSubmission.prj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<MATLABProject xmlns="http://www.mathworks.com/MATLABProjectFile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"/>

0 commit comments

Comments
 (0)