ce9e61f795ab62c0d1b0823444483235a02040f7,lib/metric.py,VisMetric,update,#VisMetric#,276

Before Change


            bbox_pred = preds[self.pred.index("rcnn_bbox_pred")].asnumpy()
            path = os.path.join(self.root_path, "dump_preds.pkl")
            with open(path,"wb") as f:
                pickle.dump((pred[0],bbox_pred[0]),f)
       
        self.num_inst += 1
        self.sum_metric = 0

After Change


        if self.num_inst % self.freq == 0 and self.num_inst%self.nGPU==0:
            pred = preds[self.pred.index("rcnn_cls_prob")].asnumpy()
            bbox_pred = preds[self.pred.index("rcnn_bbox_pred")].asnumpy()
            labels = preds[self.pred.index("rcnn_label")].asnumpy()
            rois = preds[self.pred.index("rois")].asnumpy()
            inds = np.where(rois[:, 0] == 0)[0]
            path = os.path.join(self.root_path, "dump_preds_{}.pkl".format(self.file_name))
            with open(path,"wb") as f:
                pickle.dump((pred[0], bbox_pred[inds], rois[inds], labels[inds]),f)
       
        self.num_inst += 1
        self.sum_metric = 0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mahyarnajibi/SNIPER
Commit Name: ce9e61f795ab62c0d1b0823444483235a02040f7
Time: 2018-05-08
Author: mahyarnajibi@gmail.com
File Name: lib/metric.py
Class Name: VisMetric
Method Name: update


Project Name: ageitgey/face_recognition
Commit Name: 743815e2bf5cb89ab4984f1d63a82aaa52584a6d
Time: 2018-01-26
Author: ageitgey@gmail.com
File Name: examples/facerec_from_webcam_faster.py
Class Name:
Method Name:


Project Name: ageitgey/face_recognition
Commit Name: 743815e2bf5cb89ab4984f1d63a82aaa52584a6d
Time: 2018-01-26
Author: ageitgey@gmail.com
File Name: examples/facerec_from_webcam.py
Class Name:
Method Name: