You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ You can install the package as follows:
24
24
cd <project_root>
25
25
pip install .
26
26
```
27
-
Next, you can import the package as `import ezfaces` or its main class as `from ezfaces.face_classifier import faceClassifier`.
27
+
Next, you can import the package as `import ezfaces` or its main class as `from ezfaces.face_classifier import FaceClassifier`.
28
28
29
29
30
30
The project has been tested in CI (see [workflows](https://github.com/0xLeo/EZfaces/tree/master/.github/workflows)) in Python 3.7 and 3.8 with the following dependencies installed, but newer versions will also work:
@@ -41,9 +41,9 @@ scikit-learn 0.22
41
41
# Usage examples
42
42
**1. Load new subject from folder**
43
43
```
44
-
from ezfaces.face_classifier import faceClassifier
44
+
from ezfaces.face_classifier import FaceClassifier
45
45
46
-
fc = faceClassifier()
46
+
fc = FaceClassifier()
47
47
lbl_new = fc.add_img_data('tests/images_yale')
48
48
print(fc)
49
49
print("New subject\'s label is %d" % lbl_new)
@@ -57,11 +57,11 @@ New subject's label is 40
57
57
58
58
**2. Load new subject and predict from webcam**
59
59
```
60
-
from from ezfaces.face_classifier import faceClassifier
60
+
from from ezfaces.face_classifier import FaceClassifier
61
61
import cv2
62
62
63
63
64
-
fc = faceClassifier()
64
+
fc = FaceClassifier()
65
65
lbl_new = fc.add_img_data(from_webcam=True)
66
66
fc.train()
67
67
# take a snapshot from webcam
@@ -78,18 +78,18 @@ cv2.destroyAllWindows()
78
78
79
79
**3. Export and import dataset**
80
80
```
81
-
from ezfaces.face_classifier import faceClassifier
81
+
from ezfaces.face_classifier import FaceClassifier
82
82
83
83
84
-
fc = faceClassifier()
84
+
fc = FaceClassifier()
85
85
data_file, lbl_file = fc.export('/tmp')
86
86
87
87
# add some data
88
88
lbl_new = fc.add_img_data('tests/images_yale')
89
89
print(fc)
90
90
91
91
# now let's say we made a mistake and don't like the new data
92
-
fc = faceClassifier(data_pkl = data_file, target_pkl = lbl_file)
92
+
fc = FaceClassifier(data_pkl = data_file, target_pkl = lbl_file)
0 commit comments