contrib/crowd_counting/crowdcounting/api/model_crowdcount.py [121:143]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            t_image_draw = round(time.time() - t, 3)
            self._logger.info("time on drawing image: {}".format(t_image_draw))
            t = time.time()
            scored_image = web_encode_image(scored_image)
            t_image_encode = round(time.time() - t, 3)
            self._logger.info("time on encoding image: {}".format(t_image_encode))

            dict_time = dict(
                zip(
                    ["t_image_prepare", "t_score", "t_image_draw", "t_image_encode"],
                    [t_image_prepare, t_score, t_image_draw, t_image_encode],
                )
            )
            result["image"] = scored_image
        # sum up total time
        t_total = 0
        for k in dict_time:
            t_total += dict_time[k]
        dict_time["t_total"] = round(t_total, 3)
        self._logger.info("total time: {}".format(round(t_total, 3)))
        result["time"] = dict_time
        self._logger.info("---finished scoring image---")
        return result
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



contrib/crowd_counting/crowdcounting/api/model_crowdcount.py [194:216]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            t_image_draw = round(time.time() - t, 3)
            self._logger.info("time on drawing image: {}".format(t_image_draw))
            t = time.time()
            scored_image = web_encode_image(scored_image)
            t_image_encode = round(time.time() - t, 3)
            self._logger.info("time on encoding image: {}".format(t_image_encode))

            dict_time = dict(
                zip(
                    ["t_image_prepare", "t_score", "t_image_draw", "t_image_encode"],
                    [t_image_prepare, t_score, t_image_draw, t_image_encode],
                )
            )
            result["image"] = scored_image
        # sum up total time
        t_total = 0
        for k in dict_time:
            t_total += dict_time[k]
        dict_time["t_total"] = round(t_total, 3)
        self._logger.info("total time: {}".format(round(t_total, 3)))
        result["time"] = dict_time
        self._logger.info("---finished scoring image---")
        return result
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



