dlib 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +6 -0
- data/ext/dlib/dnn_detector.inc +16 -0
- data/lib/dlib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbeddf3b261446f42826e5292e042b73b49e19aa
|
4
|
+
data.tar.gz: 8faff841b4796da8ae2542205e38f1861790952b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 842641f113e980beac12e81c0dcee7d4335d85d1c0cdedc4d81a7f4bc05ffea32d50fba260df035e4545f5efd80dd5ee3923b73cec909d2b78e32cbc0cd75e16
|
7
|
+
data.tar.gz: 9aa7a42e527329be811591f955d632c5f1e533f5b139815603f2d61f7776aea9c6526af52df5c5414952137dfc6a98c5f0f4c3e52bd3ae91433efdcd53147174
|
data/Changes.md
CHANGED
data/ext/dlib/dnn_detector.inc
CHANGED
@@ -27,6 +27,7 @@ static void
|
|
27
27
|
dnn_fd_container_free(void *ptr)
|
28
28
|
{
|
29
29
|
dnn_fd_container *dnn_fdcont = static_cast<dnn_fd_container *>(ptr);
|
30
|
+
|
30
31
|
delete dnn_fdcont;
|
31
32
|
}
|
32
33
|
|
@@ -100,8 +101,10 @@ dlib_rb_dnn_fd_detect_in_batches(VALUE dnn_fd, VALUE images)
|
|
100
101
|
try {
|
101
102
|
detections_in_batches = dnn_fdcont->net(matrixes);
|
102
103
|
} catch (dlib::cuda_error& error) {
|
104
|
+
dnn_fdcont->net.clean();
|
103
105
|
rb_raise(eDlibCudaError, "cuda error during inferencing: %s", error.info.c_str());
|
104
106
|
} catch (std::bad_alloc& error) {
|
107
|
+
dnn_fdcont->net.clean();
|
105
108
|
rb_raise(rb_eNoMemError, "bad allocation memory during inferencing");
|
106
109
|
}
|
107
110
|
|
@@ -112,7 +115,20 @@ dlib_rb_dnn_fd_detect_in_batches(VALUE dnn_fd, VALUE images)
|
|
112
115
|
rb_ary_push(result, dlib_rb_rectangle_new(detection.rect));
|
113
116
|
}
|
114
117
|
rb_ary_push(result_all, result);
|
118
|
+
|
119
|
+
// force free memory on GPU
|
120
|
+
detections.clear();
|
121
|
+
detections.shrink_to_fit();
|
115
122
|
}
|
123
|
+
// force free memory on GPU
|
124
|
+
detections_in_batches.clear();
|
125
|
+
detections_in_batches.shrink_to_fit();
|
126
|
+
|
127
|
+
matrixes.clear();
|
128
|
+
matrixes.shrink_to_fit();
|
129
|
+
|
130
|
+
dnn_fdcont->net.clean();
|
131
|
+
|
116
132
|
return result_all;
|
117
133
|
}
|
118
134
|
|
data/lib/dlib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Murata
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03
|
12
|
+
date: 2017-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|