dd722158770cb60f820886bcd99dc9edca70a0bb,test/augmentables/test_polys.py,,test_Polygon_draw_on_image,#,605
Before Change
assert image_poly.dtype.type == np.uint8
assert image_poly.shape == (10, 10, 3)
for c_idx, value in enumerate([0, 255, 0]):
assert np.all(
image_poly[2:9, 8:9, c_idx] ==
(
0.5*image[2:9, 8:9, c_idx]
+ np.full((7, 1), 0.5*value, dtype=np.float32)
).astype(np.uint8)
) // right boundary
expected = 0.5 * np.tile(np.uint8([32, 128, 32]).reshape((1, 1, 3)), (5, 5, 1)) \
+ 0.5 * image[3:8, 3:8, :]
assert np.all(image_poly[3:8, 3:8, :] == expected.astype(np.uint8))
After Change
assert image_poly.dtype.type == np.uint8
assert image_poly.shape == (10, 10, 3)
for c_idx, value in enumerate([0, 255, 0]):
expected = np.round(
0.5*image[2:9, 8:9, c_idx]
+ np.full((7, 1), 0.5*value, dtype=np.float32)
).astype(np.uint8)
assert np.all(image_poly[2:9, 8:9, c_idx] == expected) // right boundary
expected = 0.5 * np.tile(np.uint8([32, 128, 32]).reshape((1, 1, 3)), (5, 5, 1)) \
+ 0.5 * image[3:8, 3:8, :]
assert np.all(image_poly[3:8, 3:8, :] == np.round(expected).astype(np.uint8))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: aleju/imgaug
Commit Name: dd722158770cb60f820886bcd99dc9edca70a0bb
Time: 2019-04-09
Author: kontakt@ajung.name
File Name: test/augmentables/test_polys.py
Class Name:
Method Name: test_Polygon_draw_on_image
Project Name: NifTK/NiftyNet
Commit Name: 6d854ec8c54e0eb0a73635f41b0598f2d2231069
Time: 2017-09-01
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_window_buffer.py
Class Name: InputBatchQueueRunner
Method Name: _create_queue_and_ops
Project Name: broadinstitute/keras-rcnn
Commit Name: a7d6d329432782ce1a4a5e8b8f59997bc571c770
Time: 2018-12-05
Author: mbroisin@broadinstitute.org
File Name: tests/layers/losses/test_mask_rcnn.py
Class Name: TestMaskRCNN
Method Name: test_compute_mask_loss