deepstack 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_stack/deep_stack.rb +2 -0
- data/lib/deep_stack/image.rb +24 -0
- data/lib/deep_stack/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 830f650f0001d9ace30cbcf6758aa58cae9d4bf7089300f0e22261e58274e1cb
|
4
|
+
data.tar.gz: 2a9b1c9d03f3c04d6f159f9216b85791904f8c279155c9142bf5248eb719769a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc573a46b62325ef299af50d25a7c9c760df25025f87f1c8c1eb588a3ee148fceb38ace946d3d39e92236d48c96da4f474a239ecfc2821660886e6f020b77ea4
|
7
|
+
data.tar.gz: '08e0a71c109b87a81ef475aa85e8ea2750ed615adf65a03299b4b3df805911fac898597f94a4cdb5aa597fa03fab6367ccf04004c7545980e3a6b2261ff86d1d'
|
@@ -6,6 +6,7 @@ require_relative 'face'
|
|
6
6
|
require_relative 'detection'
|
7
7
|
require_relative 'scene'
|
8
8
|
require_relative 'custom_model'
|
9
|
+
require_relative 'image'
|
9
10
|
require_relative 'version'
|
10
11
|
|
11
12
|
# DeepStack API
|
@@ -13,6 +14,7 @@ class DeepStack
|
|
13
14
|
include DeepStack::Face
|
14
15
|
include DeepStack::Detection
|
15
16
|
include DeepStack::Scene
|
17
|
+
include DeepStack::Image
|
16
18
|
include DeepStack::CustomModel
|
17
19
|
|
18
20
|
#
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'base64'
|
4
|
+
|
5
|
+
class DeepStack
|
6
|
+
# Support Image Enhance feature
|
7
|
+
module Image
|
8
|
+
#
|
9
|
+
# Enhance image {https://docs.deepstack.cc/api-reference/index.html#image-enhance}
|
10
|
+
#
|
11
|
+
# @param [Image] image the raw image data or a File object of an image file
|
12
|
+
#
|
13
|
+
# @return [Image] the enhanced image object
|
14
|
+
# @return [nil] if failed
|
15
|
+
#
|
16
|
+
def enhance_image(image)
|
17
|
+
target = 'vision/enhance'
|
18
|
+
result = api_post(target, image)
|
19
|
+
return unless result&.dig('success') == true
|
20
|
+
|
21
|
+
Base64.decode64(result['base64'])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/deep_stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deepstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Tanagra
|
@@ -21,6 +21,7 @@ files:
|
|
21
21
|
- lib/deep_stack/deep_stack.rb
|
22
22
|
- lib/deep_stack/detection.rb
|
23
23
|
- lib/deep_stack/face.rb
|
24
|
+
- lib/deep_stack/image.rb
|
24
25
|
- lib/deep_stack/scene.rb
|
25
26
|
- lib/deep_stack/version.rb
|
26
27
|
- lib/deepstack.rb
|