74cdf6d00ff239ea6559812fa157bd138e2578cb,SSH/test.py,,,#,8

Before Change


img = cv2.imread(f)
print(img.shape)
if img.shape[0]>long_max or img.shape[1]>long_max:
  scale = float(long_max) / max(img.shape[0], img.shape[1])
  img = cv2.resize(img, (0,0), fx=scale, fy=scale)
  print("resize to", img.shape)
for i in xrange(t-1): //warmup
  faces = detector.detect(img)

After Change


if len(sys.argv)>1:
  f = sys.argv[1]
img = cv2.imread(f)
im_shape = img.shape
print(im_shape)
target_size = scales[0]
max_size = scales[1]
im_size_min = np.min(im_shape[0:2])
im_size_max = np.max(im_shape[0:2])
if im_size_min>target_size or im_size_max>max_size:
  im_scale = float(target_size) / float(im_size_min)
  // prevent bigger axis from being more than max_size:
  if np.round(im_scale * im_size_max) > max_size:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: deepinsight/insightface
Commit Name: 74cdf6d00ff239ea6559812fa157bd138e2578cb
Time: 2018-07-09
Author: guojia@gmail.com
File Name: SSH/test.py
Class Name:
Method Name:


Project Name: deepinsight/insightface
Commit Name: 74cdf6d00ff239ea6559812fa157bd138e2578cb
Time: 2018-07-09
Author: guojia@gmail.com
File Name: SSH/test.py
Class Name:
Method Name:


Project Name: deepinsight/insightface
Commit Name: eb6aea6e708e0fd87ca6e168a88c60a6fad570c9
Time: 2018-07-09
Author: guojia@gmail.com
File Name: SSH/test.py
Class Name:
Method Name:


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: resize