29 Commits

Author SHA1 Message Date
Kagami Hiiragi
fab496201e Put shapes to go struct 2019-08-31 21:24:41 +03:00
Kagami Hiiragi
1de2cba417 Restor default padding and fix readme 2019-08-31 19:08:47 +03:00
danile71
12608770fa SquaredEuclideanDistance to Go 2019-08-29 22:29:12 +03:00
danile71
1dec3dbedb Format code 2019-08-29 21:47:13 +03:00
korekovtsevda
3b93344158 Add CNN support
* RecognizeSingle(0, buf)
* 0 - HOG
* 1 - CNN
2019-08-29 11:17:03 +03:00
danile71
475c1e972a classifier.Config(150, 0.2, 10)
* size (will be 150), padding, jittering
2019-08-28 23:58:43 +03:00
danile71
dc5e69ff42 Add jittering
* jittering > 0 - make 'jittering' copies of img
* jittering <= 0 - jittering is off
2019-08-28 22:47:42 +03:00
korekovtsevda
30cce4af58 Add shapes to face object 2019-08-28 15:14:01 +03:00
korekovtsevda
df3604d793 Add Squared_euclidean_distance function 2019-08-28 15:04:16 +03:00
Kagami Hiiragi
ef56f89511 Simplify classify
We don't need additional level of indirection and can store category in
distances vector right away.
2019-08-18 11:43:46 +03:00
Kagami Hiiragi
4d258ca248 Add ClassifyThreshold
Fixes #9
2019-01-14 00:11:13 +03:00
Kagami Hiiragi
eed406bbb4 Require SetSamples arguments to be rvalues
Per CppCoreGuidelines.
2018-08-17 03:09:26 +03:00
Kagami Hiiragi
b97cf0ae22 Use lock_guard for recognize locks
detector/net may throw.
2018-08-16 02:51:27 +03:00
Kagami Hiiragi
6b3e430c90 Use same descriptor type everywhere
It's not possible to use fixed size with loss_metric so use arbitrary
sized matrix. Explicit size should be more effecient but not much.
2018-08-16 00:03:07 +03:00
Kagami Hiiragi
e7ffd11260 Use std::tie to unpack recognize result 2018-08-15 19:18:36 +03:00
Kagami Hiiragi
a898de9713 Thread-safety
dlib's frontal_face_detector and loss_metric are not thread-safe.

It's possible to use thread_local detector but that seems to be slower.
So use mutexes instead.

Closes #1
2018-08-13 23:52:32 +03:00
Kagami Hiiragi
13a6da1e15 Sort returned faces by rectangles
Now example works correctly.
2018-08-10 13:46:47 +03:00
Kagami Hiiragi
dbdc369093 Fix travis build 2018-07-28 15:45:52 +03:00
Kagami Hiiragi
8cf97d6971 Simplify SetSamples
id is always sequential.
2018-05-08 12:03:02 +03:00
Kagami Hiiragi
08327fa6fb Improve classification 2018-04-14 19:16:48 +03:00
Kagami Hiiragi
894891e36f Optimizations 2018-04-07 14:55:49 +03:00
Kagami Hiiragi
f94d7de55e Add simple classifier 2018-04-06 17:18:06 +03:00
Kagami Hiiragi
44e80c999f Load jpeg from memory 2018-04-05 13:05:30 +03:00
Kagami Hiiragi
c627f1a583 Use native Go image.Rectangle type 2018-04-04 21:03:15 +03:00
Kagami Hiiragi
0c3ac8eef9 Fix stupid max_faces bug 2018-04-04 19:07:24 +03:00
Kagami Hiiragi
80a95b839e More consistent rectangle data handling 2018-04-04 18:23:08 +03:00
Kagami Hiiragi
3e368a23b7 Return face rectangle coords 2018-04-04 18:02:08 +03:00
Kagami Hiiragi
9ee8924f51 API changes 2018-04-03 03:19:21 +03:00
Kagami Hiiragi
28fa236fbd Initial commit 2018-04-02 19:52:09 +03:00