def METHOD_NAME(self, inputs):
    test_dir = os.path.dirname(inputs['casmvs_inp_dir'])
    scene = os.path.basename(inputs['casmvs_inp_dir'])
    test_list = [scene]
    save_dir = inputs['casmvs_res_dir']
    logger.info('depth estimation start')
    test_dataset = MVSDataset(
        test_dir,
        test_list,
        'test',
        5,
        192,
        1.06,
        max_h=1200,
        max_w=1200,
        fix_res=False)
    with torch.no_grad():
        for batch_idx, sample in enumerate(test_dataset):
            sample = numpy2torch(sample)
            if self.device == 'cuda':
                sample_cuda = tocuda(sample)
            proj_matrices_dict = sample_cuda['proj_matrices']
            proj_matrices_dict_new = {}
            for k, v in proj_matrices_dict.items():
                proj_matrices_dict_new[k] = v.unsqueeze(0)
            outputs = self.model(sample_cuda['imgs'].unsqueeze(0),
                                 proj_matrices_dict_new,
                                 sample_cuda['depth_values'].unsqueeze(0))
            outputs = tensor2numpy(outputs)
            del sample_cuda
            filenames = [sample['filename']]
            cams = sample['proj_matrices']['stage{}'.format(3)].unsqueeze(
                0).numpy()
            imgs = sample['imgs'].unsqueeze(0).numpy()
            # save depth maps and confidence maps
            for filename, cam, img, depth_est, photometric_confidence in zip(
                    filenames, cams, imgs, outputs['depth'],
                    outputs['photometric_confidence']):
                img = img[0]  # ref view
                cam = cam[0]  # ref cam
                depth_filename = os.path.join(
                    save_dir, filename.format('depth_est', '.pfm'))
                confidence_filename = os.path.join(
                    save_dir, filename.format('confidence', '.pfm'))
                cam_filename = os.path.join(
                    save_dir, filename.format('cams', '_cam.txt'))
                img_filename = os.path.join(
                    save_dir, filename.format('images', '.jpg'))
                ply_filename = os.path.join(
                    save_dir, filename.format('ply_local', '.ply'))
                os.makedirs(
                    depth_filename.rsplit('/', 1)[0], exist_ok=True)
                os.makedirs(
                    confidence_filename.rsplit('/', 1)[0], exist_ok=True)
                os.makedirs(cam_filename.rsplit('/', 1)[0], exist_ok=True)
                os.makedirs(img_filename.rsplit('/', 1)[0], exist_ok=True)
                os.makedirs(ply_filename.rsplit('/', 1)[0], exist_ok=True)
                # save depth maps
                save_pfm(depth_filename, depth_est)
                # save confidence maps
                save_pfm(confidence_filename, photometric_confidence)
                # save cams, img
                write_cam(cam_filename, cam)
                img = np.clip(np.transpose(img, (1, 2, 0)) * 255, 0,
                              255).astype(np.uint8)
                img_bgr = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
                cv2.imwrite(img_filename, img_bgr)
    logger.info('depth estimation end')
    return inputs