eb4732369125efb8c9c87ad79544e99c1aa3b67e,keras_rcnn/applications/_jhung2019.py,JHung2019,predict,#JHung2019#Any#Any#Any#Any#,294

Before Change


        self.load_weights("JHung2019.hdf5", by_name=True)

    def predict(self, x, batch_size=None, verbose=0, steps=None):
        target_bounding_boxes = numpy.zeros((x.shape[0], 1, 4))

        target_categories = numpy.zeros((x.shape[0], 1, self.n_categories))

        target_metadata = numpy.array([[x.shape[1], x.shape[2], 1.0]])

        x = [
            target_bounding_boxes,
            target_categories,
            x,
            target_metadata
        ]

        return super(JHung2019, self).predict(x, batch_size, verbose, steps)

After Change



        predicted_categories = numpy.squeeze(predicted_categories)

        predicted_categories = numpy.argmax(predicted_categories, axis=-1)

        indices = numpy.where(predicted_categories > 0)

        predicted_bounding_boxes = predicted_bounding_boxes[indices]

        predicted_categories = predicted_categories[indices]

        return predicted_bounding_boxes, predicted_categories
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: broadinstitute/keras-rcnn
Commit Name: eb4732369125efb8c9c87ad79544e99c1aa3b67e
Time: 2019-04-30
Author: allen.goodman@icloud.com
File Name: keras_rcnn/applications/_jhung2019.py
Class Name: JHung2019
Method Name: predict


Project Name: scikit-learn-contrib/DESlib
Commit Name: 1002cfbcc9f8182404fb058f959d625de2eabbfc
Time: 2018-03-22
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/rank.py
Class Name: Rank
Method Name: estimate_competence


Project Name: PavlosMelissinos/enet-keras
Commit Name: d529bddab06f83cbc3792acc18e18b57a74263f3
Time: 2017-05-15
Author: pmelissi@iti.gr
File Name: src/data/utils.py
Class Name:
Method Name: one_hot_to_rgb