74cdf6d00ff239ea6559812fa157bd138e2578cb,SSH/test.py,,,#,8
Before Change
//sys.path.append(".")
from ssh_detector import SSHDetector
long_max = 1200
t = 2
detector = SSHDetector("./model/e2ef", 0)
f = "../sample-images/t2.jpg"
if len(sys.argv)>1:
f = sys.argv[1]
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)
timea = datetime.datetime.now()
faces = detector.detect(img)
After Change
//sys.path.append(".")
from ssh_detector import SSHDetector
scales = [1200, 1600]
t = 2
detector = SSHDetector("./model/e2ef", 0)
f = "../sample-images/t1.jpg"
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:
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: eb6aea6e708e0fd87ca6e168a88c60a6fad570c9
Time: 2018-07-09
Author: guojia@gmail.com
File Name: SSH/test.py
Class Name:
Method Name:
Project Name: tyarkoni/pliers
Commit Name: 1e792729ce59d1cd71bb776d74bb3e427b580a4e
Time: 2018-04-13
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api/clarifai.py
Class Name: ClarifaiAPIVideoExtractor
Method Name: _to_df
Project Name: deepinsight/insightface
Commit Name: 74cdf6d00ff239ea6559812fa157bd138e2578cb
Time: 2018-07-09
Author: guojia@gmail.com
File Name: SSH/test.py
Class Name:
Method Name: