|
129 | 129 |
|
130 | 130 | face.features.wont_be :nil? |
131 | 131 |
|
132 | | - face.features.confidence.must_be_close_to 0.42813218 |
| 132 | + face.features.confidence.must_be_close_to 0.4, 0.1 |
133 | 133 | face.features.chin.center.must_be_kind_of Google::Cloud::Vision::Annotation::Face::Features::Landmark |
134 | | - face.features.chin.center.x.must_be_close_to 233.21977 |
135 | | - face.features.chin.center.y.must_be_close_to 189.47475 |
136 | | - face.features.chin.center.z.must_be_close_to 19.487228 |
| 134 | + face.features.chin.center.x.must_be_close_to 233.2, 0.1 |
| 135 | + face.features.chin.center.y.must_be_close_to 189.4, 0.1 |
| 136 | + face.features.chin.center.z.must_be_close_to 19.4, 0.1 |
137 | 137 | face.features.chin.left.to_a.must_be_close_to_array [166.70468, 145.37173, 71.187653] |
138 | 138 | face.features.chin.right.to_a.must_be_close_to_array [299.02509, 135.58951, 61.98719] |
139 | 139 |
|
|
244 | 244 | landmark.mid.must_equal "/m/019dvv" |
245 | 245 | landmark.locale.must_be :empty? |
246 | 246 | landmark.description.must_equal "Mount Rushmore" |
247 | | - landmark.score.must_be_close_to 0.917461633682251 |
| 247 | + landmark.score.must_be_close_to 0.9, 0.1 |
248 | 248 | landmark.confidence.must_be :zero? |
249 | 249 | landmark.topicality.must_be :zero? |
250 | 250 | landmark.bounds[0].must_be_kind_of Google::Cloud::Vision::Annotation::Vertex |
|
254 | 254 | landmark.bounds[2].to_a.must_equal [478, 319] |
255 | 255 | landmark.bounds[3].to_a.must_equal [9, 319] |
256 | 256 | landmark.locations[0].must_be_kind_of Google::Cloud::Vision::Location |
257 | | - landmark.locations[0].latitude.must_be_close_to 43.878264 |
258 | | - landmark.locations[0].longitude.must_be_close_to -103.45700740814209 |
| 257 | + landmark.locations[0].latitude.must_be_close_to 43.8, 0.1 |
| 258 | + landmark.locations[0].longitude.must_be_close_to -103.4, 0.1 |
259 | 259 | landmark.properties.must_be :empty? |
260 | 260 | end |
261 | 261 |
|
|
299 | 299 | logo.mid.must_equal "/m/0b34hf" |
300 | 300 | logo.locale.must_be :empty? |
301 | 301 | logo.description.must_equal "Google" |
302 | | - logo.score.must_be_close_to 0.7072761058807373 |
| 302 | + logo.score.must_be_close_to 0.7, 0.1 |
303 | 303 | logo.confidence.must_be :zero? |
304 | 304 | logo.topicality.must_be :zero? |
305 | 305 | logo.bounds[0].must_be_kind_of Google::Cloud::Vision::Annotation::Vertex |
|
656 | 656 | annotation.properties.colors[0].blue.must_equal 254 |
657 | 657 | annotation.properties.colors[0].alpha.must_equal 1.0 |
658 | 658 | annotation.properties.colors[0].rgb.must_equal "91c1fe" |
659 | | - annotation.properties.colors[0].score.must_be_close_to 0.65757853 |
660 | | - annotation.properties.colors[0].pixel_fraction.must_be_close_to 0.16903226 |
| 659 | + annotation.properties.colors[0].score.must_be_close_to 0.6, 0.1 |
| 660 | + annotation.properties.colors[0].pixel_fraction.must_be_close_to 0.1, 0.1 |
661 | 661 |
|
662 | 662 | annotation.properties.colors[9].red.must_equal 156 |
663 | 663 | annotation.properties.colors[9].green.must_equal 214 |
664 | 664 | annotation.properties.colors[9].blue.must_equal 255 |
665 | 665 | annotation.properties.colors[9].alpha.must_equal 1.0 |
666 | 666 | annotation.properties.colors[9].rgb.must_equal "9cd6ff" |
667 | | - annotation.properties.colors[9].score.must_be_close_to 0.00096750073 |
668 | | - annotation.properties.colors[9].pixel_fraction.must_be_close_to 0.00064516132 |
| 667 | + annotation.properties.colors[9].score.must_be_close_to 0.0, 0.1 |
| 668 | + annotation.properties.colors[9].pixel_fraction.must_be_close_to 0.0, 0.1 |
669 | 669 | end |
670 | 670 |
|
671 | 671 | it "detects properties from multiple images" do |
|
917 | 917 | properties.colors[0].blue.must_equal 254 |
918 | 918 | properties.colors[0].alpha.must_equal 1.0 |
919 | 919 | properties.colors[0].rgb.must_equal "91c1fe" |
920 | | - properties.colors[0].score.must_be_close_to 0.65757853 |
921 | | - properties.colors[0].pixel_fraction.must_be_close_to 0.16903226 |
| 920 | + properties.colors[0].score.must_be_close_to 0.6, 0.1 |
| 921 | + properties.colors[0].pixel_fraction.must_be_close_to 0.1, 0.1 |
922 | 922 |
|
923 | 923 | properties.colors[9].red.must_equal 156 |
924 | 924 | properties.colors[9].green.must_equal 214 |
925 | 925 | properties.colors[9].blue.must_equal 255 |
926 | 926 | properties.colors[9].alpha.must_equal 1.0 |
927 | 927 | properties.colors[9].rgb.must_equal "9cd6ff" |
928 | | - properties.colors[9].score.must_be_close_to 0.00096750073 |
929 | | - properties.colors[9].pixel_fraction.must_be_close_to 0.00064516132 |
| 928 | + properties.colors[9].score.must_be_close_to 0.0, 0.1 |
| 929 | + properties.colors[9].pixel_fraction.must_be_close_to 0.0, 0.1 |
930 | 930 | end |
931 | 931 | end |
932 | 932 |
|
|
0 commit comments