red-datasets-gdk-pixbuf 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +14 -0
- data/lib/datasets-gdk-pixbuf.rb +2 -0
- data/lib/datasets-gdk-pixbuf/cifar.rb +3 -1
- data/lib/datasets-gdk-pixbuf/fashion-mnist.rb +9 -0
- data/lib/datasets-gdk-pixbuf/mnist-pixbufable.rb +12 -0
- data/lib/datasets-gdk-pixbuf/mnist.rb +9 -0
- data/lib/datasets-gdk-pixbuf/version.rb +1 -1
- data/red-datasets-gdk-pixbuf.gemspec +2 -2
- data/test/test-cifar.rb +1 -1
- data/test/test-fashion-mnist.rb +10 -0
- data/test/test-mnist.rb +10 -0
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fa73f042b76ddce2e093372f66843ded75b103a63242085254978480d1b9d1f
|
4
|
+
data.tar.gz: cd66b11a5efaa5880e064b26b85e19e90ab526a4df1b6cee12bb7a65a3ed257a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8282c97ab11450e5f2415ed200fb5bb8402df182f7e73769eeb37d28ad176c0db583a29d2a9216249a04e3771c3b2cebd79b675d58ccfe24366b501e6efe2af
|
7
|
+
data.tar.gz: a1f6d43b8769c5571106ff56bee8ee53b3fcb95178e5682b33b1a65a5c6ab65ff2a7c93264826ba60993e44dd7e06decc24f62253fac4bfc86415bee1f2ec89a
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 0.0.2 - 2018-11-30
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Added support for MNIST dataset.
|
8
|
+
[GitHub#2][Patch by chimame]
|
9
|
+
|
10
|
+
* Added support for Fashion-MNIST dataset.
|
11
|
+
[GitHub#3][Patch by chimame]
|
12
|
+
|
13
|
+
### Thanks
|
14
|
+
|
15
|
+
* chimame
|
16
|
+
|
3
17
|
## 0.0.1 - 2018-05-06
|
4
18
|
|
5
19
|
Initial release!!!
|
data/lib/datasets-gdk-pixbuf.rb
CHANGED
@@ -6,7 +6,9 @@ module DatasetsGdkPixbuf
|
|
6
6
|
n_channels = 3
|
7
7
|
width = 32
|
8
8
|
height = 32
|
9
|
-
|
9
|
+
color_size = width * height
|
10
|
+
rgb_data = pixels.each_slice(color_size).to_a.transpose.flatten
|
11
|
+
rgb_data = rgb_data.pack("C*")
|
10
12
|
GdkPixbuf::Pixbuf.new(:data => rgb_data,
|
11
13
|
:row_stride => width * n_channels,
|
12
14
|
:width => width,
|
@@ -34,8 +34,8 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.files += Dir.glob("doc/text/*")
|
35
35
|
spec.test_files += Dir.glob("test/**/*")
|
36
36
|
|
37
|
-
spec.add_runtime_dependency("gdk_pixbuf2")
|
38
|
-
spec.add_runtime_dependency("red-datasets", ">= 0.0.
|
37
|
+
spec.add_runtime_dependency("gdk_pixbuf2", ">= 3.3.0")
|
38
|
+
spec.add_runtime_dependency("red-datasets", ">= 0.0.7")
|
39
39
|
|
40
40
|
spec.add_development_dependency("bundler")
|
41
41
|
spec.add_development_dependency("rake")
|
data/test/test-cifar.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
class FashionMNISTTest < Test::Unit::TestCase
|
2
|
+
def setup
|
3
|
+
@dataset = Datasets::FashionMNIST.new(type: :train)
|
4
|
+
end
|
5
|
+
|
6
|
+
test("#to_gdk_pixbuf") do
|
7
|
+
assert_equal([74, 74, 70, 70, 70, 67, 67, 67, 66, 66],
|
8
|
+
@dataset.to_a.first.to_gdk_pixbuf.pixels[1960, 10])
|
9
|
+
end
|
10
|
+
end
|
data/test/test-mnist.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red-datasets-gdk-pixbuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gdk_pixbuf2
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: red-datasets
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
33
|
+
version: 0.0.7
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.
|
40
|
+
version: 0.0.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,11 +126,16 @@ files:
|
|
126
126
|
- doc/text/news.md
|
127
127
|
- lib/datasets-gdk-pixbuf.rb
|
128
128
|
- lib/datasets-gdk-pixbuf/cifar.rb
|
129
|
+
- lib/datasets-gdk-pixbuf/fashion-mnist.rb
|
130
|
+
- lib/datasets-gdk-pixbuf/mnist-pixbufable.rb
|
131
|
+
- lib/datasets-gdk-pixbuf/mnist.rb
|
129
132
|
- lib/datasets-gdk-pixbuf/version.rb
|
130
133
|
- red-datasets-gdk-pixbuf.gemspec
|
131
134
|
- test/helper.rb
|
132
135
|
- test/run-test.rb
|
133
136
|
- test/test-cifar.rb
|
137
|
+
- test/test-fashion-mnist.rb
|
138
|
+
- test/test-mnist.rb
|
134
139
|
homepage: https://github.com/red-data-tools/red-datasets-gdk-pixbuf
|
135
140
|
licenses:
|
136
141
|
- MIT
|
@@ -151,12 +156,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
156
|
version: '0'
|
152
157
|
requirements: []
|
153
158
|
rubyforge_project:
|
154
|
-
rubygems_version:
|
159
|
+
rubygems_version: 3.0.0.beta2
|
155
160
|
signing_key:
|
156
161
|
specification_version: 4
|
157
162
|
summary: Red Datasets GDK Pixbuf adds [GDK Pixbuf](https://developer.gnome.org/gdk-pixbuf/stable/)
|
158
163
|
object export feature to Red Datasets.
|
159
164
|
test_files:
|
165
|
+
- test/test-fashion-mnist.rb
|
166
|
+
- test/test-mnist.rb
|
160
167
|
- test/helper.rb
|
161
168
|
- test/run-test.rb
|
162
169
|
- test/test-cifar.rb
|