".index"):
                print(
                    "#######################Restored all weights ###########################"
                )
                model_saver.restore(
                    sess, configs.restore_model_path_fn(cur_model_iterations))
            else:
                print(configs.restore_model_path_fn(cur_model_iterations))
                print("The prev model is not existing!")
                quit()

            ##################### First get the depth scale from the subset of the training set ######################

            cur_model_depth_scale = my_utils.mAverageCounter(shape=[1])
            scale_data_index = my_utils.mRangeVariable(
                min_val=scale_data_from,
                max_val=scale_data_to - 1,
                initial_val=scale_data_from)
            while not scale_data_index.isEnd():
                batch_images_np = np.zeros([
                    configs.scale_batch_size, configs.img_size,
                    configs.img_size, 3
                ],
                                           dtype=np.float32)
                batch_relation_table_np = np.zeros([
                    configs.scale_batch_size, configs.nJoints, configs.nJoints
                ],
                                                   dtype=np.float32)
                batch_loss_table_log_np = np.zeros([
                    configs.scale_batch_size, configs.nJoints, configs.nJoints
                ],
                                                   dtype=np.float32)
Example #2
0
    @classmethod
    def reset(cls):
        cls.next_flag = 0

    @classmethod
    def get_next(cls):
        return cls.next_flag

    @classmethod
    def get_going(cls):
        return cls.keep_going


if __name__ == "__main__":
    total_sum = len(os.listdir(os.path.join(data_path, "images")))
    data_index = my_utils.mRangeVariable(0, total_sum, -1)
    wnd_width = 1000
    wnd_height = 1000

    # proj_mat = vtools.OpenGLUtils.perspective(np.radians(45), float(wnd_width) / wnd_height, 0.1, 10000.0)
    # view_mat = vtools.OpenGLUtils.lookAt((0, 0, 6), (0, 0, 0), (0, 1, 0))
    view_mat = np.identity(4)
    proj_mat, _ = h36m_camera.get_cam_mat(1, 54138969)

    visualBox = vtools.mVisualBox(
        wnd_width,
        wnd_height,
        title="ordinal show",
        btn_callback=m_btn_callback,
        proj_mat=proj_mat,
        view_mat=view_mat,