Sha256: 9a619500a7b055b226d2c8cfb84b4311e9bcf3402d465da9a89d66bb419de877
Contents?: true
Size: 507 Bytes
Versions: 5
Compression:
Stored size: 507 Bytes
Contents
require "yaml" class Logo::Suite attr_accessor :recognize, :data def initialize(recognize) @recognize = recognize end def load(yml) File.open(yml, 'r') do |file| @data = YAML.load(file) end prefix = File.dirname(yml) # item # => {"path"=>"test/suite/snap4train_raw/anhuiweishi/1370432428.jpg", "label"=>"anhuiweishi", "x"=>40, "y"=>45, "w"=>102, "h"=>78} @data.each do |item| item['path'] = File.join(prefix, item['path']) @recognize.add_image(item) end @data end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
logo-0.1.5 | lib/logo/suite.rb |
logo-0.1.4 | lib/logo/suite.rb |
logo-0.1.3 | lib/logo/suite.rb |
logo-0.1.2 | lib/logo/suite.rb |
logo-0.1.1 | lib/logo/suite.rb |