a1e55d9cc2cc4efa7ef2f5245e866d8645d66c77,libs/utils.py,,,#,129

Before Change


    image = Image.open("")
    no_alpha_image = image.convert("RGB")
    draw = ImageDraw.Draw(no_alpha_image)
    for region in find_regions(no_alpha_image, [0,255,0]):
        draw.rectangle(expand_bounding(no_alpha_image, region), outline=(0, 255, 0))
    no_alpha_image.show()

After Change


    ////// END OF ORIGINAL

    ////// With new mask region finder
    ori_array = np.asarray(no_alpha_image)
    ori_array = np.array(ori_array / 255.0)
    ori_array = np.expand_dims(ori_array, axis=0)
    mask = get_mask(ori_array, [0.0, 1.0, 0.0])
    regions = region_by_mask(mask)
    for region in regions:
        draw.rectangle(expand_bounding_mk2(no_alpha_image, region), outline=(0, 255, 0))
    no_alpha_image.show()
    ////// END OF NEW MASK REGION FINDER
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deeppomf/DeepCreamPy
Commit Name: a1e55d9cc2cc4efa7ef2f5245e866d8645d66c77
Time: 2019-06-17
Author: donald.carlsson@paranta.se
File Name: libs/utils.py
Class Name:
Method Name:


Project Name: librosa/librosa
Commit Name: 79a295c02a9171e5d7d0ee5a81ac5bb75b5a5332
Time: 2015-02-15
Author: brian.mcfee@nyu.edu
File Name: tests/test_effects.py
Class Name:
Method Name: test_remix_mono


Project Name: explosion/thinc
Commit Name: c5a6203229dd64efca38b20e827ce4d6e638918e
Time: 2019-10-19
Author: honnibal+gh@gmail.com
File Name: thinc/tests/unit/test_ops.py
Class Name:
Method Name: test_seq2col_window_one