56926bc8b4a158e1c40cddbc795303bc6a66f44d,semantic-segmentation/deeplabv3plus/image_preprocess.py,,pad,#Any#Any#Any#,110

Before Change


    color = [127.5, 127.5, 127.5]

    old_size = image.shape[:2]  // old_size is in (height, width) format
    ratio = float(desired_size)/max(old_size)

    new_size = tuple([x + max(desired_size-x, 0) for x in old_size])

    // Pad image with mean pixel value

After Change


    old_size = image.shape[:2]  // old_size is in (height, width) format

    new_size = tuple([x + max(ds - x, 0)
                      for x, ds in zip(old_size, desired_size)])

    // Pad image with mean pixel value
    new_im = cv2.copyMakeBorder(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: sony/nnabla-examples
Commit Name: 56926bc8b4a158e1c40cddbc795303bc6a66f44d
Time: 2019-05-23
Author: sukriti.mehrotra@sony.com
File Name: semantic-segmentation/deeplabv3plus/image_preprocess.py
Class Name:
Method Name: pad


Project Name: matplotlib/matplotlib
Commit Name: 0b92b4f5530fee68432f13075a1ddc866748f9d1
Time: 2020-11-20
Author: anntzer.lee@gmail.com
File Name: examples/showcase/firefox.py
Class Name:
Method Name: svg_parse


Project Name: snipsco/snips-nlu
Commit Name: fe31edaf082b894a7abde79a71d533f67ca9e145
Time: 2019-04-29
Author: adrien.ball@snips.ai
File Name: snips_nlu/intent_parser/deterministic_intent_parser.py
Class Name: DeterministicIntentParser
Method Name: _parse_top_intents