947e0854e4dc4dcd67ba1c26cd60b8c4c948db61,python-package/insightface/app/face_analysis.py,FaceAnalysis,get,#FaceAnalysis#Any#Any#Any#Any#,38

Before Change


            img_center = img.shape[0]//2, img.shape[1]//2
            offsets = np.vstack([ (bboxes[:,0]+bboxes[:,2])/2-img_center[1], (bboxes[:,1]+bboxes[:,3])/2-img_center[0] ])
            offset_dist_squared = np.sum(np.power(offsets,2.0),0)
            bindex = np.argmax(area-offset_dist_squared*2.0) // some extra weight on the centering
            bindex = bindex[0:max_num]
            bboxes = bboxes[bindex, :]
            landmarks = landmarks[bindex, :]

After Change


            offsets = np.vstack([ (bboxes[:,0]+bboxes[:,2])/2-img_center[1], (bboxes[:,1]+bboxes[:,3])/2-img_center[0] ])
            offset_dist_squared = np.sum(np.power(offsets,2.0),0)
            values = area-offset_dist_squared*2.0 // some extra weight on the centering
            bindex = np.argsort(values)[::-1] // some extra weight on the centering
            bindex = bindex[0:max_num]
            bboxes = bboxes[bindex, :]
            landmarks = landmarks[bindex, :]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepinsight/insightface
Commit Name: 947e0854e4dc4dcd67ba1c26cd60b8c4c948db61
Time: 2019-12-16
Author: guojia@gmail.com
File Name: python-package/insightface/app/face_analysis.py
Class Name: FaceAnalysis
Method Name: get


Project Name: deepinsight/insightface
Commit Name: 869d57d85a1718cf149b2c13a8d9fa56c238c5e4
Time: 2019-12-16
Author: guojia@gmail.com
File Name: python-package/insightface/app/face_analysis.py
Class Name: FaceAnalysis
Method Name: get


Project Name: pcyin/tranX
Commit Name: 92b516868906bac87d3b17b972ba9a2f5ef5c9c8
Time: 2018-11-21
Author: pcyin@cs.cmu.edu
File Name: components/reranker.py
Class Name: Reranker
Method Name: compute_rerank_performance