Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory: '/media/raid5-array/experiments/Deep-PC/training_pose_errors_pytorch/kitti_pose_error_data_test_00.pickle #2

Open
BruceJKHuang opened this issue Jun 4, 2018 · 1 comment

Comments

@BruceJKHuang
Copy link

BruceJKHuang commented Jun 4, 2018

when I run the following:

python test_dpc_net.py --seqs 00 --corr pose

it gives me errors.

However, I am pretty sure I change all the path variables in both the test_dpc_net.py and some in the create_kitti_training_data.py. I couldn't find any other paths that I need to change. Could you please look into it? Thanks.

Detected epoch 11 as the best one.
Traceback (most recent call last):
File "test_dpc_net.py", line 280, in
main()
File "test_dpc_net.py", line 81, in main
test_stats, tm_dict = run_test(seq, epoch, correction_type, 'sparse', paths)
File "test_dpc_net.py", line 168, in run_test
test_loader = DataLoader(KITTIOdometryDataset(kitti_config['kitti_data_file'], img_type=train_config['img_type'], transform_img=transform_img, run_type='test', remap_kitti_folder=paths['kitti_img']),
File "/home/brucebot/Cloud/workspace/dpc-net/utils.py", line 86, in init
self.load_kitti_data(run_type) #Loads self.image_quad_paths and self.labels
File "/home/brucebot/Cloud/workspace/dpc-net/utils.py", line 90, in load_kitti_data
with open(self.pickle_file, 'rb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/media/raid5-array/experiments/Deep-PC/training_pose_errors_pytorch/kitti_pose_error_data_test_00.pickle'

ps.

I used grep and I found:

Binary file ./128.100.201.179/2017-dpc-net/trained_models/pose/seq_00_epoch_11_best.pth.tar matches
Binary file ./128.100.201.179/2017-dpc-net/trained_models/pose/seq_05_epoch_11_best.pth.tar matches
Binary file ./128.100.201.179/2017-dpc-net/trained_models/pose/seq_02_epoch_7_best.pth.tar matches
Binary file ./128.100.201.179/2017-dpc-net/kitti_training_data/kitti_pose_error_data_test_05.pickle matches
Binary file ./128.100.201.179/2017-dpc-net/kitti_training_data/kitti_pose_error_data_test_00.pickle matches
Binary file ./128.100.201.179/2017-dpc-net/kitti_training_data/kitti_pose_error_data_test_02.pickle matches

@BruceJKHuang BruceJKHuang changed the title can No such file or directory: '/media/raid5-array/experiments/Deep-PC/training_pose_errors_pytorch/kitti_pose_error_data_test_00.pickle Jun 4, 2018
@HyuanTan
Copy link

@BruceJKHuang Hi, when you load the pre-trained model such as seq_00_epoch_11_best.pth.tar, the saved_data is dictionary-like struct which have key kitti_config, and kitti_config also is dictionary-like struct which have key kitti_data_file:

    saved_data = torch.load(kitti_test_trained_model_path)
    train_config = saved_data['train_config']
    system_config = saved_data['system_config']
    kitti_config = saved_data['kitti_config']
    train_config["trained_models_dir"] = os.path.join(paths["trained_models"], train_config["correction_type"])
    kitti_data_file = kitti_config["kitti_data_file"].split("/")[-1]
    kitti_config["kitti_data_file"] = os.path.join(paths["kitti_vo"], kitti_data_file)
test_loader = DataLoader(KITTIOdometryDataset(kitti_config['kitti_data_file'], img_type=train_config['img_type'], transform_img=transform_img, run_type='test', remap_kitti_folder=paths['kitti_img']), 
                        batch_size=32,
                        shuffle=False, num_workers=6)

The DataLoader load the data using the path in kitti_config['kitti_data_file'], you can print the saved_data to confirm that. So you can change kitti_config['kitti_data_file'] to your own way. Hope that can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants